1
mirror of https://invent.kde.org/network/falkon.git synced 2024-09-21 17:52:10 +02:00

Added basic bash and zsh autocompletion files.

Bash autocompletion will be installed by default with
make install.
Zsh autocompletion has to be installed manually, more on that
in linux/completion/README
This commit is contained in:
nowrep 2013-03-04 13:23:04 +01:00
parent 1947568cf7
commit b9858f98a4
6 changed files with 55 additions and 2 deletions

View File

@ -6,6 +6,7 @@ Version 1.4.0
* added support for FTP listing files and downloading * added support for FTP listing files and downloading
* added support for saving passwords of multiple users per site * added support for saving passwords of multiple users per site
* added support for showing tabs on top * added support for showing tabs on top
* added bash autocompletion file
* possibility to select text on page with Shift+Arrow keys * possibility to select text on page with Shift+Arrow keys
* asking user whether to allow site to use notifications/geolocation * asking user whether to allow site to use notifications/geolocation
* option to set JavaScript privacy permissions * option to set JavaScript privacy permissions

8
linux/completion/README Normal file
View File

@ -0,0 +1,8 @@
Bash completion file will be automatically installed with make install
into /etc/bash_completion.d/
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"

View File

@ -0,0 +1,17 @@
_qupzilla()
{
local cur prev opts
COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}"
prev="${COMP_WORDS[COMP_CWORD-1]}"
opts="-h --help -a --authors -v --version -p= --profile=
-ne --no-extensions -nt --new-tab -pb --private-browsing
-dm --download-manager -nr --no-remote -ct= --current-tab=
-ow= --open-window="
if [[ ${cur} == -* ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
return 0
fi
}
complete -F _qupzilla qupzilla

View File

@ -0,0 +1,22 @@
#compdef qupzilla
opts=(
'(-)'{-h,--help}'[print usage help]'
'(-)'{-a,--authors}'[print QupZilla authors]'
'(-)'{-v,--version}'[print QupZilla version]'
'(-)'{-p=,--profile=}'[start with specified profile]'
'(-)'{-ne,--no-extensions}'[start without extensions]'
'(-)'{-nt,--new-tab}'[open new tab]'
'(-)'{-nw,--new-window}'[open new window]'
'(-)'{-pb,--private-browsing}'[start private browsing]'
'(-)'{-dm,--download-manager}'[show download manager]'
'(-)'{-nr,--no-remote}'[open new instance]'
'(-)'{-ct=,--current-tab=}'[open URL in current tab]'
'(-)'{-ow=,--open-window=}'[open URL in new window]'
)
_x_arguments -C $opts
return 0

View File

@ -41,6 +41,11 @@ mac {
ico256.files = $$PWD/../linux/hicolor/256x256/apps/qupzilla.png ico256.files = $$PWD/../linux/hicolor/256x256/apps/qupzilla.png
ico256.path = $$hicolor_folder/256x256/apps ico256.path = $$hicolor_folder/256x256/apps
bashcompletion.files = $$PWD/../linux/completion/bash_completion.sh
bashcompletion.path = /etc/bash_completion.d/
INSTALLS += target target1 target2 target3 INSTALLS += target target1 target2 target3
INSTALLS += ico16 ico32 ico48 ico64 ico128 ico256 INSTALLS += ico16 ico32 ico48 ico64 ico128 ico256
INSTALLS += bashcompletion
} }

View File

@ -1,6 +1,6 @@
/* ============================================================ /* ============================================================
* QupZilla - WebKit based browser * QupZilla - WebKit based browser
* Copyright (C) 2010-2012 David Rosca <nowrep@gmail.com> * Copyright (C) 2010-2013 David Rosca <nowrep@gmail.com>
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -86,7 +86,7 @@ void CommandLineOptions::parseActions()
if (arg == QLatin1String("-a") || arg == QLatin1String("--authors")) { if (arg == QLatin1String("-a") || arg == QLatin1String("--authors")) {
cout << "QupZilla authors: " << endl; cout << "QupZilla authors: " << endl;
cout << " nowrep <nowrep@gmail.com>" << endl; cout << " David Rosca <nowrep@gmail.com>" << endl;
ActionPair pair; ActionPair pair;
pair.action = Qz::CL_ExitAction; pair.action = Qz::CL_ExitAction;
m_actions.append(pair); m_actions.append(pair);