Skip to content

Conversation

@ai4bing
Copy link

@ai4bing ai4bing commented Nov 27, 2023

I tried to concatenate
".*/$__brain_suffix""[^/]*[^~]$"".*/$__brain_suffix[^/]*[^~]$"
in error with
_grepFindFilesToGrep:9: bad math expression: operand expected at `^/'
and can't find why.
Guessing this should work for linux

@suxatcode
Copy link
Owner

".*/$__brain_suffix""[^/]*[^~]$"".*/$__brain_suffix[^/]*[^~]$"

The reason is that array access in zsh works like this:

> a=(a b c)
> echo "$a[2]"
b

but "^" is not a valid array index, thus zsh complains. See 5.4.1: Using arrays.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants