chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
journal: replace linked list by hashmap when merging files
[elogind.git]
/
src
/
systemctl-bash-completion.sh
diff --git
a/src/systemctl-bash-completion.sh
b/src/systemctl-bash-completion.sh
index acdc0866cd0112b922a894303c4b30c864797d6e..6369a6ca3925b4425cebb771f4dba3ee02e3cbcb 100644
(file)
--- a/
src/systemctl-bash-completion.sh
+++ b/
src/systemctl-bash-completion.sh
@@
-79,10
+79,11
@@
_systemctl () {
local -A VERBS=(
[ALL_UNITS]='enable disable is-active is-enabled status show'
[FAILED_UNITS]='reset-failed'
local -A VERBS=(
[ALL_UNITS]='enable disable is-active is-enabled status show'
[FAILED_UNITS]='reset-failed'
- [STARTABLE_UNITS]='start
restart reload-or-restart
'
+ [STARTABLE_UNITS]='start'
[STOPPABLE_UNITS]='stop kill try-restart condrestart'
[ISOLATABLE_UNITS]='isolate'
[RELOADABLE_UNITS]='reload reload-or-try-restart force-reload'
[STOPPABLE_UNITS]='stop kill try-restart condrestart'
[ISOLATABLE_UNITS]='isolate'
[RELOADABLE_UNITS]='reload reload-or-try-restart force-reload'
+ [RESTARTABLE_UNITS]='restart reload-or-restart'
[JOBS]='cancel'
[SNAPSHOTS]='delete'
[ENVS]='set-environment unset-environment'
[JOBS]='cancel'
[SNAPSHOTS]='delete'
[ENVS]='set-environment unset-environment'
@@
-110,6
+111,10
@@
_systemctl () {
comps=$( __filter_units_by_property CanStart yes \
$( __get_inactive_units | grep -Ev '\.(device|snapshot)$' ))
comps=$( __filter_units_by_property CanStart yes \
$( __get_inactive_units | grep -Ev '\.(device|snapshot)$' ))
+ elif __contains_word "$verb" ${VERBS[RESTARTABLE_UNITS]}; then
+ comps=$( __filter_units_by_property CanStart yes \
+ $( __get_all_units | grep -Ev '\.(device|snapshot|socket|timer)$' ))
+
elif __contains_word "$verb" ${VERBS[STOPPABLE_UNITS]}; then
comps=$( __filter_units_by_property CanStop yes \
$( __get_active_units ) )
elif __contains_word "$verb" ${VERBS[STOPPABLE_UNITS]}; then
comps=$( __filter_units_by_property CanStop yes \
$( __get_active_units ) )