I still can't figure out how to run this, but what do I need to run from a (sh) command prompt?source the redo script mentioned above in zsh or bash. type the start few letters of a previous command and hit ctrl-r. you’ll see zsh/bash itself show a few command lines. you can scroll down/up to select one and execute it. more keys are bound to other actions. read the redo script.
Which part of the instructions are you having trouble with?Can you give me a command to run to get this started? I've tried all sorts, but I'm not familiar with bash even though I have it installed.
Show us what you tried.I still can't figure out how to run this, but what do I need to run from a (sh) command prompt?
Do I need to run bash first?
Can you give me a command to run to get this started? I've tried all sorts, but I'm not familiar with bash even though I have it installed.
Many thanks, that's exactly the sort of thing I was looking for, and works straight out of the box unlike redo by running hstr without the need to specify the shell and do other things which never figured out.Maybe sysutils/hstr is what you are looking for. It has freebsd install and configuration instructions on it's github wiki here.
Show us what you tried.
root@X1:~ $ pwd
/root
root@X1:~ $ source redo/redo
sh: source: not found
root@X1:~ $ bash
[root@X1 ~]# source redo/redo
[root@X1 ~]#
The first line works. The second one does nothing.
root@X1:~ $ pwd
/root
root@X1:~ $ source redo/redo
sh: source: not found
root@X1:~ $ bash
[root@X1 ~]# source redo/redo
[root@X1 ~]#
Not true. It "sources" the redo script so you can use the functions in it.The second one does nothing.
OK so C-r does something if know about this, but by itself it does nothing.Not true. It "sources" the redo script so you can use the functions in it.
What happens if you press CTRL + r (reverse search) after?
/bin/sh doesn't know about "source" (for sourcing a file you use "." in /bin/sh) but the instructions clearly say this is for zsh or bash. The second source merges the result of commands in redo in the current bash. After this what is described in README.md should work but it seems you are not actually reading the README.md carefully enough.The first line works. The second one does nothing.
sh:root@X1:~ $ pwd /root root@X1:~ $ source redo/redo sh: source: not found root@X1:~ $ bash [root@X1 ~]# source redo/redo [root@X1 ~]#
I guess you didn't notice the commands which showedroot@X1:~ $ bash
[root@X1 ~]# source redo/redo
root@X1:~ $ bash
[root@X1 ~]# source redo/redo
root@X1:~ $ bash
[root@X1 ~]# source redo/redo
/bin/sh doesn't know about "source" (for sourcing a file you use "." in /bin/sh) but the instructions clearly say this is for zsh or bash. The second source merges the result of commands in redo in the current bash. After this what is described in README.md should work but it seems you are not actually reading the README.md carefully enough.
root@X1:~ $ bash
[root@X1 ~]# source redo/redo
[root@X1 ~]#
redo or hstr though:history_command() {
cmd_full=$(fc -l 1 "$HISTSIZE" | fzy --lines=25)
cmd_only=$(echo "$cmd_full" | awk '{for(i=2; i<=NF; i++) printf "%s ", $i; print ""}')
if [ -n "$cmd_only" ] ; then
set -- "run" "edit"
action="$(printf '%s\n' "$@" | fzy)"
cmd_number=$(echo "$cmd_full" | awk '{print $1}')
case "$action" in
run) eval "$cmd_only" ;;
edit)...