summaryrefslogtreecommitdiffstats
path: root/shell-completion (follow)
Commit message (Collapse)AuthorAgeFilesLines
* shell-completion: include units in 'verify' completionsFrantisek Sumsal2023-07-241-14/+11
| | | | Resolves: #28500
* zsh: use glob matching for template namesRonan Pigott2023-07-201-1/+4
| | | | | | Template names can be learned from the filesystem, so there isn't a need to parse the output of systemctl list-unit-files in this case. This should accelerate the completion of some verbs like enable.
* zsh: remove unit property cachingRonan Pigott2023-07-191-7/+3
| | | | | | | The existing caching policy isn't very sensible for this cache. We could write a different policy, but I don't think there is much value in caching these values, as in my experience the command used to generate them is quick.
* zsh: update default caching policy for unitsRonan Pigott2023-07-191-12/+5
| | | | | | | | | | | | | | | | | | | | | | | The existing caching policy was completely bogus. In the first stanza, despite the comment, the pattern given would consider the cache invalid if it was more than 1 hour old. The second stanza was also incorrect, since the output of `systemctl --all` is not unit file paths, but unit names. When they were being tested against the cachefile mtime, the test would always fail becuase of the nonexistant file (hopefully). In fact it's not very useful to test if the unit files have newer mtime in this case anyway, since we are only caching their names. Also, `systemctl --all` is an unfortunately slow operation to be used in testing for the cache validity — we want this operation to at least be faster than rebuilding the cache. I've rewritten this stanza with my best guess at its original intent. It now checks against the mtime of the parent directories in the search path, which should be updated and cause the cache to rebuild when we add, remove, or rename any unit files.
* zsh: stop forcing unit file cache rebuildsRonan Pigott2023-07-181-4/+2
| | | | | | Rebuilding whenever the cached parameter is not set forces each new shell to rebuild the cache, which often defeates the purpose of caching in the first place.
* zsh: default to system manager when not specifiedRonan Pigott2023-07-181-3/+2
| | | | | | | | | This used to work correctly, before the change was reverted in e09d0d46c297. In fact it is important to specify the manager explicity in the completion because the argument is reused in the caching policies. An empty argument here caused the completion to create separate caches with and without the --system parameter. We can simplify the given pattern a little here too.
* zsh: suppress aliases and shell functions when calling systemctlRonan Pigott2023-07-181-1/+1
| | | | | This prevents any errors in case the user had aliased some arguments following systemctl.
* zsh: typo in systemctl completionsRonan Pigott2023-07-181-1/+1
|
* shell-completion: add show-cache to bashLuca Boccassi2023-07-071-1/+1
|
* shell-completion: add whoami to bashLuca Boccassi2023-07-071-1/+1
|
* shell-completion: add soft-reboot to bashLuca Boccassi2023-07-071-1/+1
|
* shell-completion/zsh/resolvectl: add show-cacheChristian Hesse2023-07-071-0/+1
| | | | Make zsh shell-completion aware of show-cache.
* shell-completion/zsh/systemctl: add whoamiChristian Hesse2023-07-071-0/+1
| | | | Make zsh shell-completion aware of whoami.
* shell-completion/zsh/systemctl: add soft-rebootChristian Hesse2023-07-071-0/+1
| | | | Make zsh shell-completion aware of soft-reboot.
* detect-virt: add --list-cvm optionDaniel P. Berrangé2023-07-061-1/+1
| | | | | | | | The --list-cvm option reports the known types of confidential virtualization technology that can be detected. Related: https://github.com/systemd/systemd/issues/27604 Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
* detect-virt: add --cvm optionDaniel P. Berrangé2023-07-061-1/+1
| | | | | | | | The --cvm option detects whether the OS is running inside a confidential virtual machine. Related: https://github.com/systemd/systemd/issues/27604 Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
* resolved: added serve stale feature implementation of RFC 8767Kiran Vemula2023-06-161-1/+1
| | | | | | | serve stale feature to keep the DNS resource records beyond TTL to return them as stale records in case of upstream server is not reachable or returns negative response. SD_RESOLVED_NO_STALE flag has been added to disable serving stale records via dbus. added serve stale test cases to TEST-75-RESOLVED Fixes: #21815
* Merge pull request #26728 from keszybz/meson-updateLennart Poettering2023-06-131-1/+1
|\ | | | | Meson version update
| * meson: bump required version to 0.56.0Yu Watanabe2023-06-121-1/+1
| |
* | Fix zsh completion for "localectl set-locale"Cyril Roelandt2023-06-071-1/+1
|/ | | | | | | | | | | | | | | | | | When running: $ localectl set-locale LC_MESSAGES=<TAB> One is prompted with a list of locale fields instead of the list of valid locales. This is because by calling "compset -P1 '*='", we modify the $PREFIX special parameter before testing whether it contains an equal sign. Therefore if [[ -prefix 1 *\= ]] is always false, and we always suggest a list of locale fields to the user. Fixes: #27955
* udev: downgrade log level about style issuesYu Watanabe2023-06-052-1/+2
| | | | And add --no-style switch that make style issues not critical.
* zsh: amend completion for networkctl editRonan Pigott2023-05-221-3/+7
|
* udevadm-verify: introduce --no-summary optionDmitry V. Levin2023-05-212-1/+2
| | | | | | When udevadm verify is invoked by an analyzer tool like rpminspect to verify individual udev rules files, the summary just clutters the output, so provide an option to turn the summary off.
* shell completion: add timesync-status and show-timesync to zsh completion ↵Marko Korhonen2023-05-081-0/+2
| | | | | file (#27574) Fixes #27560
* zsh: add service-log-{level,target} completions for systemctlRonan Pigott2023-05-081-0/+26
|
* zsh: remove usage of PREFIX in _systemctlRonan Pigott2023-05-051-14/+14
| | | | | | | | | | | | | | | | | | | | | The usage of PREFIX in this completion is mostly counter to the intended usage of compsys in zsh. It is generally expected that completion code provide the available completions and tags in that word position so that compsys, with user configuration, can filter them to the appropriate set. One egregious error caused by the usage of PREFIX here is the caching of SYS_ALL_UNITS, which stored only the unit names prematurely filtered by the completion prefix, affecting all future completions. For example, $ systemctl cat nonsense<TAB> might find no matching units if nonsense* has no matches, but now $ systemctl cat <TAB> will fail in all future completions even though every unit file is a valid match, because the cached set has been erroneously filtered by the last prefix.
* coredumpctl: add --file/--root/--image to bash completionLuca Boccassi2023-04-291-3/+3
|
* coredumpctl: fix bash completion matchingLuca Boccassi2023-04-291-3/+3
| | | | | When multi-word matching string is quoted, __contains_word compares it as a whole to the passed option, so it doesn't work.
* portablectl: add --extension to bash completionLuca Boccassi2023-04-261-1/+5
|
* shell-completion: add --xml-interface option of busctl to the rulesMasatake YAMATO2023-04-112-1/+2
| | | | Signed-off-by: Masatake YAMATO <yamato@redhat.com>
* confext: shell completion for systemd-confextmaanyagoenka2023-04-051-0/+85
|
* treewide: fix unnecessary $ on arithmetic variablesDmitry V. Levin2023-03-312-2/+2
| | | | This should fix shellcheck warning SC2004.
* Merge pull request #26641 from medhefgo/boot-elf2efiYu Watanabe2023-03-112-2/+2
|\ | | | | boot: Drop gnu-efi / Add elf2efi.py
| * tree-wide: Drop gnu-efiJan Janssen2023-03-102-2/+2
| | | | | | | | | | | | | | This drops all mentions of gnu-efi and its manual build machinery. A future commit will bring bootloader builds back. A new bootloader meson option is now used to control whether to build sd-boot and its userspace tooling.
* | udevadm verify: introduce --root optionDmitry V. Levin2023-03-102-1/+6
|/ | | | | | When udevadm verify is invoked without positional arguments and loads all rules files from the system like the udev daemon does, this option can be used to operate on files underneath the specified root path.
* udevadm: introduce new 'verify' commandDmitry V. Levin2023-03-082-1/+32
| | | | | | | | | | | | | | | | | | | We seem to have no tool to verify udev rule files. There is a simple udev rules syntax checker in the tree, test/rule-syntax-check.py, but it is too simple to detect less trivial issues not detected by udev, e.g. redundant comparisons (#26593) or labels without references. Such a tool would be beneficial not only for maintaining udev rules distributed along with udev, but also and even more so for maintaining third party udev rules that are more likely to have issues with syntax and semantic correctness. Implement a udev rules syntax and semantics checker in the form of 'udevadm verify [OPTIONS] FILE...' command that is based on udev_rules_parse_file() interface and would apply further checks on top of it in subsequent commits. Resolves: #26606
* shell-completion: add systemctl list-pathsDavid Tardon2023-02-212-1/+2
|
* meson: Install missing bash-completionsJan Janssen2023-01-271-1/+3
|
* bash-completion: add missing --unlock-fido2-device to systemd-cryptenrollAntonio Alvarez Feijoo2023-01-251-0/+4
|
* bootctl: unlink and cleanup functionsLudwig Nussel2023-01-192-3/+10
| | | | | | | | | | The unlink command removes an entry from the ESP including referenced files that are not referenced in other entries. That is useful eg to have multiple entries that use the same kernel with different options. The cleanup command removes all files that are not referenced by any entry.
* systemd-analyze: Add tab complete logic for plotjoshuazivkovic2023-01-182-3/+19
|
* shell-completion: systemctl: add --no-warnYu Watanabe2023-01-122-1/+2
|
* Implement --luks-pbkdf-force-iterations for homedAidan Dang2022-12-061-0/+1
|
* dissect: add --list optionAntonio Alvarez Feijoo2022-10-311-1/+2
| | | | | New option to print the paths of all the files and directories in the image to stdout.
* shell-completion/zsh: rename helper for clarityZbigniew Jędrzejewski-Szmek2022-10-201-7/+7
|
* shell-completion/zsh: silence error when machinectl is not installedZbigniew Jędrzejewski-Szmek2022-10-2013-19/+40
| | | | | | | | | | | | | | | | | | | | | 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 e2268fa43742ece4a5cdc2e93f731b2bb2fcc883. 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.
* bash-completion: add systemd-dissect supportAntonio Alvarez Feijoo2022-10-191-0/+104
|
* tree-wide: replace "plural(s)" by "plurals"Zbigniew Jędrzejewski-Szmek2022-10-172-3/+3
| | | | | | | | (s) is just ugly with a vibe of DOS. In most cases just using the normal plural form is more natural and gramatically correct. There are some log_debug() statements left, and texts in foreign licenses or headers. Those are not touched on purpose.
* analyze: extend the dump command to accept patternsFranck Bui2022-10-131-1/+9
| | | | | | | | | | The new function DumpPatterns() can be used to limit (drastically) the size of the data returned by PID1. Hence the optimization of serializing data into a file descriptor should be less relevant than having the possibility to limit the data when communicating with the service manager remotely. NB: when passing patterns, the dump command omits the version of the manager as well as the features and the timestamps.
* Implement --luks-sector-size for homedAidan Dang2022-10-071-0/+1
|