oh-my-fish / theme-bobthefish

A Powerline-style, Git-aware fish theme optimized for awesome.
MIT License
1.44k stars 222 forks source link

[: Expected a combining operator like '-a' at index 3 #322

Closed o-lenczyk closed 4 months ago

o-lenczyk commented 2 years ago

full error:

[: Expected a combining operator like '-a' at index 3
-z -o  = default
      ^
~/.local/share/omf/themes/bobthefish/functions/fish_prompt.fish (line 641):
    and [ -z $namespace -o "$namespace" = 'default' ]
        ^
in function '__bobthefish_prompt_k8s_context'
        called on line 1166 of file ~/.local/share/omf/themes/bobthefish/functions/fish_prompt.fish
in function 'fish_prompt'
in command substitution

Please let me know if I should provide any other information.

bobthecow commented 2 years ago

Try wrapping $namespace in quotation marks?

Strum355 commented 1 year ago

Quoting $namespace seems to fix this problem, although its a bit fiddly to reproduce by switching between namespaces and then running a command like which