Posted by Shane Becker on
<p>I use <a href="http://www.apple.com/macosx/technology/unix.html" title="Apple - Mac OS X Leopard - Technology - UNIX">the standard shell</a> in <a href="http://www.apple.com/macosx/" title="Apple - Mac OS X Leopard">OS X</a> which is <a href="http://en.wikipedia.org/wiki/Bash" title="Bash - Wikipedia, the free encyclopedia">bash</a>. A while back I learned about aliases and got hooked. Now I have <a href="http://www.hypexr.org/bash_tutorial.php#alias" title="BASH Help - A Bash Tutorial">bash aliases</a> all over my workflow.</p>
<p>Some are specific to my work or projects, though most are not. I'm sure some of these could be a little better here and there, but I'm pretty happy with the state of things.</p>
<p>If you have any good ones that I would like send them over in the comments.</p>
<p>So without further Apu, here is my .bash_login contents.</p>
<pre><span class="source source_shell"><span class="comment comment_line comment_line_number-sign comment_line_number-sign_shell"><span class="punctuation punctuation_definition punctuation_definition_comment punctuation_definition_comment_shell">#</span> path and shell vars
</span> <span class="storage storage_modifier storage_modifier_shell">export</span> PATH=<span class="string string_quoted string_quoted_double string_quoted_double_shell"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_shell">"</span>/opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:<span class="variable variable_other variable_other_normal variable_other_normal_shell"><span class="punctuation punctuation_definition punctuation_definition_variable punctuation_definition_variable_shell">$</span>PATH</span><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_shell">"</span></span>
<span class="storage storage_modifier storage_modifier_shell">export</span> P4CONFIG=.p4config
<span class="storage storage_modifier storage_modifier_shell">export</span> SVN_EDITOR=<span class="string string_quoted string_quoted_double string_quoted_double_shell"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_shell">"</span>mate -w<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_shell">"</span></span>
<span class="comment comment_line comment_line_number-sign comment_line_number-sign_shell"><span class="punctuation punctuation_definition punctuation_definition_comment punctuation_definition_comment_shell">#</span> unix navigating </span> alias home=<span class="string string_quoted string_quoted_double string_quoted_double_shell"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_shell">"</span>cd ~<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_shell">"</span></span> alias la=<span class="string string_quoted string_quoted_single string_quoted_single_shell"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_shell">'</span>ls -la<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_shell">'</span></span> alias ll=<span class="string string_quoted string_quoted_single string_quoted_single_shell"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_shell">'</span>ls -l<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_shell">'</span></span> alias ..=<span class="string string_quoted string_quoted_single string_quoted_single_shell"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_shell">'</span>cd ..<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_shell">'</span></span> alias ...=<span class="string string_quoted string_quoted_single string_quoted_single_shell"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_shell">'</span>cd ../..<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_shell">'</span></span> alias o=<span class="string string_quoted string_quoted_single string_quoted_single_shell"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_shell">'</span>open .<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_shell">'</span></span>
# rails alias ss=β./script/serverβ alias sse=β./script/server -e liveβ alias mig=β./script/generate migrationβ alias gen=β./script/generate β alias scaf=β./script/generate scaffold_resourceβ alias con=β./script/consoleβ alias mod=β./script/generate modelβ alias cont=β./script/generate controllerβ alias dbm=βrake db:migrateβ alias cl=βrake log:clearβ alias ann=βrake annotate_modelsβ alias fix=βrake db:fixtures:loadβ alias nuke=βrake app:db:nukeβ
# misc alias sgi=βsudo gem installβ alias c=βcheatβ alias mydb=βmysqladmin -u root createβ alias a=βautotestβ alias comics=βruby /Users/s/scripts/the_dreaming/new_comics.rbβ
# adready alias live=βrake live:data:updateβ alias dbml=βrake db:migrate RAILS_ENV=liveβ alias adready=βsup; rake db:remigrate; rake db:remigrate RAILS_ENV=live; dbm; rake db:test:prepare; liveβ
# merb alias mmig=β./script/new_migrationβ
# textmate alias sub=βmate app config db public test specβ alias subb=βmate app config test specβ alias app=βmate app public testβ alias m=βmateβ alias e=βmate . &β alias table=βruby ~/scripts/table_maker.rbβ
# bash profile alias ebash=βmate ~/.bash_login &β alias rbash=βsource ~/.bash_loginβ
# go to my projects alias work=βcd ~/workβ alias ven=βcd ~/work/vendoβ alias vent=βcd ~/work/vendo/trunkβ alias w3=βcd ~/work/vendo/branches/wave_3β alias w3=βcd ~/work/vendo/branches/wave_4β
# git alias gpl=βgit pullβ
# svn alias sst=βsvn stβ alias sci=βsvn ciβ alias scim=βsvn ci -mβ alias sad=βsvn status | grep β^\?β | awk β{print $2}β | xargs svn addβ alias sup=βsvn upβ alias srm=βsvn rmβ
</span></pre>