diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 01:03:18 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 01:03:18 +0000 |
commit | f2621414ee5f2f601424c22f00e207903e3b6104 (patch) | |
tree | 56a856dafd1ca684bb23263cacaa723ee4f404fc /completions/firefox | |
parent | Adding debian version 1:2.11-8. (diff) | |
download | bash-completion-f2621414ee5f2f601424c22f00e207903e3b6104.tar.xz bash-completion-f2621414ee5f2f601424c22f00e207903e3b6104.zip |
Merging upstream version 1:2.12.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'completions/firefox')
-rw-r--r-- | completions/firefox | 33 |
1 files changed, 20 insertions, 13 deletions
diff --git a/completions/firefox b/completions/firefox index 4656f8d..e84d644 100644 --- a/completions/firefox +++ b/completions/firefox @@ -1,46 +1,53 @@ # firefox completion -*- shell-script -*- -_firefox() +_comp_cmd_firefox() { - local cur prev words cword split - _init_completion -s || return + local cur prev words cword was_split comp_args + _comp_initialize -s -- "$@" || return [[ $cur == -MOZ_LOG*=* ]] && prev=${cur%%=*} cur=${cur#*=} case $prev in --help | --version | --display | --UILocale | -MOZ_LOG | --new-window | --new-tab | \ --private-window | --window-size | --search | --start-debugger-server | \ - --recording | --debugger-args | -[hvPa]) + --recording | --debugger-args | -[hva]) + return + ;; + -P) + _comp_compgen_split -- "$( + _comp_awk -F = '$1 == "Name" { print $2 }' \ + ~/.mozilla/firefox/profiles.ini 2>/dev/null + )" return ;; --profile | --screenshot) - _filedir -d + _comp_compgen_filedir -d return ;; -MOZ_LOG_FILE) - _filedir log + _comp_compgen_filedir log return ;; - --recording-file) - _filedir + --recording-output | --recording-file) + _comp_compgen_filedir return ;; --debugger | -d) - COMPREPLY=($(compgen -c -- "$cur")) + _comp_compgen_commands return ;; esac - $split && return + [[ $was_split ]] && return if [[ $cur == -* ]]; then - COMPREPLY=($(compgen -W '$(_parse_help "$1")' -- "$cur")) + _comp_compgen_help [[ ${COMPREPLY-} == *= ]] && compopt -o nospace return fi - _filedir "@(?([xs])htm?(l)|pdf|txt)" + _comp_compgen_filedir "@(?([xs])htm?(l)|pdf|txt|svg)" } && - complete -F _firefox firefox mozilla-firefox iceweasel + complete -F _comp_cmd_firefox firefox firefox-esr iceweasel mozilla-firefox # ex: filetype=sh |