aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/completion11
-rw-r--r--src/slack.c4
2 files changed, 13 insertions, 2 deletions
diff --git a/src/completion b/src/completion
new file mode 100644
index 0000000..45637e5
--- /dev/null
+++ b/src/completion
@@ -0,0 +1,11 @@
+(slack
+ (default (arg VERB_INTERVAL_OR_COMMAND) (files -r) (suggest cmd)
+ (desc 'Specify which command to run'))
+
+ (unargumented (options --fatal)
+ (complete --fatal)
+ (desc 'Fail if the timer slack cannot be set'))
+
+ (suggestion cmd (verbatim get GET reset INTERVAL COMMAND))
+)
+
diff --git a/src/slack.c b/src/slack.c
index 7e829fc..1895e50 100644
--- a/src/slack.c
+++ b/src/slack.c
@@ -31,11 +31,11 @@
static void usage(void)
{
- printf("USAGE: slack (get | GET | (reset | <interval> <options...> [--fatal] [--] <command...>))\n");
+ printf("USAGE: slack (get | GET | ((reset | <interval>) [--fatal] [--] <command...>))\n");
printf("\n");
printf("The <interval> must be a positive number optionally with a suffix:\n");
printf(" ns n nanoseconds (default)\n");
- printf(" µs µ ns n microseconds\n");
+ printf(" µs µ us u microseconds\n");
printf(" ms m milliseconds\n");
printf(" s seconds\n");
printf("\n");