浏览代码

fuck: added a basic plugin for https://github.com/nvbn/thefuck

Cristian Măgherușan-Stanciu 10 年之前
父节点
当前提交
0da9a4be25
共有 1 个文件被更改,包括 6 次插入0 次删除
  1. 6 0
      plugins/fuck/fuck.plugin.zsh

+ 6 - 0
plugins/fuck/fuck.plugin.zsh

@@ -0,0 +1,6 @@
+if [ $commands[thefuck] ]; then
+  alias fuck='eval $(thefuck $(fc -ln -1 | tail -n 1)); fc -R'
+  alias FUCK='fuck'
+else
+  echo 'thefuck is not installed, you should "pip install thefuck" first'
+fi