Skip to content

Instantly share code, notes, and snippets.

@cryptrz
Last active July 12, 2025 05:42
Show Gist options
  • Select an option

  • Save cryptrz/707ffcbb24d1acfaf5941c244c89e4a9 to your computer and use it in GitHub Desktop.

Select an option

Save cryptrz/707ffcbb24d1acfaf5941c244c89e4a9 to your computer and use it in GitHub Desktop.
# Add this at the end of /etc/bash_completion.d/apt-linux-mint
_apt_mint_file_completion()
{
local cur prev
COMPREPLY=()
_get_comp_words_by_ref -n : cur prev
# If the previous word is 'install' and the current word starts with ./ or /
if [[ "$prev" == "install" && ( "$cur" == ./* || "$cur" == /* ) ]]; then
COMPREPLY=( $(compgen -f -- "$cur") )
return 0
fi
}
complete -o filenames -F _apt_mint_file_completion apt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment