mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 10:46:35 +01:00
[bash/zsh completion] Complete also filenames and directories
See #1109
This commit is contained in:
parent
3295899230
commit
c08d8ca251
@ -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
|
(one directory from $fpath) and rename to _qupzilla, or run this
|
||||||
command:
|
command:
|
||||||
|
|
||||||
cp notes "`echo $fpath | cut -d' ' -f1`/_qupzilla"
|
cp _qupzilla "`echo $fpath | cut -d' ' -f1`/_qupzilla"
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
#compdef qupzilla
|
#compdef qupzilla
|
||||||
|
#
|
||||||
|
# Zsh completion for QupZilla
|
||||||
|
#
|
||||||
opts=(
|
opts=(
|
||||||
'(-)'{-h,--help}'[print usage help]'
|
'(-)'{-h,--help}'[print usage help]'
|
||||||
'(-)'{-a,--authors}'[print QupZilla authors]'
|
'(-)'{-a,--authors}'[print QupZilla authors]'
|
||||||
@ -15,6 +17,7 @@ opts=(
|
|||||||
'(-)'{-nr,--no-remote}'[open new instance]'
|
'(-)'{-nr,--no-remote}'[open new instance]'
|
||||||
'(-)'{-ct=,--current-tab=}'[open URL in current tab]'
|
'(-)'{-ct=,--current-tab=}'[open URL in current tab]'
|
||||||
'(-)'{-ow=,--open-window=}'[open URL in new window]'
|
'(-)'{-ow=,--open-window=}'[open URL in new window]'
|
||||||
|
'*:files:_files'
|
||||||
)
|
)
|
||||||
|
|
||||||
_x_arguments -C $opts
|
_x_arguments -C $opts
|
@ -1,3 +1,6 @@
|
|||||||
|
#
|
||||||
|
# Bash completion for QupZilla
|
||||||
|
#
|
||||||
_qupzilla()
|
_qupzilla()
|
||||||
{
|
{
|
||||||
local cur prev opts
|
local cur prev opts
|
||||||
@ -11,7 +14,8 @@ _qupzilla()
|
|||||||
|
|
||||||
if [[ ${cur} == -* ]] ; then
|
if [[ ${cur} == -* ]] ; then
|
||||||
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
||||||
return 0
|
else
|
||||||
|
_filedir
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
complete -F _qupzilla qupzilla
|
complete -F _qupzilla qupzilla
|
||||||
|
Loading…
Reference in New Issue
Block a user