Feature: avoid this in Alias
c4ir0 opened this issue · 4 comments
I faced a problem while making aliases i hope this note would help
(Note : deal with ~/.bashrc or ~/.zshrc according to the shell u use )
make sure first what shell do use the command below will let u know :
echo "$SHELL"
why do you have to know ..? because editing the ~/.bashrc
while u use zsh and even resourcing or logging out will give no benefit since u configure a file for shell ur not currently using
commands :
if u use zsh ~> nano /.zshrc
if u use bash ~> nano /.bashrc
and so on ..
Great suggestion! I’ll have to submit a PR to add this information! Thanks for bringing this up!
I'd like to provide a counter argument.
The chapter to which you are referencing is called Creating custom bash commands
. The title tells me that I need to personally convert concepts to my environment, if I choose to use something different than bash itself.
There is no end to this if you cater to an alternate shell. You can't possibly cover every solution, both present and future.
This is a valid point @FearTheBadger! Maybe just a warning mentioning that if the user uses a different shell then they need to update the corresponding file rather than trying to list all possible ones.
I'd like to provide a counter argument.
The chapter to which you are referencing is called
Creating custom bash commands
. The title tells me that I need to personally convert concepts to my environment, if I choose to use something different than bash itself.There is no end to this if you cater to an alternate shell. You can't possibly cover every solution, both present and future.
it really worth to check that I wrote I faced a problem while making aliases i hope this note would help in bold meaning as a beginner you might ( or will ) face such a problem especially while using OS deploys other shells (not bash) by default , so take care ... but not meant to use alternative ways to do the same job in bash with other shells !!