summaryrefslogtreecommitdiff
path: root/plugins/fuck/fuck.plugin.zsh
diff options
context:
space:
mode:
authorCristian Măgherușan-Stanciu <cristian.magherusan-stanciu@here.com>2015-05-06 18:40:03 +0200
committerRoland Chernov <it5@amur.net>2015-07-22 15:01:14 +0900
commit0da9a4be25d0feb968b21645a0654ea499f0cc9d (patch)
tree6a3f597e03c1e7f4b5b892617deceb4a31e16fdf /plugins/fuck/fuck.plugin.zsh
parente38455bf4f9b247d3e51298d39d18a90a7294438 (diff)
downloadzsh-0da9a4be25d0feb968b21645a0654ea499f0cc9d.tar.gz
zsh-0da9a4be25d0feb968b21645a0654ea499f0cc9d.tar.bz2
zsh-0da9a4be25d0feb968b21645a0654ea499f0cc9d.zip
fuck: added a basic plugin for https://github.com/nvbn/thefuck
Diffstat (limited to 'plugins/fuck/fuck.plugin.zsh')
-rw-r--r--plugins/fuck/fuck.plugin.zsh6
1 files changed, 6 insertions, 0 deletions
diff --git a/plugins/fuck/fuck.plugin.zsh b/plugins/fuck/fuck.plugin.zsh
new file mode 100644
index 000000000..1a3b474fc
--- /dev/null
+++ b/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