There are lots of GUI best practices. I am looking for best practices when developing a command line program.
For example, if I were creating a backup program what is best?
Consideration 1, invocation:
program.exe backup
program.exe /backup
program.exe -backup
program.exe --backup
Consideration 2, parameters:
program.exe backup "C:\file1.txt" "C:\file1.bak" (implicit source and destination)
program.exe backup -source "C:\file1.txt" -destination "C:\file1.bak" (explicit)
program.exe backup -source "C:\file1.txt" "C:\file2.txt" "C:\file3.txt" -destination "C:\files.bak" (multiple sources)
program.exe backup -source "C:\file1.txt" -source "C:\file2.txt" -source "C:\file3.txt" -destination "C:\files.bak" (multiple sources, alternative syntax)
Consideration 3, chaining:
program.exe backup "C:\file1.txt" "C:\file1.bak" backup "C:\file2.txt" "C:\file2.bak" (should this be allowed?)
Consideration 4, typing economy:
program.exe backup
program.exe bkp
program.exe b (should all these be aliases to the same command?)