Automating Daily Tasks
- 1 minSummary:
One way to speed up daily routines, or at least make it fun: making command-line shortcuts with aliases.
Inspired by:
- Edmond Lau’s book The Effective Engineer, which I just started reading and got me started thinking about how I could make daily tasks quicker
- Seema Ullal’s presentation at Hackbright on Git, especially the portion of her talk on setting up our terminals–this is an article she referenced
How I made my aliases
- open
~/.bash_profile
with your text editor - in the file, type
alias [name]='[whatever command you want to be shortened]'
- From this page, I found that you can just use the application name with
'open' -a
and a link to whatever you want the application to open. This works with opening Spotify with a Spotify URL, such as that of a playlist! Examples:
alias mcs='open -a "Google Chrome" https://www.youtube.com/user/mycodeschool/playlists'
alias mov_sc='open -a "Spotify" https://open.spotify.com/user/jmichellekim/playlist/5I12pB2PExI0YNbU2tEbhd'
Save bash_profile and try it out:
- Reload or open a new tab in terminal
- Type just the alias and return
Applications
- Going to a YouTube playlist you frequent
- Playing your favorite Spotify playlist quickly