purge .txt and .json from bash-completion
YAML is the way!
This commit is contained in:
parent
b63e9e68c5
commit
1b90aec697
|
@ -26,16 +26,15 @@ __fdroid_init() {
|
|||
(( $# >= 1 )) && __complete_${1}
|
||||
}
|
||||
|
||||
__by_ext() {
|
||||
local ext="$1"
|
||||
files=( metadata/*.$ext )
|
||||
__get_appid() {
|
||||
files=( metadata/*.yml )
|
||||
files=( ${files[@]#metadata/} )
|
||||
files=${files[@]%.$ext}
|
||||
files=${files[@]%.yml}
|
||||
echo "$files"
|
||||
}
|
||||
|
||||
__package() {
|
||||
files="$(__by_ext txt) $(__by_ext yml) $(__by_ext json)"
|
||||
files="$(__get_appid)"
|
||||
COMPREPLY=( $( compgen -W "$files" -- $cur ) )
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue