Display help menu using $PAGER

Also, use `open` to open files when `xdg-open` is missing.
This commit is contained in:
Arijit Basu 2021-04-08 07:54:08 +05:30 committed by Arijit Basu
parent 45a95a792d
commit e2b49ab4fd

View File

@ -354,9 +354,7 @@ impl Default for KeyBindings {
help: global help menu help: global help menu
messages: messages:
- BashExec: | - BashExec: |
cat "${XPLR_PIPE_GLOBAL_HELP_MENU_OUT}" ${PAGER:-less} "${XPLR_PIPE_GLOBAL_HELP_MENU_OUT}"
echo
read -p "[enter to continue]"
ctrl-c: ctrl-c:
help: cancel & quit [q|esc] help: cancel & quit [q|esc]
@ -578,7 +576,8 @@ impl Default for Config {
help: open in gui help: open in gui
messages: messages:
- BashExec: | - BashExec: |
xdg-open "${XPLR_FOCUS_PATH:?}" &> /dev/null OPENER="$(which xdg-open)"
${OPENER:-open} "${XPLR_FOCUS_PATH:?}" &> /dev/null
- SwitchMode: default - SwitchMode: default
ctrl-c: ctrl-c: