Skip to content

Instantly share code, notes, and snippets.

@lackdaz
Last active October 5, 2018 19:01
Show Gist options
  • Select an option

  • Save lackdaz/fa5a130f40f2b6852f96a985d4a6806d to your computer and use it in GitHub Desktop.

Select an option

Save lackdaz/fa5a130f40f2b6852f96a985d4a6806d to your computer and use it in GitHub Desktop.
an alias to parse your .aliases file (or .bashrc, .profile) for aliases and their documentation
alias alias-ls='cat ~/.aliases | grep -i "^alias" | grep -v "#{3}" | awk -F"[ =]" '\''{print $2 "\t" substr($0, index($0, "#") + 1)}'\''' # List Aliases
@lackdaz
Copy link
Copy Markdown
Author

lackdaz commented Oct 5, 2018

  1. Create a bash file .aliases in your home directory (or change the gist accordingly)
  2. source ~/.aliases (or your own filepath)
  3. create aliases, e.g. alias ssh-pi='ssh pi@192.168.1.255' # ssh into your raspberry pi
  4. type alias-ls and it should show all of your aliases and their corresponding description/action

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment