nu: Copy basic sh aliases
Held back a little by the issue that you can't really set aliases conditionally (yet?) in nushell, which is kind of fundamental to my zsh/sh alias setup. If a program exists, we add some nice aliases -- if not, we simply degrade gracefully and don't add anything. PR to track issue: https://github.com/nushell/nushell/issues/5068
This commit is contained in:
parent
dc8030f905
commit
dc71f747da
3 changed files with 63 additions and 15 deletions
|
|
@ -8,7 +8,10 @@ exist() { type "$1" >/dev/null 2>&1; }
|
|||
unalias -a
|
||||
|
||||
if alias v >/dev/null 2>&1; then
|
||||
if exist vim; then
|
||||
if exist nvim; then
|
||||
alias v="nvim"
|
||||
alias vim="vi"
|
||||
elif exist vim; then
|
||||
alias v="vim"
|
||||
else
|
||||
alias v="vi"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue