Sample Header Ad - 728x90

zsh alias causes error if used in fish

-1 votes
1 answer
63 views
I have the following aliases in my zsh:
alias -- -='cd -'
alias ..='cd ..'
alias ...='cd ../..'
When I switch to fish, by manually typing fish and pressing Return, the first alias causes an error:
- (line 1): function: -: invalid function name
function -  --description 'alias -=cd -';  cd - $argv
How to workaround this?
Asked by jsx97 (1347 rep)
Mar 1, 2025, 07:11 PM
Last activity: Mar 1, 2025, 07:32 PM