zsh: bindkey to only bind spaces not working

0

I run this command in my zsh: bindkey -s ' ' 'ls\n' and it was working nicely, when I press space twice, the ls command is executed. But when I add the exact same line to my .zshrc it does not recognice the two spaces as a key binding. What am I doing wrong? I also use oh-my-zsh.

Natjo

Posted 2017-07-23T12:57:46.203

Reputation: 335

1Can you confirm that the key binding is in fact defined in the shell after adding it to ~/.zshrc? That is, what does bindkey ' ' return? – Adaephon – 2017-07-24T18:23:53.477

I figured out the problem, I sourced oh-my-zsh.sh after the bindkey command. After doing this before my bindkey commands, everything works. – Natjo – 2017-07-24T19:09:03.890

No answers