aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem@fripost.org>2015-03-29 14:52:36 +0200
committerGuilhem Moulin <guilhem@fripost.org>2015-03-29 14:55:57 +0200
commit5827d41f6f7ca96eda7ffa91a375217bda0bb4dd (patch)
tree812b22e4b06087479e82c6c7ccdfd41e98932e4a
parentd5c7b0189ae05b99a2ed496df5445089cbf562e8 (diff)
Use -h not -? as short hand for --help
-rw-r--r--cli/bash-completion.sh2
-rwxr-xr-xcli/icevault6
2 files changed, 4 insertions, 4 deletions
diff --git a/cli/bash-completion.sh b/cli/bash-completion.sh
index e1c6424..e1ae871 100644
--- a/cli/bash-completion.sh
+++ b/cli/bash-completion.sh
@@ -43,7 +43,7 @@ _icevault() {
reencrypt) opts=; nargs=-1 ;;
rm) opts='-f --force -r --recursive'; nargs=-1;;
esac
- opts="${opts:+$opts }--debug -? --help --version"
+ opts="${opts:+$opts }--debug -h --help --version"
if [ "$cmd" = git ]; then
# use bash completion for git by ignoring the first word ('icevault')
diff --git a/cli/icevault b/cli/icevault
index 1f662bf..d9a6792 100755
--- a/cli/icevault
+++ b/cli/icevault
@@ -657,7 +657,7 @@ my @USAGE = (
rm => "[-f, --force] [-r, --recursive] scheme://[hostname/[identity]] ...",
);
-if ($ARGV[0] eq '--help' or $ARGV[0] eq '-?') {
+if ($ARGV[0] eq '--help' or $ARGV[0] eq '-h') {
my $default_cmd = shift @USAGE;
my $default_usage = shift @USAGE;
print "Usage: $NAME [$default_cmd] $default_usage\n";
@@ -698,7 +698,7 @@ sub usage(@) {
sub getopts(%) {
my @opts = @_;
my %opts = @opts;
- usage(@opts) unless GetOptions(\%CONFIG, qw/debug help|?/, keys %opts) and !$CONFIG{help};
+ usage(@opts) unless GetOptions(\%CONFIG, qw/debug help|h/, keys %opts) and !$CONFIG{help};
loadConfig();
}
@@ -1198,5 +1198,5 @@ elsif ($COMMAND eq 'rm') {
else {
print STDERR "Usage: $NAME [COMMAND] [OPTION ...] [ARG ...]\n";
- error "Unknown command C<%s>. Try C<%s> for more information.", $COMMAND, "$NAME --help";
+ error "Unknown command C<%s>. Try C<%s> or consult the manpage for more information.", $COMMAND, "$NAME --help";
}