bash - a nice path formatter -- nice_path()

in «tip» by Michael Beard
Tags: , , , , ,

Here is a shell function and alias to define a way to view your PATH environment variable (i.e. - one directory path per line). Don't need to too often, but when I do, it's quite useful:

nice_path() {
    tr ':' '\n' <<< $PATH
}
alias nicepath=nice_path

I made it an alias as well, as it's easier to get a (short) list of aliases, versus a list of shell function.