Closed Efrem-Braun closed 8 months ago
They are working in my Bash. I tried all the versions of Bash from 3.2 to 5.2, where I confirmed that the alias gc!
can be defined and that it is expanded as expected.
Title: aliases with bang don't work for all users
So you seem to have known that these aliases may work for some users and not for some other users (including you). Do you have an idea why the behavior differs depending on the user?
don't work for me.
Could you explain what that means? Do they produce error messages on the loading time? Do they produce error messages when you try to use them? Are they not expanded when you try to use them? Do they perform something different from your expectations? Or do no operations seem to be performed when you have aliases with an exclamation mark in your command line? There are still other possibilities.
For troubleshooting help, I see these aliases were just taken from oh-my-zsh
Yes, but do you have an idea about how I can use that information for troubleshooting?
My apologies, I hadn't re-sourced my .bashrc. All is working. Thank you for your help, and I'm sorry to have wasted your time!
No problem. Good to hear that you solved the problem.
I'm running CentOS Linux 7, and the aliases with an exclamation mark (e.g., gc! in https://github.com/ohmybash/oh-my-bash/blob/master/plugins/git/git.plugin.sh) don't work for me.
For troubleshooting help, I see these aliases were just taken from oh-my-zsh, and these bang aliases were introduced in https://github.com/ohmyzsh/ohmyzsh/commit/f7f487c42666adfe7b94ebed4714ed212ed22cb9.