diff options
-rwxr-xr-x | p | 17 | ||||
-rwxr-xr-x | sys | 10 |
2 files changed, 27 insertions, 0 deletions
@@ -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" + @@ -0,0 +1,10 @@ +#!/usr/bin/env bash +systemctl "$@" list-unit-files \ + | tail -n +2 \ + | head -n -2 \ + | cut -d' ' -f1 \ + | fzf \ + --preview="systemctl $@ status {}" \ + --preview-window "bottom,follow" \ + --bind "alt-1:change-preview:systemctl $@ status {}" \ + --bind "alt-2:change-preview:journalctl $@ -fu {}" |