用鱼壳修改PATH [英] Modifying PATH with fish shell

查看:157
本文介绍了用鱼壳修改PATH的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在使用鱼壳播放,而且我在围绕 PATH 变量设置。为什么值得,我也使用哦我的鱼

I'm currently playing around with the fish shell and I'm having some trouble wrapping my head around how the PATH variable is set. For what it's worth, I'm also using oh-my-fish.

如果我回应我目前的路径,我得到:

If I echo my current path I get:

➜ fish echo $PATH
/usr/local/bin /usr/bin /bin /usr/sbin /sbin /usr/local/bin /opt/X11/bin /usr/texbin /Users/myname/.opam/system/bin

看看〜/ .config / fish / config.fish 我看到以下行

set PATH /usr/local/bin $PATH /Users/myname/.opam/system/bin

我的问题是(和这个短语可能会反映我对这个问题的了解不足):在code> config.fish 正在处理,哪里是 PATH 变量集?即: / usr / local / bin /Users/myname/.opam/system/bin 来自?

My question is (and this phrasing will probably reflect my lack of knowledge on the subject): prior to config.fish being processed, where is the PATH variable set? ie: where do all of the paths between /usr/local/bin and /Users/myname/.opam/system/bin come from?

推荐答案

此命令:

set -U fish_user_paths /usr/local/bin $fish_user_paths

将永久添加 / usr / local / bin

这篇关于用鱼壳修改PATH的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆