Commit graph

28 commits

Author SHA1 Message Date
Jan Macku f8457290c4 fix(SC2148): add ShellCheck directive to bash completion scripts 2024-02-27 15:41:28 +01:00
Masatake YAMATO a5efb0cc2b shell-completion: add --xml-interface option of busctl to the rules
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
2023-04-11 11:47:56 +09:00
Dmitry V. Levin e873a9f18a treewide: fix unnecessary $ on arithmetic variables
This should fix shellcheck warning SC2004.
2023-04-01 01:48:44 +08:00
Zbigniew Jędrzejewski-Szmek 4e9183059a shell-completion/zsh: silence error when machinectl is not installed
This fixes a few unrelated issues:
- when ENABLE_MACHINED is false, machinectl is not installed, but _sd_machines
  is still used in a few places that want to complete -M and such.
  Also, bash completion calls machinectl in various places.
  Make missing machinectl mean "no machines" in this case, so
  that no error is generated in the callers.
- machinectl list --full would print multiple lines of output per machine,
  breaking grep, issue introduced in e2268fa437.
  Using --max-addresses=1 would fix the issue, but let's use
  --max-addresses=0 because we now can.
- the lists used in various places were slightly different for no good reason.
- don't use a subshell if not necessary.

The code for bash still uses the same combined list of images and running
machines for various commands. The zsh code uses images for start/clone, and
running machines for the rest. Maybe something to fix in the future.

Replaces #25048.
2022-10-20 09:58:00 +02:00
Michael Biebl 85fce6f42c Use https for gnu.org 2022-06-28 16:07:35 +02:00
Luca Boccassi 36ec026830 completion: fix 'unbound variables' errors
Fixes https://github.com/systemd/systemd/issues/19987
2021-06-22 14:56:47 +01:00
Yu Watanabe db9ecf0501 license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
Yu Watanabe e2268fa437 bash-completion: do not ellipsize machine name 2020-01-10 12:29:02 +09:00
Yu Watanabe 2a6c483b8c bash-completion: busctrl: support --full command line option 2020-01-10 12:22:08 +09:00
Yu Watanabe 6552c29edb shell-completion: do not truncate suggestions 2019-09-01 17:32:14 +02:00
Zbigniew Jędrzejewski-Szmek 843cfcb15c shell-completion: use 4 space indentation too
The same as in other places, indentation levels were all over the place.
2019-04-12 08:34:44 +02:00
Yu Watanabe 23bedfbc32 bash-completion: busctl: add 'emit' command support 2019-02-06 13:30:53 +01:00
Yu Watanabe f675a1f005 bash-completion: busctl: support --json and -j option 2018-12-14 08:55:38 +01:00
Zbigniew Jędrzejewski-Szmek d9b02e1697 tree-wide: drop copyright headers from frequent contributors
Fixes #9320.

for p in Shapovalov Chevalier Rozhkov Sievers Mack Herrmann Schmidt Rudenberg Sahani Landden Andersen Watanabe; do
  git grep -e 'Copyright.*'$p -l|xargs perl -i -0pe 's|/([*][*])?[*]\s+([*#]\s+)?Copyright[^\n]*'$p'[^\n]*\s*[*]([*][*])?/\n*|\n|gms; s|\s+([*#]\s+)?Copyright[^\n]*'$p'[^\n]*\n*|\n|gms'
done
2018-06-20 11:58:53 +02:00
Zbigniew Jędrzejewski-Szmek 0cd41d4dff Drop my copyright headers
perl -i -0pe 's/\s*Copyright © .... Zbigniew Jędrzejewski.*?\n/\n/gms' man/*xml
git grep -e 'Copyright.*Jędrzejewski' -l | xargs perl -i -0pe 's/(#\n)?# +Copyright © [0-9, -]+ Zbigniew Jędrzejewski.*?\n//gms'
git grep -e 'Copyright.*Jędrzejewski' -l | xargs perl -i -0pe 's/\s*\/\*\*\*\s+Copyright © [0-9, -]+ Zbigniew Jędrzejewski[^\n]*?\s*\*\*\*\/\s*/\n\n/gms'
git grep -e 'Copyright.*Jędrzejewski' -l | xargs perl -i -0pe 's/\s+Copyright © [0-9, -]+ Zbigniew Jędrzejewski[^\n]*//gms'
2018-06-14 13:03:20 +02:00
Lennart Poettering 96b2fb93c5 tree-wide: beautify remaining copyright statements
Let's unify an beautify our remaining copyright statements, with a
unicode ©. This means our copyright statements are now always formatted
the same way. Yay.
2018-06-14 10:20:21 +02:00
Zbigniew Jędrzejewski-Szmek 0887b0548b bash-completion: redirect introspection errors to null
If completion is attempted on an invalid path, busctl might respond with an error.
This shouldn't be seen, introspection is supposed to just fail silently.
2018-05-14 08:37:19 +02:00
Yu Watanabe 7f9c3ecad8 bash-completion: busctl: make variables local 2018-03-30 17:13:52 +09:00
Yu Watanabe 4cbb7c500a bash-completion: busctl: do not suggest "-" for signature
Fixes #8371.
2018-03-30 17:08:14 +09:00
Yu Watanabe 1e58b1dc40 bash-completion: busctl: suggests only writable properties for set-property 2018-03-30 17:06:50 +09:00
Yu Watanabe cdb8ec2d37 bash-completion: busctl: support more options and verbs 2018-01-10 23:11:00 +09:00
Zbigniew Jędrzejewski-Szmek 7059062c2f Add SPDX license headers to shell completion scripts 2017-11-19 19:08:15 +01:00
Lennart Poettering e275f5e204 shell-completion: add full support for completing busctl command lines, with services, objects, interfaces, members, and signatures 2014-12-23 22:44:32 +01:00
Kay Sievers 51e430a5b0 bash_completion: busctl - add support for --user mode 2014-04-04 08:24:22 -04:00
Thomas Hindoe Paaboel Andersen 17d47d8d2d busctl: add --no-legend and use in bash completion 2014-02-19 17:35:35 +01:00
Thomas Hindoe Paaboel Andersen 8ec76163ff busctl: update bash completion 2014-02-19 17:12:17 +01:00
Zbigniew Jędrzejewski-Szmek 3ce09b7da2 bash-completion: fix completion of complete verbs
When doing 'command verb<TAB>', the arguments for verb would be
proposed, but it is too early. We should complete verb first.

https://bugs.freedesktop.org/show_bug.cgi?id=74596
2014-02-06 00:45:00 -05:00
Zbigniew Jędrzejewski-Szmek 86cb0691b7 shell-completion: busctl 2013-12-05 21:33:08 -05:00