You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@aashutoshrathi following func is what I use, but as you can see it only reads the .zshrc file. We can check for the shell and determine where to look. I was also 🤔 if it's possible to check the self file name? If so same function could be used in any number of rc files.
cmdmatch () {
# --help
if [[ $1 == '--help' ]]; then
echo "Usage: cmdmatch <pattern>";
return 0;
fi
# Return matching aliases
grep "alias" ~/.zshrc | grep "$1";
# error if no arguments
if [ $# -eq 0 ]; then
echo "No arguments supplied"
return 1
fi
}
The text was updated successfully, but these errors were encountered:
@aashutoshrathi following func is what I use, but as you can see it only reads the
.zshrc
file. We can check for the shell and determine where to look. I was also 🤔 if it's possible to check the self file name? If so same function could be used in any number of rc files.The text was updated successfully, but these errors were encountered: