Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Oh My Zsh
Commits
e363109a
Commit
e363109a
authored
Oct 27, 2019
by
Vice Versa
Committed by
Marc Cornellà
Oct 27, 2019
Browse files
alias-finder: fix wc numeric conditional (#8251)
Never use `[[` for numeric comparisons, for that, we’ll use `((`.
parent
9785d241
Changes
1
Hide whitespace changes
Inline
Side-by-side
plugins/alias-finder/alias-finder.plugin.zsh
View file @
e363109a
...
@@ -14,7 +14,7 @@ alias-finder() {
...
@@ -14,7 +14,7 @@ alias-finder() {
esac
esac
done
done
cmd
=
$(
sed
's/[].\|$(){}?+*^[]/\\&/g'
<<<
$cmd
)
# adds escaping for grep
cmd
=
$(
sed
's/[].\|$(){}?+*^[]/\\&/g'
<<<
$cmd
)
# adds escaping for grep
if
[[
$(
wc
-l
<<<
$cmd
)
==
1
]]
;
then
if
((
$(
wc
-l
<<<
$cmd
)
==
1
))
;
then
while
[[
$cmd
!=
""
]]
;
do
while
[[
$cmd
!=
""
]]
;
do
if
[[
$longer
=
true
]]
;
then
if
[[
$longer
=
true
]]
;
then
wordStart
=
"'{0,1}"
wordStart
=
"'{0,1}"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment