Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

能否在定义alias之前检查是否已经存在定义的alias #10

Closed
darren opened this issue Feb 12, 2022 · 2 comments
Closed

能否在定义alias之前检查是否已经存在定义的alias #10

darren opened this issue Feb 12, 2022 · 2 comments

Comments

@darren
Copy link

darren commented Feb 12, 2022

例如在bash中已经定义了ls

alias ls='ls $LS_OPTIONS -lA'

现在 eval "$(ap --bash)"之后,alias变成了如下定义

alias ls='ap ls'

能否实现eval之后把ls定义为

alias ls='ap  $LS_OPTIONS -lA'
@flw-cn
Copy link
Owner

flw-cn commented Feb 12, 2022

我注意到这个问题了。因为我自己用 zsh,所以 zsh 下是花了心思的,可以保证这一点。
bash 和 fish 下确实存在此问题,正在想办法解决。
如果你有好办法,也欢迎通过 PR 贡献。

@flw-cn
Copy link
Owner

flw-cn commented Feb 12, 2022

已解决。 @darren

@flw-cn flw-cn closed this as completed Feb 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants