Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions sysz
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ _sysz_keys() {
cat <<EOF
Keybindings:
TAB Toggle selection.
ctrl-v 'cat' the unit in the preview window.
ctrl-v Toggle 'cat' the unit in the preview window.
ctrl-s Select states to match. Selection is reset.
ctrl-r Run daemon-reload. Selection is reset.
ctrl-p History previous.
Expand All @@ -25,7 +25,7 @@ EOF
}

_sysz_help() {
cat >&2 <<EOF
cat <<EOF # https://github.com/joehillen/sysz/pull/29#issue-2044616077
A utility for using systemctl interactively via fzf.

Usage: $PROG [OPTS...] [CMD] [-- ARGS...]
Expand Down Expand Up @@ -422,7 +422,10 @@ while :; do
--prompt="Units: " \
--header '? for keybindings' \
--bind "?:preview(echo '$(_sysz_keys)')" \
--bind "ctrl-v:preview('${BASH_SOURCE[0]}' _fzf_cat {})" \
--bind 'ctrl-v:transform:[[ ! $FZF_PROMPT =~ CAT ]] &&
echo "change-prompt(CAT )+preview('${BASH_SOURCE[0]}' _fzf_cat {})" ||
echo "change-prompt(Units: )+preview('${BASH_SOURCE[0]}' _fzf_preview {})"' \
--bind 'focus:change-prompt(Units: )' \
--preview="'${BASH_SOURCE[0]}' _fzf_preview {}" \
--preview-window=70% |
readarray -t PICKS
Expand Down