diff options
| author | 1ridic <[email protected]> | 2023-09-14 21:18:20 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-09-14 09:18:20 -0400 |
| commit | ec9bbaceda96759787107da16f7ed174b257216c (patch) | |
| tree | c4f8b6b3ed69bcae2fb76758ad81933ccc939101 /tools | |
| parent | 12592458b9c31727e0181a6f9274e4ef5f2ad011 (diff) | |
[tools] support Env for fish shell
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/menuconfig.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/menuconfig.py b/tools/menuconfig.py index aaf4c9e888..678f23bf03 100644 --- a/tools/menuconfig.py +++ b/tools/menuconfig.py @@ -219,6 +219,11 @@ def touch_env(): if sys.platform != 'win32': env_sh = open(os.path.join(env_dir, 'env.sh'), 'w') env_sh.write('export PATH=~/.env/tools/scripts:$PATH') + + # if fish config exists, generate env.fish + if os.path.exists(os.path.join(home_dir, '.config', 'fish', 'config.fish')): + env_fish = open(os.path.join(env_dir, 'env.fish'), 'w') + env_fish.write('set -gx PATH ~/.env/tools/scripts $PATH') else: if os.path.exists(os.path.join(env_dir, 'tools', 'scripts')): os.environ["PATH"] = os.path.join(env_dir, 'tools', 'scripts') + ';' + os.environ["PATH"] |
