Poll

[ Fill out Poll ] [ View Poll Results ] [ Discuss Results ]

Poll #1630 Command-Line Interfaces
Open to: All, detailed results viewable to: All, participants: 4

For folks who use command-line tools: if a command has both a "display version number" option and a "more verbose output" option, which of these is more intuitive (and/or less likely to be annoying)?

View Answers

-v = version; -V = verbose
1 (25.0%)

-V = version; -v = verbose
3 (75.0%)

Doesn't matter; either is good
0 (0.0%)

Ew, both suck; use getopt_long() and spell it out
0 (0.0%)

Er, what? Ooh, clicky!
0 (0.0%)

People still bother with command-line interfaces? (warning: I may mock you if you click this)
0 (0.0%)

If some combinations of command-line arguments might produce not-completely-obvious results, but those combinations are potentially useful so they should merely be warned about rather than disallowed, which of these seems more useful?

View Answers

-w to turn on warnings for the least obvious dangers; -W to add warnings just for folks not yet acclimated to the joys of Unixy deliciousness
1 (25.0%)

-w to turn on wanrnings of all possibly confusing combinations detected; -W to warn only about severe gotchas
0 (0.0%)

All warnings on by default, with "did you really mean that?" prompts, unless the user turns them off with an "I know what I'm doing" option
1 (25.0%)

Only warn about data-destroying potential-gaffes, and treat mere potential-inconveniences as "they probably meant to do that
1 (25.0%)

I'm not sure ... but ooh, clicky!
1 (25.0%)

Let's say you have a bunch of files in a directory (say, "arbeau.abc", "machaut.abc", and "frtrad.abc" in a directory named "french") and some or all are hard-links to (not copies of) entries in another directory (perhaps "french/arbeau.abc" also appears as "dance/arbeau.abc" and "french/machaut.abc" is the same file as "songs/machaut.abc") ... and you decide to modify all the files in that directory ("french") in a batch, using a tool that replaces files with edited versions and optionally saves backups (named *.bak or *~). Which of these sounds like the most correct behaviour (most likely to be desired, least likely to induce cursing)?

View Answers

Copy each file to its backup-name, then overwrite the original with the edited version (so dance/arbeau.abc is still linked to french/arbeau.abc and thus reflects the changes). This is what links are for.
2 (50.0%)

Heck, not only that, but it should try to ensure that symbolic links behave as much like hard links as possible in cases like this.
1 (25.0%)

Rename each file to its backup-name, then create a new file with the original name for the edited version (dance/arbeau.abc is now linked to french/arbeau.bak, and french.abc is a completely new file with no other links to it).
0 (0.0%)

Make it yet another command-line option, to choose between copy/overwrite and rename/create, and/or prompt the user to choose.
0 (0.0%)

It doesn't matter, because the only users likely to be using links that way in the first place are going to try it out with a couple of dummy files first to find out which way you're doing it.
1 (25.0%)

Wait, what's a "hard link"? Is that like an alias?[*]
0 (0.0%)