Open akutz opened 3 years ago
I addressed some of these issues in #317, although in my own fork, I removed the glob for Go sources entirely, so I didn't commit a fix for that first. If you want to keep the glob, I could make a commit on the branch for that PR that fixes it (doesn't hurt anyone after all), although I would probably discard that commit for the merge back into my own master.
Hm, I have actually noticed this too! How odd.
Hi,
I just started using Zsh, not to mention oh-my-zsh, so please excuse me if I make a mistake triaging this issue. I was trying to get the Go prompt working for bullet-train (great theme by the way!), and I just couldn't. It turns out the logic that detects whether to use a Go prompt appears to be incorrect and incomplete:
Issue 1 - Glob Glob
Here's what I mean:
Create a temporary directory:
Enable extended glob:
Test for go sources:
Create a file that ends with
.go
:Test for go sources again:
Create a second file that ends with
.go
:Test for go sources again:
So why does the above fail? Because the
-f
operator does not work against multiple operands:Instead
zsh
indicates to use the-n
operator for detecting multiple files:Oh, and just to prove
-n
works in the other cases:Yep, works :)
Issue 2 - Go Modules
Finally, it looks like y'all don't yet support Go modules for detection. The detection line should be updated as follows (with the fix for the
s/-f/-n/
:Thanks!