mirror of
https://github.com/zsh-users/zsh-completions.git
synced 2026-09-17 16:00:19 +00:00
fix group completion
Original code does not work if multile directories are matched
This commit is contained in:
+2
-5
@@ -78,11 +78,8 @@ _bundle_gems() {
|
||||
}
|
||||
|
||||
_bundle_groups() {
|
||||
setopt extendedglob
|
||||
|
||||
local gemdir=$(echo (../)#Gemfile(:h))
|
||||
if [[ -n $gemdir ]]; then
|
||||
local -a groups=($(cd "$gemdir" && awk '/^ *group *:/{sub(/^ *group *:/, ""); print $1}' Gemfile))
|
||||
if [[ -e Gemfile ]]; then
|
||||
local -a groups=(${(@f)"$(awk '/^ *group *:/{sub(/^ *group *:/, ""); print $1}' Gemfile)"})
|
||||
_values 'groups' $groups
|
||||
fi
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user