1
mirror of https://invent.kde.org/network/falkon.git synced 2024-12-20 02:36:34 +01:00

[bash/zsh completion] Complete also filenames and directories

See #1109
This commit is contained in:
nowrep 2013-12-18 18:09:17 +01:00
parent 3295899230
commit c08d8ca251
3 changed files with 10 additions and 3 deletions

View File

@ -5,4 +5,4 @@ To install zsh completion file, either manually copy it to proper directory
(one directory from $fpath) and rename to _qupzilla, or run this
command:
cp notes "`echo $fpath | cut -d' ' -f1`/_qupzilla"
cp _qupzilla "`echo $fpath | cut -d' ' -f1`/_qupzilla"

View File

@ -1,5 +1,7 @@
#compdef qupzilla
#
# Zsh completion for QupZilla
#
opts=(
'(-)'{-h,--help}'[print usage help]'
'(-)'{-a,--authors}'[print QupZilla authors]'
@ -15,6 +17,7 @@ opts=(
'(-)'{-nr,--no-remote}'[open new instance]'
'(-)'{-ct=,--current-tab=}'[open URL in current tab]'
'(-)'{-ow=,--open-window=}'[open URL in new window]'
'*:files:_files'
)
_x_arguments -C $opts

View File

@ -1,3 +1,6 @@
#
# Bash completion for QupZilla
#
_qupzilla()
{
local cur prev opts
@ -11,7 +14,8 @@ _qupzilla()
if [[ ${cur} == -* ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
return 0
else
_filedir
fi
}
complete -F _qupzilla qupzilla