Skip to content

Instantly share code, notes, and snippets.

@benyarb
Last active August 29, 2015 13:56
Show Gist options
  • Save benyarb/8866515 to your computer and use it in GitHub Desktop.
Save benyarb/8866515 to your computer and use it in GitHub Desktop.
ZSH Project Alias Convention
#-----------------
# Projects
#-----------------
## convention:
# cmd: [c|g|w|u|r*] [proj]
# c: cd
# 'cd [proj]'
# g: git
# 'cd [proj], git pull, git status'
# w: work
# 'cd [proj], git pull, [init?], ls -l, git status, subl .'
# u: upload (push/deploy)
# 'cd [proj], ls -l, git status, git commit -a, git push, [deploy?]'
# r*: run // * omit prefix, [proj] cmd runs the app
# 'cd [proj], [init?], [run]'
#
## template:
# alias cX='cd [dir]'
# alias gX='cd [dir] && g p && gll'
# alias wX='cd [dir] && g p && [init?] && gll && subl .'
# alias uX='cd [dir] && gll && g c-a && g u && [deploy?]'
# alias X='cd [dir] && [init?] && [run]'
#
## example:
# alias cportal='cd ~/Sites/Portal/'
# alias gportal='cportal && g p && gll && grails clean'
# alias wportal='gportal && subl .'
# alias uportal='cportal && gll && g c-a && g u'
# alias portal='cportal && mysql.server stop && mysql.server start && grails clean && grails run-app'
##
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment