thefuck.plugin.zsh 260 B

123456789
  1. fuck-command-line() {
  2. FUCK=$(thefuck $(fc -ln -1 | tail -n 1) 2> /dev/null)
  3. [ -z $FUCK ] && echo -n -e "\a" && return
  4. BUFFER=$FUCK
  5. zle end-of-line
  6. }
  7. zle -N fuck-command-line
  8. # Defined shortcut keys: [Esc] [Esc]
  9. bindkey "\e\e" fuck-command-line