completion: filter templates from restartable units
Since c6a373a263
, we might encounter unit templates via the
'list-units' verb. These aren't restartable (and we throw errors), so
make sure they're filtered out of the completion options.
fixes downstream bug: https://bugs.archlinux.org/task/41719
This commit is contained in:
parent
f2e104d3e0
commit
ec15977a3c
|
@ -182,7 +182,7 @@ _systemctl () {
|
||||||
comps=$( __filter_units_by_property $mode CanStart yes \
|
comps=$( __filter_units_by_property $mode CanStart yes \
|
||||||
$( __get_all_units $mode \
|
$( __get_all_units $mode \
|
||||||
| while read -r line; do \
|
| while read -r line; do \
|
||||||
[[ "$line" =~ \.(device|snapshot|socket|timer)$ ]] || echo " $line"; \
|
[[ "$line" =~ @\.|\.(device|snapshot|socket|timer)$ ]] || echo " $line"; \
|
||||||
done ))
|
done ))
|
||||||
compopt -o filenames
|
compopt -o filenames
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue