if ( [[ ${+_sys_all_units} -eq 0 ]] || _cache_invalid SYS_ALL_UNITS$_sys_service_mgr ) ||
! _retrieve_cache SYS_ALL_UNITS$_sys_service_mgr;
then
- _sys_all_units=( ${${(f)"$(__systemctl list-units --all "$PREFIX*" )"}%% *} )
- _store_cache SYS_ALL_UNITS$_sys_service_mgr _sys_all_units
+ _sys_all_units=( ${${(f)"$(__systemctl list-units --all)"}%% *} )
+ _store_cache SYS_ALL_UNITS$_sys_service_mgr _sys_all_unis
fi
}
if ( [[ ${+_sys_really_all_units} -eq 0 ]] || _cache_invalid SYS_REALLY_ALL_UNITS$_sys_service_mgr ) ||
! _retrieve_cache SYS_REALLY_ALL_UNITS$_sys_service_mgr;
then
- all_unit_files=( ${${(f)"$(__systemctl list-unit-files "$PREFIX*" )"}%% *} )
+ all_unit_files=( ${${(f)"$(__systemctl list-unit-files)"}%% *} )
_systemctl_all_units
really_all_units=($_sys_all_units $all_unit_files)
_sys_really_all_units=(${(u)really_all_units})
(( $+functions[_systemctl_get_non_template_names] )) ||
_systemctl_get_non_template_names() { echo -E - ${^${(R)${(f)"$(
- __systemctl list-unit-files "$PREFIX*"
- __systemctl list-units --all "$PREFIX*"
+ __systemctl list-unit-files
+ __systemctl list-units --all
)"}:#*@.*}%%[[:space:]]*} }
(( $+functions[_systemctl_get_template_names] )) ||
- _systemctl_get_template_names() { echo -E - ${^${(M)${(f)"$(__systemctl list-unit-files "$PREFIX*" )"}##*@.[^[:space:]]##}%%@.*}\@ }
+ _systemctl_get_template_names() { echo -E - ${^${(M)${(f)"$(__systemctl list-unit-files)"}##*@.[^[:space:]]##}%%@.*}\@ }
(( $+functions[_systemctl_active_units] )) ||
- _systemctl_active_units() {_sys_active_units=( ${${(f)"$(__systemctl list-units "$PREFIX*" )"}%% *} )}
+ _systemctl_active_units() {_sys_active_units=( ${${(f)"$(__systemctl list-units)"}%% *} )}
(( $+functions[_systemctl_startable_units] )) ||
_systemctl_startable_units(){
_sys_startable_units=( $( _filter_units_by_property ActiveState inactive $(
_filter_units_by_property CanStart yes ${${${(f)"$(
- __systemctl list-unit-files --state enabled,enabled-runtime,linked,linked-runtime,static,indirect,disabled,generated,transient "$PREFIX*"
- __systemctl list-units --state inactive,failed "$PREFIX*"
+ __systemctl list-unit-files --state enabled,enabled-runtime,linked,linked-runtime,static,indirect,disabled,generated,transient
+ __systemctl list-units --state inactive,failed
)"}:#*@.*}%%[[:space:]]*}
)) )
}
(( $+functions[_systemctl_restartable_units] )) ||
_systemctl_restartable_units(){
_sys_restartable_units=( $( _filter_units_by_property CanStart yes ${${${(f)"$(
- __systemctl list-unit-files --state enabled,disabled,static "$PREFIX*"
- __systemctl list-units "$PREFIX*"
+ __systemctl list-unit-files --state enabled,disabled,static
+ __systemctl list-units
)"}:#*@.*}%%[[:space:]]*} ) )
}
(( $+functions[_systemctl_failed_units] )) ||
- _systemctl_failed_units() {_sys_failed_units=( ${${(f)"$(__systemctl list-units --state=failed "$PREFIX*" )"}%% *} ) }
+ _systemctl_failed_units() {_sys_failed_units=( ${${(f)"$(__systemctl list-units --state=failed)"}%% *} ) }
(( $+functions[_systemctl_unit_state] )) ||
_systemctl_unit_state() {
setopt localoptions extendedglob
typeset -gA _sys_unit_state
- _sys_unit_state=( ${=${${(f)"$(__systemctl list-unit-files "$PREFIX*" )"}%%[[:space:]]#}% *} )
+ _sys_unit_state=( ${=${${(f)"$(__systemctl list-unit-files)"}%%[[:space:]]#}% *} )
}
local fun
(( $+functions[_systemctl_set-default] )) || _systemctl_set-default()
{
_wanted systemd-targets expl target \
- compadd "$@" - ${${(f)"$(__systemctl list-unit-files --type target --all "$PREFIX*" )"}%% *} ||
+ compadd "$@" - ${${(f)"$(__systemctl list-unit-files --type target --all)"}%% *} ||
_message "no targets found"
}