Can anyone help me configure the GOPATH in fish shell? (and PATH if you know off hand)

blov · · 372 次点击    
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
<p>I love fish but I need to switch into bash to actually use Go because the PATH updates either don&#39;t work or are temporary. </p> <hr/>**评论:**<br/><br/>thesnowmancometh: <pre><p>In <code>~/.config/fish/config.fish</code>, append the line <code>set -x GOPATH &#34;&lt;gopath&gt;&#34;</code> where <code>&lt;gopath&gt;</code> is the path to your GOPATH.</p></pre>justinisrael: <pre><p>I&#39;ve never used fish shell, but can you just update your configuration file with GOPATH and PATH? <a href="https://fishshell.com/docs/current/faq.html#faq-login-cmd" rel="nofollow">https://fishshell.com/docs/current/faq.html#faq-login-cmd</a></p></pre>reddit_is_r_cringe: <pre><p>The way recommended in the FAQ doesn’t seem to work — it only temporarily changes it to work for Go, while commands like ls become broken (but cd works for some reason)</p></pre>KenjiTakahashi: <pre><p>I know it&#39;s just a side thing, but <code>cd</code> is (usually) a shell builtin, whereas <code>ls</code> is a separate program. Something probably messes up the &#34;standard&#34; <code>PATH</code>.</p></pre>AndyNemmity: <pre><p>I use fish shell, and it just works. Can you give more detail on your problem?</p></pre>alistercabral: <pre><p>export GOPATH=your_path_here</p></pre>

入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889

372 次点击  
加入收藏 微博
0 回复
暂无回复
添加一条新回复 (您需要 登录 后才能回复 没有账号 ?)
  • 请尽量让自己的回复能够对别人有帮助
  • 支持 Markdown 格式, **粗体**、~~删除线~~、`单行代码`
  • 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
  • 图片支持拖拽、截图粘贴等方式上传