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

Never use `[[` for numeric comparisons, for that, we’ll use `((`.
master
Vice Versa 6 years ago committed by Marc Cornellà
parent 9785d24172
commit e363109a6d
  1. 2
      plugins/alias-finder/alias-finder.plugin.zsh

@ -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}"

Loading…
Cancel
Save