all tags

Pages tagged with "zsh":

zsh Autocompletion Caveat

23 Aug 2019 , tagged: zsh, Go, Golang

I spent a good hour trying to get a custom completion script working while porting my app Harbormaster to Cobra. It would and would not work. I retried writing the file, restarting the shell and it would just not offer any completions. Eventually I stumbled upon a innocent looking post on Github that held the solution: remove the .zcompdump file which holds the cached completions. So I ran rm ~/.zcompdump && compinit and everything works as expected.

read more →

gorename and invalid expression

23 Oct 2015 , tagged: Golang, Go, zsh, Refactoring

This took me longer to figure out than I care to admit, so here’s the solution. The issue comes up when trying to use gorename: $ gorename -from "github.com/ilikeorangutans/foo".MyType -to 'MyBetterType' gorename: -from "github.com/ilikeorangutans/foo.MyType": invalid expression Even though the from query looks normal, gorename just refuses to work. However the issue is not so much with gorename but rahter my shell, zsh. Turns out properly escaping your from query, fixes the issue:

read more →