Use 'type' To Figure Out Which File A bash Function Is In
January 2024
I write a bunch of little functions for frequently used command line commands. For example, I have this for browser-sync in my dotfiles:
The problem is I can never remember I put those file.
Using which or whence doesn't show the file location. Just the function or its name.
type gets you to the file path though:
Output:
bs is a shell function from
/Users/alan/.zsh_tools/bs.zsh
Figuring that out will be less of a problem one I have everythig moved into my grimoire and can search for them there. Until then, this has me covered.
end of line