I have asked how to make any command "ask for yes/no before executing" in the question
It seems like for the command
hg push ssh://[email protected]//somepath/morepath
I can also do this:
echo ssh://[email protected]//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.