fish: functions/dotg: Allow scrolling half a page up or down

Allow scrolling half a page up or down by binding keys to page up
or down actions.
This commit is contained in:
Sanchayan Maity 2023-02-08 10:35:20 +05:30
parent dd0adf5212
commit e1be59cafa
Signed by: sanchayanmaity
GPG key ID: 6F6A0609C12038F3

View file

@ -5,7 +5,7 @@ function dotg --description 'Generate gstreamer dot graph for selected file'
set dotpath "$GST_DEBUG_DUMP_DOT_DIR"
end
find /tmp/gst-dot -maxdepth 1 -regextype posix-extended -regex ".*\.(dot)" -printf '%T@ %p\n' | sort -k 1 -n -r | fzf | awk -F' ' '{print $2}' | read -l result
find /tmp/gst-dot -maxdepth 1 -regextype posix-extended -regex ".*\.(dot)" -printf '%T@ %p\n' | sort -k 1 -n -r | fzf --bind "ctrl-d:half-page-down,ctrl-u:half-page-up" | awk -F' ' '{print $2}' | read -l result
if test -n "$result"
dot -Tsvg "$result" -O