浏览代码

Thefuck: replaced static alias with `eval "$(thefuck-alias)"`

Roland Chernov 9 年之前
父节点
当前提交
54e27406dc
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      plugins/thefuck/thefuck.plugin.zsh

+ 2 - 2
plugins/thefuck/thefuck.plugin.zsh

@@ -3,8 +3,8 @@ if [[ -z $commands[thefuck] ]]; then
     return -1
 fi
 
-alias fuck='eval $(thefuck $(fc -ln -1 | tail -n 1)); fc -R'
-alias FUCK='fuck'
+# Register alias
+eval "$(thefuck-alias)"
 
 fuck-command-line() {
     FUCK="$(thefuck $(fc -ln -1 | tail -n 1) 2> /dev/null)"