Skip to content

Instantly share code, notes, and snippets.

@MaxPleaner
Last active February 13, 2016 22:15
Show Gist options
  • Save MaxPleaner/9a7d5ee11eb16c557e46 to your computer and use it in GitHub Desktop.
Save MaxPleaner/9a7d5ee11eb16c557e46 to your computer and use it in GitHub Desktop.
$ echo -e "function alia { \n echo -e \"\n function \$1 { \n \$2 \n }\" >> ~/.bashrc \n }" >> ~/.bashrc
# restart shell to use
# usage: $ alia "name" "cmd"
# e.g.: $ alia "gac" "git add -A; git commit -m \"\$1\" "
# $ bash
# $ gac "my commit message"
#
# $1 refers to a variable
# note that $ and " characters are escaped in the alias content
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment