vars need $ prefixes
This commit is contained in:
parent
080d0b70f1
commit
c802f5348b
18
src/_ag
18
src/_ag
|
@ -72,7 +72,7 @@ _ag_add_file_types() {
|
||||||
_ag_add_version_opts() {
|
_ag_add_version_opts() {
|
||||||
local ag_version=$(_ag_version)
|
local ag_version=$(_ag_version)
|
||||||
|
|
||||||
if [[ ag_version > 0.22 ]]; then
|
if [[ $ag_version > 0.22 ]]; then
|
||||||
_ag_add_file_types
|
_ag_add_file_types
|
||||||
AG_OPTS+=(
|
AG_OPTS+=(
|
||||||
'(- 1 *)--list-file-types[list supported filetypes to search]'
|
'(- 1 *)--list-file-types[list supported filetypes to search]'
|
||||||
|
@ -81,19 +81,19 @@ _ag_add_version_opts() {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
if [[ ag_version > 0.22 ]]; then
|
if [[ $ag_version > 0.22 ]]; then
|
||||||
AG_OPTS+=(
|
AG_OPTS+=(
|
||||||
'(-z --search-zip)'{-z,--search-zip}'[search contents of compressed files]'
|
'(-z --search-zip)'{-z,--search-zip}'[search contents of compressed files]'
|
||||||
)
|
)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ ag_version <= 0.24 ]]; then
|
if [[ $ag_version <= 0.24 ]]; then
|
||||||
AG_OPTS+=(
|
AG_OPTS+=(
|
||||||
'(-s --case-sensitive)'{-s,--case-sensitive}'[match case sensitively]'
|
'(-s --case-sensitive)'{-s,--case-sensitive}'[match case sensitively]'
|
||||||
'(--noheading --heading)'{--noheading,--heading}'[print file names above matching contents]'
|
'(--noheading --heading)'{--noheading,--heading}'[print file names above matching contents]'
|
||||||
)
|
)
|
||||||
fi
|
fi
|
||||||
if [[ ag_version > 0.24 ]]; then
|
if [[ $ag_version > 0.24 ]]; then
|
||||||
AG_OPTS+=(
|
AG_OPTS+=(
|
||||||
'(-s --case-sensitive)'{-s,--case-sensitive}'[Match case sensitively. Default on.]'
|
'(-s --case-sensitive)'{-s,--case-sensitive}'[Match case sensitively. Default on.]'
|
||||||
'(-H --noheading --heading)'{-H,--noheading,--heading}'[print file names above matching contents]'
|
'(-H --noheading --heading)'{-H,--noheading,--heading}'[print file names above matching contents]'
|
||||||
|
@ -101,18 +101,18 @@ _ag_add_version_opts() {
|
||||||
)
|
)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ ag_version > 0.26 ]]; then
|
if [[ $ag_version > 0.26 ]]; then
|
||||||
AG_OPTS+=(
|
AG_OPTS+=(
|
||||||
'(-0 --null --print0)'{-0,--null,--print0}'[separate the filenames with \\0, rather than \\n]'
|
'(-0 --null --print0)'{-0,--null,--print0}'[separate the filenames with \\0, rather than \\n]'
|
||||||
)
|
)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ ag_version <= 0.27 ]]; then
|
if [[ $ag_version <= 0.27 ]]; then
|
||||||
AG_OPTS+=(
|
AG_OPTS+=(
|
||||||
'--depth[Search up to NUM directories deep. Default is 25.]:number'
|
'--depth[Search up to NUM directories deep. Default is 25.]:number'
|
||||||
)
|
)
|
||||||
fi
|
fi
|
||||||
if [[ ag_version > 0.27 ]]; then
|
if [[ $ag_version > 0.27 ]]; then
|
||||||
AG_OPTS+=(
|
AG_OPTS+=(
|
||||||
'(-c --count)'{-c,--count}'[only print the number of matches in each file]'
|
'(-c --count)'{-c,--count}'[only print the number of matches in each file]'
|
||||||
'--depth[Search up to NUM directories deep, -1 for unlimited. Default is 25.]:number'
|
'--depth[Search up to NUM directories deep, -1 for unlimited. Default is 25.]:number'
|
||||||
|
@ -120,12 +120,12 @@ _ag_add_version_opts() {
|
||||||
)
|
)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ ag_version <= 0.28 ]]; then
|
if [[ $ag_version <= 0.28 ]]; then
|
||||||
AG_OPTS+=(
|
AG_OPTS+=(
|
||||||
'(--no-numbers)--no-numbers[don´t show line numbers]'
|
'(--no-numbers)--no-numbers[don´t show line numbers]'
|
||||||
)
|
)
|
||||||
fi
|
fi
|
||||||
if [[ ag_version > 0.28 ]]; then
|
if [[ $ag_version > 0.28 ]]; then
|
||||||
AG_OPTS+=(
|
AG_OPTS+=(
|
||||||
'(--nofilename --filename)'{--nofilename,--filename}'[Print file names. Default on, except when searching a single file.]'
|
'(--nofilename --filename)'{--nofilename,--filename}'[Print file names. Default on, except when searching a single file.]'
|
||||||
'(--nonumbers --numbers)'{--nonumbers,--numbers}'[Print line numbers. Default is to omit line numbers when searching streams]'
|
'(--nonumbers --numbers)'{--nonumbers,--numbers}'[Print line numbers. Default is to omit line numbers when searching streams]'
|
||||||
|
|
Loading…
Reference in New Issue