Is there a way to change the command
xdg-open to the more simple
open? Including the ability to pass a path to it? For example, instead of typing
xdg-open ., I'd like to simply type
You can alias anything you like (but check that the command you want to use doesn't already exist first:
type open should tell you
not found) Make a backup of your
~/.bashrc and define the alias:
cp .bashrc bashrc-bak nano .bashrc
Add at the end
Or if you want to avoid seeing any warnings from the program that is called, discard output with a redirection as suggested by TalkLittle:
alias open='xdg-open &>/dev/null'
Save and exit, then type
source .bashrc to use the alias immediately. The alias will take arguments just like the full command, of course.