Wow. Just wow. :/
272 karma · joined June 18, 2011
and yeah, typing the actual command into the terminal is always going to be 'simpler'
bindkey '^Q' push-line
The 'push-line' widget allows you to quickly type another command and will restore the previous one once you've entered it. # re-run the previous command with sudo
rerun-with-sudo () {
LBUFFER="sudo !!"
zle accept-line
}
zle -N rerun-with-sudo
bindkey '^Xx' rerun-with-sudo
Re-run the previous command prefixed with sudo by typing ^X then x.And:-
# build git clone command from clipboard
git-clone-clipboard() {
REPO_URL="$($CLIPBOARD)"
REPO_BASE_NAME=${$(basename $REPO_URL)%.git}
LBUFFER="nocorrect git clone $REPO_URL $REPO_BASE_NAME"
}
zle -N git-clone-clipboard
bindkey "^Xg" git-clone-clipboard
^Xg prefixes a git url with "git clone" and fills out the command line.Couple similar things for wget, youtube-dl here: https://github.com/gaving/dotfiles/blob/master/.zsh/config
Also, I don't think the guy really "knew" the answer to the question and had legitimate gripes as you would if a project you've been working on for the last x years was suddenly canned.
Allows you to do all your wiki pages in markdown and a sleugh of other markup formats. Plus, did I mention git backed?!
I realise there is a fork going, but Ultisnips is providing a ton more features and seems a lot nicer in many aspects.