Skip to content

Commit ec9bbac

Browse files
authored
[tools] support Env for fish shell
1 parent 1259245 commit ec9bbac

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tools/menuconfig.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,11 @@ def touch_env():
219219
if sys.platform != 'win32':
220220
env_sh = open(os.path.join(env_dir, 'env.sh'), 'w')
221221
env_sh.write('export PATH=~/.env/tools/scripts:$PATH')
222+
223+
# if fish config exists, generate env.fish
224+
if os.path.exists(os.path.join(home_dir, '.config', 'fish', 'config.fish')):
225+
env_fish = open(os.path.join(env_dir, 'env.fish'), 'w')
226+
env_fish.write('set -gx PATH ~/.env/tools/scripts $PATH')
222227
else:
223228
if os.path.exists(os.path.join(env_dir, 'tools', 'scripts')):
224229
os.environ["PATH"] = os.path.join(env_dir, 'tools', 'scripts') + ';' + os.environ["PATH"]

0 commit comments

Comments
 (0)