| Server IP : 107.13.46.68 / Your IP : 216.73.216.251 Web Server : Apache/2.4.58 (Ubuntu) System : Linux mariOS 6.8.0-51-generic #52-Ubuntu SMP PREEMPT_DYNAMIC Thu Dec 5 13:09:44 UTC 2024 x86_64 User : www-data ( 33) PHP Version : 8.3.6 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /etc/bash_completion.d/ |
Upload File : |
#
# Bash completion file for Linux Mint apt utility.
#
have apt &&
_apt()
{
local cur opt
COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}"
# Completion of commands.
if [[ $COMP_CWORD == 1 ]]; then
COMPREPLY=( $(compgen -W '
add-repository autoclean autopurge autoremove build build-dep changelog check clean
contains content deb depends dist-upgrade download
dselect-upgrade edit-sources full-upgrade held help hold install list policy purge recommends rdepends
reinstall remove search show showhold source sources unhold update
upgrade version --help
' -- "$cur" ) )
return 0
fi
# Completion of command parameters.
opt="${COMP_WORDS[1]}"
case $opt in
# Commands which require filename.
# Note: "search" command does not necessarilly require
# filename, it can accept any pattern, but I put it in this
# group in order to allow filename-completion for this command.
"contains"|"search")
_filedir
return 0
;;
# Commands which require .deb/.udeb file name.
"deb")
_filedir '?(u)deb'
return 0
;;
# Commands which require package name.
"build"|"build-dep"|"changelog"|"depends"|"download"|"install"|"list"|\
"policy"|"recommends"|"rdepends"|"show"|"source")
COMPREPLY=( $( apt-cache --no-generate pkgnames "$cur" \
2> /dev/null ) )
return 0
;;
# Commands which require name of installed package.
"content"|"hold"|"purge"|"reinstall"|"remove"|"unhold"|"version"|"autopurge")
if [ -f /etc/debian_version ]; then
# Debian system
COMPREPLY=( $( _xfunc dpkg _comp_dpkg_installed_packages $cur ) )
else
# assume RPM based
_xfunc rpm _rpm_installed_packages
fi
return 0
;;
esac
} &&
complete -F _apt apt