From a3507266f55ac85fed1fde0ac488344e9add29f8 Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Thu, 10 Feb 2022 05:22:33 -0500 Subject: two more fzf scripts: p and sys --- sys | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100755 sys (limited to 'sys') diff --git a/sys b/sys new file mode 100755 index 0000000..27be7fd --- /dev/null +++ b/sys @@ -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 {}" -- cgit v1.2.3