summaryrefslogtreecommitdiff
path: root/p
diff options
context:
space:
mode:
authorBen Sima <ben@bsima.me>2022-02-10 05:22:33 -0500
committerBen Sima <ben@bsima.me>2022-02-10 05:22:33 -0500
commita3507266f55ac85fed1fde0ac488344e9add29f8 (patch)
treee99d9e52dfc4b8fff0faf09a5782c94df8b37845 /p
parent3105cbe35ffb97b03baca0b52b6057f4303fb9bc (diff)
two more fzf scripts: p and sys
Diffstat (limited to 'p')
-rwxr-xr-xp17
1 files changed, 17 insertions, 0 deletions
diff --git a/p b/p
new file mode 100755
index 0000000..4167e06
--- /dev/null
+++ b/p
@@ -0,0 +1,17 @@
+#!/usr/bin/env bash
+echo $PATH \
+ | sed "s/:/\n/g" \
+ | while read d; do ls -1 $d 2>/dev/null; done \
+ | sort \
+ | uniq \
+ | fzf \
+ --reverse \
+ --height "50%" \
+ --preview="man {}" \
+ --bind "alt-1:change-preview:man {}" \
+ --bind "alt-2:change-preview:{} -h" \
+ --bind "alt-3:change-preview:{} --help" \
+ --bind "pgup:preview-page-up" \
+ --bind "pgdn:preview-page-down" \
+ --bind "backward-eof:abort"
+