4 ms·
I use most of the oh-my-zsh builtins. The git ones save a ton of time and G='|grep' is brilliant. alias GD='git diff HEAD~1 HEAD' alias grv='git review
by danwakefield 11y ago
I use most of the oh-my-zsh builtins. The git ones save a ton of time and G='|grep' is brilliant.
alias GD='git diff HEAD~1 HEAD'
alias grv='git review'
alias gunmod='git status | grep "modified" | awk "{print \$2}" | xargs -I{} git checkout -- {}'
alias gv='gvim --remote-silent'
alias json='| python -m json.tool'
alias vg='vagrant'
alias ans='ansible '
alias ansp='ansible-playbook '
alias vv='virtualenv venv'
alias vvp='venv/bin/python'
alias vvpi='venv/bin/python setup.py develop'
alias yt='cd $HOME/downloads; youtube-dl --verbose'
alias yt3='cd $HOME/downloads; youtube-dl --verbose --extract-audio --audio-format mp3 '
I keep all of my shell history, right now it think it goes back ~3 years, so every now and then I filter it by frequency and check if I am using a command often enough to justify an alias. Works quite well
- egwynn 11y ago> alias json='| python -m json.tool' Is the beginning pipe intended? If I just run 'python -m json.tool' then it starts reading from stdin by itself (and works as intended). And with the pipe, I can’t seem to make the alias work. $ echo '{ "foo": 1234}' | json -bash: syntax error near unexpected token `|' $ json -bash: syntax error near unexpected token `|'
- danwakefield 11y agoyeah, thats my bad, A recent addition and I must have copied too much of the command line when adding it.