Heray-Was-Here
Server : Apache
System : Linux vps43555.mylogin.co 3.10.0-1160.53.1.vz7.185.3 #1 SMP Tue Jan 25 12:49:12 MSK 2022 x86_64
User : redsea ( 60651)
PHP Version : 7.4.32
Disable Function : NONE
Directory :  /usr/share/fish/completions/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //usr/share/fish/completions/rc-update.fish
function __fish_complete_rc-update_actions
    set -l actions add \
        'Add the service to the runlevel or the current one if non given'
    set -l actions $actions del \
        'Delete the service from the runlevel or the current one if non given'
    set -l actions $actions show \
        'Show all enabled services and the runlevels they belong to'
    printf "%s\t%s\n" $actions
end

function __fish_complete_rc-update_runlevels
    set -l levels sysinit \
        'First startup runlevel' \
        boot \
        'Second startup runlevel' \
        default \
        'Last startup runlevel' \
        shutdown \
        'Runlevel for stutting down'
    printf "%s\t%s\n" $levels
end

# The first argument is what action to take with the service
complete -c rc-update -n "test (__fish_number_of_cmd_args_wo_opts) = 1" \
    -xa "(__fish_complete_rc-update_actions)"

# The second argument is the names of the service, i.e. a file in /etc/init.d
complete -c rc-update -n "test (__fish_number_of_cmd_args_wo_opts) = 2" \
    -xa "(__fish_print_service_names)" --description "Service name"

# The third argument is the names of the service, i.e. a file in /etc/init.d
complete -c rc-update -n "test (__fish_number_of_cmd_args_wo_opts) = 3" \
    -xa "(__fish_complete_rc-update_runlevels)"

Hry