I always forget how simple it is to show the definition of bash function or alias (via: Stack Overflow)
Posted by jpluimers on 2022/02/17
I always facepalm myself after looking up this: [Wayback] Can bash show a function’s definition? – Stack Overflow (thanks [Wayback] Benjamin Bannier!):
…
Use
type
. Iffoobar
is e.g. defined in your~/.profile
:
$ type foobar foobar is a function foobar { echo "I'm foobar" }
…
type
will also expand aliases, which is a nice bonus :) – [Wayback] Esdras Lopez
–jeroen
Leave a Reply