Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tip: Add this to add a search parameter to gauth! #76

Open
hopeseekr opened this issue Jan 13, 2024 · 0 comments
Open

Tip: Add this to add a search parameter to gauth! #76

hopeseekr opened this issue Jan 13, 2024 · 0 comments

Comments

@hopeseekr
Copy link

hopeseekr commented Jan 13, 2024

This is the biggest Quality of Life (QoL) improvement for me:

Add this to your ~/.bash_profile to add a case-insensitive search parameter to gauth:

cat <<'TXT'  >> ~/.bash_profile
# Make gauth accept a case insensitive search argument.
function gauth() { `which gauth` | grep -i ^${1}; }
TXT
source ~/.bash_profile

Then, you can run gauth normally or with a search string... It searches from the first letter of each entry. If you want to search every entry, change ^ to .*.

$ gauth git
GitHub.com (hopeseekr)            000000 111111 222222
git.mycorp.com (tsmith)           000000 111111 222222
GitLab.com (hopeseekr)            000000 111111 222222

For a whole lot more QoL console improvements, check out my BashScripts framework.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant