diff options
Diffstat (limited to 'plugins/thefuck/thefuck.plugin.zsh')
-rw-r--r-- | plugins/thefuck/thefuck.plugin.zsh | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/plugins/thefuck/thefuck.plugin.zsh b/plugins/thefuck/thefuck.plugin.zsh index ac88e67de..2ab4eb6e2 100644 --- a/plugins/thefuck/thefuck.plugin.zsh +++ b/plugins/thefuck/thefuck.plugin.zsh @@ -5,7 +5,8 @@ if [[ -z $commands[thefuck] ]]; then fi # Register alias -eval "$(thefuck --alias)" +[[ ! -a $ZSH_CACHE_DIR/thefuck ]] && thefuck --alias > $ZSH_CACHE_DIR/thefuck +source $ZSH_CACHE_DIR/thefuck fuck-command-line() { local FUCK="$(THEFUCK_REQUIRE_CONFIRMATION=0 thefuck $(fc -ln -1 | tail -n 1) 2> /dev/null)" @@ -15,4 +16,6 @@ fuck-command-line() { } zle -N fuck-command-line # Defined shortcut keys: [Esc] [Esc] -bindkey "\e\e" fuck-command-line +bindkey -M emacs '\e\e' fuck-command-line +bindkey -M vicmd '\e\e' fuck-command-line +bindkey -M viins '\e\e' fuck-command-line |