completion: Finish args
This commit is contained in:
parent
fb5d20a9c4
commit
f8b5e3bb32
1 changed files with 1 additions and 3 deletions
|
@ -6,13 +6,11 @@ shopt -s nullglob
|
||||||
_neofetch_completions() {
|
_neofetch_completions() {
|
||||||
local cur prev
|
local cur prev
|
||||||
|
|
||||||
# User input.
|
|
||||||
cur="${COMP_WORDS[COMP_CWORD]}"
|
cur="${COMP_WORDS[COMP_CWORD]}"
|
||||||
prev="${COMP_WORDS[COMP_CWORD-1]}"
|
prev="${COMP_WORDS[COMP_CWORD-1]}"
|
||||||
|
|
||||||
# Complete partial matches.
|
|
||||||
IFS=$'\n' read -d "" -ra COMPREPLY \
|
IFS=$'\n' read -d "" -ra COMPREPLY \
|
||||||
< <(compgen -W "$(neofetch -h | awk '/^ --/{printf $1" "}')" -- "$cur")
|
< <(compgen -W "$(neofetch -h | awk '/ --/{printf $1" "}')" -- "$cur")
|
||||||
|
|
||||||
case "$prev" in
|
case "$prev" in
|
||||||
"--disable")
|
"--disable")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue