K2LL33D SHELL

 Apache/2.4.7 (Ubuntu)
 Linux sman1baleendah 3.13.0-24-generic #46-Ubuntu SMP Thu Apr 10 19:11:08 UTC 2014 x86_64
 uid=33(www-data) gid=33(www-data) groups=33(www-data)
 safemode : OFF
 MySQL: ON | Perl: ON | cURL: OFF | WGet: ON
  >  / usr / share / bash-completion / completions /
server ip : 104.21.89.46

your ip : 172.69.17.176

H O M E


Filename/usr/share/bash-completion/completions/slackpkg
Size3.34 kb
Permissionrw-r--r--
Ownerroot : root
Create time27-Apr-2025 09:54
Last modified07-Apr-2014 22:10
Last accessed05-Jul-2025 20:48
Actionsedit | rename | delete | download (gzip)
Viewtext | code | image
# bash completion for slackpkg(8) -*- shell-script -*-
# options list is based on `grep '\-.*\=.*)' /usr/sbin/slackpkg | cut -f1 -d\)`

_slackpkg()
{
local cur prev words cword
_init_completion -n = || return

local split=false
if [[ "$cur" == -?*=* ]]; then
prev="${cur%%?(\\)=*}"
cur="${cur#*=}"
split=true
fi

case "$prev" in
-delall|-checkmd5|-checkgpg|-checksize|-postinst|-onoff|-download_all|\
-dialog|-batch|-only_new_dotnew|-use_includes|-spinning)
COMPREPLY=( $( compgen -W 'on off' -- "$cur" ) )
return
;;
-default_answer)
COMPREPLY=( $( compgen -W 'yes no' -- "$cur" ) )
return
;;
-dialog_maxargs|-mirror)
# argument required but no completions available
return
;;
esac

$split && return

if [[ "$cur" == -* ]]; then
compopt -o nospace
COMPREPLY=( $( compgen -W '-delall= -checkmd5= -checkgpg=
-checksize= -postinst= -onoff= -download_all= -dialog=
-dialog_maxargs= -batch= -only_new_dotnew= -use_includes=
-spinning= -default_answer= -mirror=' -- "$cur" ) )
return
fi

local confdir="/etc/slackpkg"
local config="$confdir/slackpkg.conf"

[[ -r "$config" ]] || return
. "$config"

local i action
for (( i=1; i<${#words[@]}; i++ )); do
if [[ "${words[i]}" != -* ]]; then
action="${words[i]}"
break
fi
done

case "$action" in
generate-template|search|file-search)
# argument required but no completions available
return
;;
install-template|remove-template)
if [[ -e $confdir/templates ]]; then
COMPREPLY=( $( cd "$confdir/templates"; \
compgen -f -X "!*.template" -- "$cur" ) )
COMPREPLY=( ${COMPREPLY[@]%.template} )
fi
return
;;
remove)
_filedir
COMPREPLY+=( $( compgen -W 'a ap d e f k kde kdei l n t tcl x
xap xfce y' -- "$cur" ) )
COMPREPLY+=( $( cd /var/log/packages; compgen -f -- "$cur" ) )
return
;;
install|reinstall|upgrade|blacklist|download)
_filedir
COMPREPLY+=( $( compgen -W 'a ap d e f k kde kdei l n t tcl x
xap xfce y' -- "$cur" ) )
COMPREPLY+=( $( cut -f 6 -d\ "${WORKDIR}/pkglist" 2> /dev/null | \
grep "^$cur" ) )
return
;;
info)
COMPREPLY=( $( cut -f 6 -d\ "${WORKDIR}/pkglist" 2> /dev/null | \
grep "^$cur" ) )
return
;;
update)
# we should complete the same as the next `list` + "gpg"
COMPREPLY=( $( compgen -W 'gpg' -- "$cur" ) )
;&
*)
COMPREPLY+=( $( compgen -W 'install reinstall upgrade remove
blacklist download update install-new upgrade-all
clean-system new-config check-updates help generate-template
install-template remove-template search file-search info' -- \
"$cur" ) )
return
;;
esac

} && complete -F _slackpkg slackpkg

# ex: ts=4 sw=4 et filetype=sh