fastlane/lib/assets/completions/completion.zsh in fastlane-2.191.0 vs fastlane/lib/assets/completions/completion.zsh in fastlane-2.192.0
- old
+ new
@@ -1,23 +1,24 @@
#!/bin/zsh
_fastlane_complete() {
- local word completions
+ local word completions file
word="$1"
# look for Fastfile either in this directory or fastlane/ then grab the lane names
if [[ -e "Fastfile" ]] then
file="Fastfile"
elif [[ -e "fastlane/Fastfile" ]] then
file="fastlane/Fastfile"
elif [[ -e ".fastlane/Fastfile" ]] then
file=".fastlane/Fastfile"
+ else
+ return 1
fi
# parse 'beta' out of 'lane :beta do', etc
- completions=`cat $file | grep "^\s*lane \:" | awk -F ':' '{print $2}' | awk -F ' ' '{print $1}'`
- completions="$completions
-update_fastlane"
+ completions="$(sed -En 's/^[ ]*lane +:([^ ]+).*$/\1/p' "$file")"
+ completions="$completions update_fastlane"
- reply=( "${(ps:\n:)completions}" )
+ reply=( "${=completions}" )
}