Como obter a tela de ajuda do byobu (shift-F1) para funcionar sob um shell de login de peixe?

1

Eu posso pegar o Shift-F1 para mostrar a ajuda de um usuário que tem peixe como shell de login.

Eu vejo uma mensagem de erro que é rapidamente sobrescrita.

Diz

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'.

Se eu alterar o shell de login de volta para /bin/bash com chsh , então, Shift-F1 mostrará a página de ajuda conforme o esperado.

    
por ecerulm 14.11.2014 / 12:53

1 resposta

1

Depois de investigar um pouco, parece que Shift-F1 é keybinding definido em /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'

E esse comando falha porque é executado no shell de peixe e o shell de peixe não permite que uma variável seja usada como um comando.

Alterando a ligação para

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

funcionará, pois usará sh para executar o comando.

    
por 14.11.2014 / 12:53

Tags