Commit 8e8a1339 authored by Black Roland's avatar Black Roland Committed by Roland Chernov
Browse files

Thefuck: combined with @cristim plugin. Code formating

parent 803e5dbb
if [[ -n $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
if [[ -z $commands[thefuck] ]]; then
echo 'thefuck is not installed, you should "pip install thefuck" first'
return -1
fi
alias fuck='eval $(thefuck $(fc -ln -1 | tail -n 1)); fc -R'
alias FUCK='fuck'
fuck-command-line() {
FUCK=$(thefuck $(fc -ln -1 | tail -n 1) 2> /dev/null)
[ -z $FUCK ] && echo -n -e "\a" && return
FUCK="$(thefuck $(fc -ln -1 | tail -n 1) 2> /dev/null)"
[[ -z $FUCK ]] && echo -n -e "\a" && return
BUFFER=$FUCK
zle end-of-line
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment