Shift-F1 keybinding in tmux will not work if login shell is not bash

Bug #1392693 reported by Ruben Laguna on 2014-11-14
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
byobu
Undecided
Unassigned

Bug Description

The binding for Shift-F11 defined in /usr/share/byobu/keybindings/f-keys.tmux

bind-key -n S-F1 new-window -k -n help '$BYOBU_PAGER $BYOBU_PREFIX/share/doc/byobu/help.tmux.txt'

doesn't work if the login shell doesn't support using variables as commands (fish shell is an example of those shell). Under fish the Shift-F1 will lead to an error and the shell will exit, the error is:

fish: Variables may not be used as commands. Instead, define a function like 'function BYOBU_PAGER; sensible-pager $argv; end' or use the eval builtin instead, like 'eval $BYOBU_PAGER'. See the help section for the function command by typing 'help function'.

but since the shell will exit you will not see it as the window is automatically closed.

The binding should be changed to not to depend on the login shell, something along the lines of

bind-key -n S-F1 new-window -k -n help "sh -c '$BYOBU_PAGER $BYOBU_PREFIX/share/doc/byobu/help.tmux.txt'"

that way the command will be executed in a posix shell (most likely bash)

Related branches

Dustin Kirkland  (kirkland) wrote :

This was released in Byobu 5.88

Changed in byobu:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers