Skip to content

Instantly share code, notes, and snippets.

@Masterxilo
Last active September 19, 2020 07:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Masterxilo/f1967743fda3a1aded56ebaff4dd097b to your computer and use it in GitHub Desktop.
Save Masterxilo/f1967743fda3a1aded56ebaff4dd097b to your computer and use it in GitHub Desktop.
# Add permalias command to my bash shell
# from
# https://askubuntu.com/questions/1414/how-to-create-a-permanent-alias
# https://askubuntu.com/a/80290/521770
#
# installation:
# { curl -s https://gist.githubusercontent.com/Masterxilo/f1967743fda3a1aded56ebaff4dd097b/raw/permalias | source /dev/stdin ; source ~/.bashrc ; }
#
cat >> ~/.bashrc <<EOF
# usage example:
# permalias cls=clear
function permalias ()
{
alias "\$@";
echo alias "\$@" >> ~/.bash_aliases
}
EOF
echo "installed permalias"
# the program is not run without an extra newline
@Logan1x
Copy link

Logan1x commented Sep 19, 2020

I am getting bash: permalias: command not found in manjaro Linux. Any idea about that?

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