Created
September 4, 2013 18:36
-
-
Save EvanLovely/6440960 to your computer and use it in GitHub Desktop.
Bash Function to search through your Bash Aliases and Functions and display helpful text in the prompt.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # search bash aliases | |
| sba() { | |
| cat ~/.bash_aliases | grep -i -A 1 "^#.*$*" | |
| cat ~/.bash_aliases | grep -i -B 1 "^alias.*$*" | |
| cat ~/.bash_functions | grep -i -A 1 "^#.*$*" | |
| } |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I would also like it if one could retrieve multi-line comments before a function/alias.