Open personinblack opened 3 years ago
The quotes just essential disable the match I think (which you would see that the ahead and before symbols are no longer present in the prompt). The issue is that index is empty for some reason which breaks the call to match (now missing an argument).
Ok, after reading the docs, it seems that "If [variable] is not defined, then it will expand to zero arguments, unless quoted" https://fishshell.com/docs/current/cmds/test.html?highlight=test#examples So I was wrong, the condition still functions as long as index is defined. I had this happen on one of my repos as well. The quotes did fix it, but I have no idea why index would be undefined. :shrug:
Bug Report
Current Behavior I see this error when I am in my dotfiles:
with $index ==
Relevant
Fish
Configuration https://github.com/personinblack/dotfiles/blob/master/fish/.config/fish/config.fishEnvironment
2.7.0
3.1.2
fisher
suckless terminal
Arch Linux
Possible Solution Putting
$index
s inside quotes fixes it. Like this:test (string match '*ahead*' "$index")
Additional context/Screenshots Don't know if this is the right way to fix or if I get this error because of my configuration. I can create a PR if it's okay.