You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
将需要用户手动添加至profile或.bashrc等的代码单独提取出来
像 zoxide、thefuck、fzf
Extract the code that requires users to manually add it to 'profile' or '. bashrc' separately
Like zoxide, thefuck, fzf
Usage Scenario | 需求背景/使用场景
方便用户不用每次profile变更都去更改
方便程序统一自动添加、修改、删除、检测
Convenient for users to not have to change their profile every time it changed
Convenient for unified automatic addition, modification, deletion, and detection of programs
Maybe Solutions | 可能的实现方案 - (if you are developer)
提示用户将 xlings init | source 添加至 .bashrc 等文件内
程序根据使用的 shell 输出代码
Prompt users to add xlings init | source to files such as .bashrc
The program outputs code based on the shell used
profile_a、profile_b:可以代表不同的程序、不同的功能
一个功能的实现修改了 不需要检测其他部分 修改此功能的profile即可
profile_a、profile_b: Can represent different programs and functions
The implementation of a function can be modified without detecting other parts. Changing the profile of this function is sufficient
内部可以有一些逻辑 如
zsh 缺失 profile_b 但 zsh 兼容 bash,日志记录警告 并执行 bash 的 profile_b
fish 也缺失 profile_b 但 fish 不兼容 bash,输出错误并跳过执行
如果只想让 bash 执行 profile_b 而 zsh 不执行 则创建 zsh/profile_b 空文件
There may be some internal logic, such as
zsh is missing profile_b, but zsh is compatible with bash, logging warnings and executes bash/profile_b
fish is also missing profile_b, but it is not compatible with bash, resulting in output errors and skipping execution
If you only want bash to execute profile_b without zsh executing it, create an empty zsh/profile_b file
检测可以这样 调用的时候加一个 INVOKED_XLINGS_PROFILE=1 环境变量然后检测就行了
Add an INVOKED_XLINGS_PROFILE=1 variable and when I want to check if the user has executed the setup script then detect it
Additional context | 额外补充
The text was updated successfully, but these errors were encountered:
Features Describe | 功能描述
将需要用户手动添加至
profile
或.bashrc
等的代码单独提取出来像 zoxide、thefuck、fzf
Extract the code that requires users to manually add it to 'profile' or '. bashrc' separately
Like zoxide, thefuck, fzf
Usage Scenario | 需求背景/使用场景
方便用户不用每次profile变更都去更改
方便程序统一自动添加、修改、删除、检测
Convenient for users to not have to change their profile every time it changed
Convenient for unified automatic addition, modification, deletion, and detection of programs
Maybe Solutions | 可能的实现方案 - (if you are developer)
创建一个目录 profiles
mkdir profiles
profiles
├── bash
│ ├── profile_a
│ └── profile_b
├── fish
│ └── profile_a
└── zsh
│ └── profile_a
提示用户将
xlings init | source
添加至.bashrc
等文件内程序根据使用的 shell 输出代码
Prompt users to add
xlings init | source
to files such as.bashrc
The program outputs code based on the shell used
profile_a、profile_b:可以代表不同的程序、不同的功能
一个功能的实现修改了 不需要检测其他部分 修改此功能的profile即可
profile_a、profile_b: Can represent different programs and functions
The implementation of a function can be modified without detecting other parts. Changing the profile of this function is sufficient
内部可以有一些逻辑 如
zsh 缺失 profile_b 但 zsh 兼容 bash,日志记录警告 并执行 bash 的 profile_b
fish 也缺失 profile_b 但 fish 不兼容 bash,输出错误并跳过执行
如果只想让 bash 执行 profile_b 而 zsh 不执行 则创建 zsh/profile_b 空文件
There may be some internal logic, such as
zsh is missing profile_b, but zsh is compatible with bash, logging warnings and executes
bash/profile_b
fish is also missing profile_b, but it is not compatible with bash, resulting in output errors and skipping execution
If you only want bash to execute profile_b without zsh executing it, create an empty
zsh/profile_b
file检测可以这样 调用的时候加一个
INVOKED_XLINGS_PROFILE=1
环境变量然后检测就行了Add an
INVOKED_XLINGS_PROFILE=1
variable and when I want to check if the user has executed the setup script then detect itAdditional context | 额外补充
The text was updated successfully, but these errors were encountered: