mirror of
https://github.com/kazhala/dotbare
synced 2024-11-04 06:00:45 +00:00
fix(completion): bash completion broken awk command
This commit is contained in:
parent
2c49e6de67
commit
0a81217772
@ -47,14 +47,11 @@ __dotbare_completion()
|
||||
return
|
||||
|
||||
elif [[ "${prev}" != "-h" && "${prev}" != "--help" ]]; then
|
||||
selected=("${COMP_WORDS[@]:1}")
|
||||
options=$(
|
||||
"${mydir}"/dotbare "${COMP_WORDS[1]}" -h \
|
||||
| awk -v selected="${selected[*]}" '{
|
||||
| awk '{
|
||||
gsub(/,/, " ", $0)
|
||||
if (selected ~ $1) {
|
||||
next
|
||||
} else if ($0 ~ /^ -p PATH/) {
|
||||
if ($0 ~ /^ -p PATH/) {
|
||||
gsub(/^ -p PATH --path PATH/, "-p", $0)
|
||||
gsub(/\t/, " ", $0)
|
||||
print $0
|
||||
|
Loading…
Reference in New Issue
Block a user