mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-11-12 21:39:48 +01:00
alias-finder: fix wc numeric conditional (#8251)
Never use `[[` for numeric comparisons, for that, we’ll use `((`.
This commit is contained in:
parent
9785d24172
commit
e363109a6d
1 changed files with 1 additions and 1 deletions
|
@ -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}"
|
||||||
|
|
Loading…
Reference in a new issue