# fish **Repository Path**: hevey88/fish ## Basic Information - **Project Name**: fish - **Description**: fish config - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-07-22 - **Last Updated**: 2026-05-16 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README 调用 CS_PATH in linux login from tty(虚拟终端) /bin/login will use ENV_PATH in /etc/login.defs file (rocky not setting default is /usr/bin the same as getconf PATH) and then /etc/profile fish will not read ~/.profile,but bash do getconf PATH /bin:/usr/bin linux ssh login /etc/ssh/sshd_config This sshd was compiled with PATH=/usr/local/bin:/usr/bin:/bin:/usr/games as login shell(不继承其他 shell) read /etc/profile continue add some path in /usr/share/fish/vendor_conf.d/00debian-profile.fish not default login shell(继承其他 shell read from /etc/profile and ~/.profile) not default login shell terminal app read from GUI(systemctl --user show-environment) kitty.conf add env PATH env PATH=${PATH}:/usr/local/bin:/opt/homebrew/bin:${HOME}/miniforge3/bin pass to fish 调用 CS_PATH in macos getconf -a | grep PATH /usr/bin:/bin:/usr/sbin:/sbin macos ssh login /etc/ssh/sshd_config This sshd was compiled with PATH=/usr/bin:/bin:/usr/sbin:/sbin as login shell(不继承其他 shell) set path from /etc/paths and /etc/paths/\* getconf PATH /usr/bin:/bin:/usr/sbin:/sbin not default login shell kitty(kitty getconf PATH /usr/bin:/bin:/usr/sbin:/sbin) kitty.conf kitty 一定传递 env 过去,因为要添加/Applications/kitty.app/Contents/MacOS kitty bin 目录 kitty 传递过去的 PATH 为/Applications/kitty.app/Contents/MacOS:/usr/bin:/bin:/usr/sbin:/sbin 后面部分是getconf PATH env PATH=${PATH}:/usr/local/bin:/opt/homebrew/bin:${HOME}/miniforge3/bin 首先继承父进程(kitty)的PATH环境变量 如果父进程没有设置PATH,则使用系统配置的PATH(通过confstr(\_CS_PATH)获取) 如果系统配置不可用,则使用编译时定义的默认路径(${PREFIX}/bin:/usr/bin:/bin)