I have asked how to make any command "ask for yes/no before executing" in the question
In Bash, how to add "Are you sure [Y/n]" to any command or alias?
It seems like for the command
hg push ssh://username@www.example.com//somepath/morepath
I can also do this
echo ssh://username@www.example.com//somepath/morepath | xargs -p hg push
The -p
is the one that does the trick. This will be set
as an alias, such as hgpushrepo
. Is this a good way,
any pitfalls, or any better alternatives to do it? I was
hoping to use something that is standard Unix/Bash
instead of writing a script to do it.