Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
5 added 5 characters in body; edited tags; edited title
source | link

zshrc vs bashrc aliases - alias ?= not working in zsh

I was lead to believe that there were no differences between aliases in zshrczsh and bashrc howeverbash, however that appears to not be the case. I had an alias that would help me familiarize myself with the command line utilities available to me, but after copying it over to the new zshrc.zshrc of mine, it fails to work. I have confirmed that it's not an error by changing the alias, which resolved the issue.

The command is aliased to ?. Why can I not use ? when creating an alias?

alias ?='pwd'

alias ?='echo hello'

alias ?='pwd'
alias ?='echo hello'

amongst others have been attempted. No alias mapped to ?? has worked, as mentioned.

It is located in the ~/.zshrc~/.zshrc file. I copied it from my .bashrc, as I have just decided to try zsh out.

zshrc vs bashrc aliases - alias ?= not working

I was lead to believe that there were no differences between aliases in zshrc and bashrc however, that appears to not be the case. I had an alias that would help me familiarize myself with the command line utilities available to me, but after copying it over to the new zshrc of mine, it fails to work. I have confirmed that it's not an error by changing the alias, which resolved the issue.

The command is aliased to ?. Why can I not use ? when creating an alias?

alias ?='pwd'

alias ?='echo hello'

amongst others have been attempted. No alias mapped to ? has worked, as mentioned.

It is located in the ~/.zshrc file. I copied it from my .bashrc, as I have just decided to try zsh out.

alias ? not working in zsh

I was lead to believe that there were no differences between aliases in zsh and bash, however that appears to not be the case. I had an alias that would help me familiarize myself with the command line utilities available to me, but after copying it over to the new .zshrc of mine, it fails to work. I have confirmed that it's not an error by changing the alias, which resolved the issue.

The command is aliased to ?. Why can I not use ? when creating an alias?

alias ?='pwd'
alias ?='echo hello'

amongst others have been attempted. No alias mapped to ? has worked, as mentioned.

It is located in the ~/.zshrc file. I copied it from my .bashrc, as I have just decided to try zsh out.

4 responded to comments
source | link

I was lead to believe that there were no differences between aliases in zshrc and bashrc however, that appears to not be the case. I had an alias that would help me familiarize myself with the command line utilities available to me, but after copying it over to the new zshrc of mine, it fails to work. I have confirmed that it's not an error by changing the alias, which resolved the issue.

The command is aliased to ?. Why can I not use ? when creating an alias?

alias ?='pwd'

alias ?='echo hello'

amongst others have been attempted. No alias mapped to ? has worked, as mentioned.

It is located in the ~/.zshrc file. I copied it from my .bashrc, as I have just decided to try zsh out.

I was lead to believe that there were no differences between aliases in zshrc and bashrc however, that appears to not be the case. I had an alias that would help me familiarize myself with the command line utilities available to me, but after copying it over to the new zshrc of mine, it fails to work. I have confirmed that it's not an error by changing the alias, which resolved the issue.

The command is aliased to ?. Why can I not use ? when creating an alias?

I was lead to believe that there were no differences between aliases in zshrc and bashrc however, that appears to not be the case. I had an alias that would help me familiarize myself with the command line utilities available to me, but after copying it over to the new zshrc of mine, it fails to work. I have confirmed that it's not an error by changing the alias, which resolved the issue.

The command is aliased to ?. Why can I not use ? when creating an alias?

alias ?='pwd'

alias ?='echo hello'

amongst others have been attempted. No alias mapped to ? has worked, as mentioned.

It is located in the ~/.zshrc file. I copied it from my .bashrc, as I have just decided to try zsh out.

3 responded to comment
source | link

I was lead to believe that there were no differences between aliases in zshrc and bashrc however, that appears to not be the case. I had an alias that would help me familiarize myself with the command line utilities available to me, but after copying it over to the new zshrc of mine, it fails to work. I have confirmed that it's not an error by changing the alias, which resolved the issue.

The command is aliased to ?. Why can I not use ?? when creating an alias?

It's aliased to ? that is the issue, the command it runs is irrelevant. I have tried with other commands and they also failed.

I was lead to believe that there were no differences between aliases in zshrc and bashrc however, that appears to not be the case. I had an alias that would help me familiarize myself with the command line utilities available to me, but after copying it over to the new zshrc of mine, it fails to work. I have confirmed that it's not an error by changing the alias, which resolved the issue.

Why can I not use ? when creating an alias?

It's aliased to ? that is the issue, the command it runs is irrelevant. I have tried with other commands and they also failed.

I was lead to believe that there were no differences between aliases in zshrc and bashrc however, that appears to not be the case. I had an alias that would help me familiarize myself with the command line utilities available to me, but after copying it over to the new zshrc of mine, it fails to work. I have confirmed that it's not an error by changing the alias, which resolved the issue.

The command is aliased to ?. Why can I not use ? when creating an alias?

2 responded to comment
source | link
1
source | link