I've been a professional C, Perl, PHP and Python developer.
I'm an ex-sysadmin from the late 20th century.
These days I do more Javascript and CSS and whatnot, and promote UX and accessibility.
You have these stored in .bash_aliases (which is conventional) but I use an .aliases filename, because the alias command is pretty much the same in most shells. That means when I'm using zsh on a Mac, I don't feel dirty loading a bash configuration file.
I also put functions that are very close to being aliases in that file, which feels a little wrong, but if it's just to allow passing a single parameter to the middle of what would otherwise be an alias, I'm okay with it :)
I conditionally apply aliases that shadow other commands so as not to break functionality:
if command-v bat >/dev/null;then
alias cat='bat'fi
He/Him/His
I'm a Software Engineer and a teacher.
There's no feeling quite like the one you get when you watch someone's eyes light up learning something they didn't know.
I actually store mine in a git repo and then add a line to my .bashrc to source the files in that repo (the repo is here if you're curious), but I used .bash_aliases here to follow convention (and because most .bashrc's are already configured to look there).
Yeah, I also have a few functions in my alias file, for the same reason. If it looks like an alias, acts like an alias... 😉
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
You have these stored in
.bash_aliases
(which is conventional) but I use an.aliases
filename, because the alias command is pretty much the same in most shells. That means when I'm usingzsh
on a Mac, I don't feel dirty loading abash
configuration file.I also put functions that are very close to being aliases in that file, which feels a little wrong, but if it's just to allow passing a single parameter to the middle of what would otherwise be an alias, I'm okay with it :)
I conditionally apply aliases that shadow other commands so as not to break functionality:
And I split things up if I need to like this:
I actually store mine in a git repo and then add a line to my .bashrc to source the files in that repo (the repo is here if you're curious), but I used .bash_aliases here to follow convention (and because most .bashrc's are already configured to look there).
Yeah, I also have a few functions in my alias file, for the same reason. If it looks like an alias, acts like an alias... 😉