<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Zsh on ilikeorangutans</title><link>https://kuelzer.ca/tags/zsh/</link><description>Recent content in Zsh on ilikeorangutans</description><generator>Hugo</generator><language>en</language><copyright>© 2026 Jakob Külzer</copyright><lastBuildDate>Sun, 12 Apr 2026 14:27:24 -0400</lastBuildDate><atom:link href="https://kuelzer.ca/tags/zsh/index.xml" rel="self" type="application/rss+xml"/><item><title>zsh Autocompletion Caveat</title><link>https://kuelzer.ca/posts/2019/08/23/zsh-autocompletion-caveat/</link><pubDate>Fri, 23 Aug 2019 14:21:43 -0400</pubDate><guid>https://kuelzer.ca/posts/2019/08/23/zsh-autocompletion-caveat/</guid><description>&lt;p&gt;I spent a good hour trying to get a custom completion script working while porting my app &lt;a href="https://github.com/ilikeorangutans/harbormaster"&gt;Harbormaster&lt;/a&gt; to &lt;a href="https://github.com/spf13/cobra"&gt;Cobra&lt;/a&gt;. 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 &lt;a href="https://github.com/zsh-users/zsh-completions/issues/277#issuecomment-72867242"&gt;post&lt;/a&gt; on Github that held the solution: remove the .zcompdump file which holds the cached completions. So I ran &lt;code&gt;rm ~/.zcompdump &amp;amp;&amp;amp; compinit&lt;/code&gt; and everything works as expected.&lt;/p&gt;</description></item><item><title>gorename and invalid expression</title><link>https://kuelzer.ca/posts/2015/10/23/gorename-and-invalid-expression/</link><pubDate>Fri, 23 Oct 2015 13:59:40 -0400</pubDate><guid>https://kuelzer.ca/posts/2015/10/23/gorename-and-invalid-expression/</guid><description>&lt;p&gt;This took me longer to figure out than I care to admit, so here&amp;rsquo;s the solution.&lt;/p&gt;
&lt;p&gt;The issue comes up when trying to use &lt;a href="https://godoc.org/golang.org/x/tools/cmd/gorename"&gt;gorename&lt;/a&gt;:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-console" data-lang="console"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="gp"&gt;$&lt;/span&gt; gorename -from &lt;span class="s2"&gt;&amp;#34;github.com/ilikeorangutans/foo&amp;#34;&lt;/span&gt;.MyType -to &lt;span class="s1"&gt;&amp;#39;MyBetterType&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt;gorename: -from &amp;#34;github.com/ilikeorangutans/foo.MyType&amp;#34;: invalid expression
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Even though the &lt;code&gt;from&lt;/code&gt; query looks normal, &lt;code&gt;gorename&lt;/code&gt; just refuses to work. However the issue is not so much with &lt;code&gt;gorename&lt;/code&gt; but rahter my shell, zsh. Turns out properly escaping your from query, fixes the issue:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-console" data-lang="console"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="gp"&gt;$&lt;/span&gt; gorename -from &lt;span class="s1"&gt;&amp;#39;&amp;#34;github.com/ilikeorangutans/foo&amp;#34;.MyType&amp;#39;&lt;/span&gt; -to &lt;span class="s1"&gt;&amp;#39;MyBetterType&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt;Renamed 15 occurrences in 5 files in 1 package.
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Notice the single quotes around the entire &lt;code&gt;from&lt;/code&gt; parameter.&lt;/p&gt;</description></item></channel></rss>