aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2022-05-21 10:00:44 -0300
committerEuAndreh <eu@euandre.org>2022-05-21 10:00:44 -0300
commit2d973e56abd242d76e6aae403ae71ef7a2c9fb2e (patch)
treee49de53dc0e2334cab40940419f5a8ebaf22e34e
parentbin/msg: Add example to help message (diff)
downloaddotfiles-2d973e56abd242d76e6aae403ae71ef7a2c9fb2e.tar.gz
dotfiles-2d973e56abd242d76e6aae403ae71ef7a2c9fb2e.tar.xz
bin/e: Launch fzf prompt with personal files when no argument is given
-rwxr-xr-xbin/e11
1 files changed, 10 insertions, 1 deletions
diff --git a/bin/e b/bin/e
index 76b4899..b163eda 100755
--- a/bin/e
+++ b/bin/e
@@ -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