aboutsummaryrefslogtreecommitdiffhomepage
path: root/share/completions
diff options
context:
space:
mode:
authorGravatar Fabian Homborg <FHomborg@gmail.com>2015-08-05 17:45:36 +0200
committerGravatar Fabian Homborg <FHomborg@gmail.com>2015-08-05 17:45:36 +0200
commite196203320de33d01013d7e2449774d6cb506172 (patch)
tree1eea0c3cc03b44fa1b1562f4b71a0bb6b3503a99 /share/completions
parent33d062cb60a66d9f03dde1e69db37e1cd864f854 (diff)
Add completion for systemd's timedatectl
Diffstat (limited to 'share/completions')
-rw-r--r--share/completions/timedatectl.fish19
1 files changed, 19 insertions, 0 deletions
diff --git a/share/completions/timedatectl.fish b/share/completions/timedatectl.fish
new file mode 100644
index 00000000..ba67e993
--- /dev/null
+++ b/share/completions/timedatectl.fish
@@ -0,0 +1,19 @@
+set -l commands status set-time{,zone} list-timezones set-local-rtc set-ntp
+
+complete -c timedatectl -f
+complete -c timedatectl -n "not __fish_seen_subcommand_from $commands" -a "status"
+complete -c timedatectl -n "not __fish_seen_subcommand_from $commands" -a "set-time"
+complete -c timedatectl -n "not __fish_seen_subcommand_from $commands" -a "set-timezone"
+complete -c timedatectl -n "__fish_seen_subcommand_from set-timezone" -a "(timedatectl list-timezones)"
+complete -c timedatectl -n "not __fish_seen_subcommand_from $commands" -a "list-timezones"
+complete -c timedatectl -n "not __fish_seen_subcommand_from $commands" -a "set-local-rtc" -d "Maintain RTC in local time"
+complete -c timedatectl -n "__fish_seen_subcommand_from set-local-rtc" -a "true false"
+complete -c timedatectl -n "__fish_seen_subcommand_from set-local-rtc" -l adjust-system-clock --description 'Synchronize system clock from the RTC'
+complete -c timedatectl -n "not __fish_seen_subcommand_from $commands" -a "set-ntp" -d "Use NTP"
+complete -c timedatectl -n "__fish_seen_subcommand_from set-ntp" -a "true false"
+complete -c timedatectl -l no-ask-password --description "Don't ask for password"
+complete -c timedatectl -s H -l host --description 'Execute the operation on a remote host'
+complete -c timedatectl -s M -l machine --description 'Execute operation on a local container'
+complete -c timedatectl -s h -l help --description 'Print a short help text and exit'
+complete -c timedatectl -l version --description 'Print a short version string and exit'
+complete -c timedatectl -l no-pager --description 'Do not pipe output into a pager'