diff options
author | EuAndreh <eu@euandre.org> | 2022-05-21 10:00:44 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2022-05-21 10:00:44 -0300 |
commit | 2d973e56abd242d76e6aae403ae71ef7a2c9fb2e (patch) | |
tree | e49de53dc0e2334cab40940419f5a8ebaf22e34e /bin | |
parent | bin/msg: Add example to help message (diff) | |
download | dotfiles-2d973e56abd242d76e6aae403ae71ef7a2c9fb2e.tar.gz dotfiles-2d973e56abd242d76e6aae403ae71ef7a2c9fb2e.tar.xz |
bin/e: Launch fzf prompt with personal files when no argument is given
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/e | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -75,5 +75,14 @@ if [ ! -t 0 ]; then $CMD "$F" cat "$F" >&3 else - $CMD "$@" + if [ $# -eq 0 ]; then + f="$(fzf --select-1 --exit-0 < "$XDG_DATA_HOME"/euandreh/e.list.txt)" + if [ -n "$f" ]; then + # FIXME + history -s e "$f" + sh -c "$CMD $f" + fi + else + $CMD "$@" + fi fi |