I know I can run two commands back-to-back in the command line:
git add -u && git commit --amend --no-edit
I also have aliases setup using doskey
doskey a=git add $*
But how can I combine multiple commands in a single doskey alias?
doskey amend=git add -u && git commit --amend --no-edit
This fails by setting the doskey to the first command doskey amend=git add -u and then proceeds to immediately execute git commit --amend --no-edit at runtime instead of saving the composite command to the doskey alias.
I also tried quoting the whole thing:
doskey amend="git add -u && git commit --amend --no-edit"
But this fails too because it interprets the quotes literally:
'"git add -u && git commit --amend --no-edit"' is not recognized as an internal or external command, operable program or batch file.