Skip to content

Instantly share code, notes, and snippets.

@pneff
Last active December 22, 2015 21:39
Show Gist options
  • Save pneff/6534459 to your computer and use it in GitHub Desktop.
Save pneff/6534459 to your computer and use it in GitHub Desktop.
palias command

This is a little script I use to avoid having to edit any files when I define a new alias.

Example usage:

$ palias g=git

This file needs to be sources from the main bash config file.

# `palias` command. Same as `alias` but persists the aliases in this file.
PALIAS_FILE=~/.profiledir/palias.sh
palias () {
if alias "$*"; then
echo alias \""$*"\" >>$PALIAS_FILE
fi
}
# START: ALIASES
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment