mirror of
https://gitlab.gnome.org/GNOME/libsecret.git
synced 2024-12-22 04:38:55 +00:00
Merge branch 'issue#50' into 'master'
Add bash-completion for secret-tool Closes #50 See merge request GNOME/libsecret!70
This commit is contained in:
commit
6dc2e55cee
10
bash-completion/meson.build
Normal file
10
bash-completion/meson.build
Normal file
@ -0,0 +1,10 @@
|
||||
bashcompdir = get_option('bashcompdir')
|
||||
if bashcompdir == ''
|
||||
bashcomp = dependency('bash-completion', required: get_option(
|
||||
'bash_completion'))
|
||||
if bashcomp.found()
|
||||
bashcompdir = bashcomp.get_pkgconfig_variable('completionsdir')
|
||||
else
|
||||
warning('Will not install bash completion due to missing dependencies!')
|
||||
endif
|
||||
endif
|
19
bash-completion/secret-tool
Normal file
19
bash-completion/secret-tool
Normal file
@ -0,0 +1,19 @@
|
||||
# secret-tool(8) completion
|
||||
|
||||
_secret-tool()
|
||||
{
|
||||
local cur prev word cword
|
||||
_init_completion || return
|
||||
|
||||
if [[ $cur == -* ]]; then
|
||||
local opts="--help --verbose -q --quiet" # not sure about the opts
|
||||
COMPREPLY=( $(compgen -W "$opts" -- "$cur") )
|
||||
return
|
||||
elif [[ $cword -eq 1 ]]; then
|
||||
local commands='store lookup clear search'
|
||||
COMPREPLY=( $(compgen -W "$commands" -- "$cur") )
|
||||
fi
|
||||
} &&
|
||||
complete -F _secret-tool secret-tool
|
||||
|
||||
# ex: filetype=sh
|
Loading…
Reference in New Issue
Block a user