Issue
I've often been tempted with the idea of using an alias to modify the default behavior of a command line tool. For example, I often want to resolve the actual path after following a symlink (and have never wanted to maintain the symlink path), so I was thinking about adding something to my .bash_profile file, to make this the default behavior, e.g.:
alias cd="cd -P"
Is this bad or dangerous for any reason? If not for this example, is it a bad idea in general? It makes me feel a little dirty...
Solution
It's a very common technique. Here are some common examples.
alias egrep='egrep --color=auto'
alias fgrep='fgrep --color=auto'
alias grep='grep --color=auto'
alias ls='ls --color=auto'
alias make='make -j20'
If later you want to run without the alias you can \ the first letter or put the command in quotes, as in
\ls
"ls"
Answered By - walrii Answer Checked By - Katrina (WPSolving Volunteer)