NOTE: Under Construction - I'm in the middle of upgrading my site and lots of stuff is kinda broken. Please forgive the mess.

Use 'type' To Figure Out Which File A bash Function Is In

I write a bunch of little functions for frequently used command line commands. For example, I have this for browser-sync in my dotfiles:

January 2024
function bs () {

browser-sync . --port 3939 \
--watch --directory \
--no-notify --no-inject-changes


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:

type bs
bs is a shell function from 
═══ § ═══

Footnotes And References