Monday, January 7, 2013
List Source for Bash Functions
If you use alias, then just typing alias will give you all the defined aliases, and alias alias_name will tell you what a particular alias does. For functions defined in .bashrc and other places, you can use:
declare -f
which will give you the names of all functions currently defined, and:
type function_name
which will give you the source for a particular function.
(declare -F will give names and sources, like alias does, but it's usually too much information)
Subscribe to:
Post Comments (Atom)
I think you got it the other way around. -f gives names and sources, -F gives only the function names.
ReplyDelete