7a13a407e92dc6780355f67018bb03da81a73b8f
- Author
- Roland Chernov <mail@9241406380.org>
- Committer
- Roland Chernov <mail@9241406380.org>
- Date
Message
Added thefuck plugin https://github.com/nvbn/thefuck
Diff
1diff --git a/plugins/thefuck/thefuck.plugin.zsh b/plugins/thefuck/thefuck.plugin.zsh
2new file mode 100644
3index 0000000000000000000000000000000000000000..81461d48e33e846726f16b295da47550ba431658
4--- /dev/null
5+++ b/plugins/thefuck/thefuck.plugin.zsh
6@@ -0,0 +1,9 @@
7+fuck-command-line() {
8+ FUCK=$(thefuck $(fc -ln -1 | tail -n 1) 2> /dev/null)
9+ [ -z $FUCK ] && echo -n -e "\a" && return
10+ BUFFER=$FUCK
11+ zle end-of-line
12+}
13+zle -N fuck-command-line
14+# Defined shortcut keys: [Esc] [Esc]
15+bindkey "\e\e" fuck-command-line