Commit e363109a authored by Vice Versa's avatar Vice Versa Committed by Marc Cornellà
Browse files

alias-finder: fix wc numeric conditional (#8251)

Never use `[[` for numeric comparisons, for that, we’ll use `((`.
parent 9785d241
......@@ -14,7 +14,7 @@ alias-finder() {
esac
done
cmd=$(sed 's/[].\|$(){}?+*^[]/\\&/g' <<< $cmd) # adds escaping for grep
if [[ $(wc -l <<< $cmd) == 1 ]]; then
if (( $(wc -l <<< $cmd) == 1 )); then
while [[ $cmd != "" ]]; do
if [[ $longer = true ]]; then
wordStart="'{0,1}"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment