Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ##
- # Super Directory Listing
- ##
- # Ridiculous amounts of crap going on just for a directory listing
- alias ll="{ printf '\x1b[34m<index \x1b[32mlocation\x1b[35m=\x1b[1;33m\"' && pwd -P | tr -d '\n' && printf '\"\x1b[34m>\x1b[00m\n' && ls -aBFhopv --color=always --group-directories-first --hide=.svn --time-style=iso && printf '\x1b[34m</index>\x1b[00m'; } |more -ds"
- ##
- # The Breakdown...
- #
- # # Start our command block
- # {
- # # Print out <index location=", provide blue, green, magenta, and yellow color
- # # similar to syntax highlighting in some IDEs
- # printf '\x1b[34m<index \x1b[32mlocation\x1b[35m=\x1b[1;33m\"' &&
- #
- # # Print out ACTUAL current directory, strip the newline with tr -d
- # pwd -P | tr -d '\n' &&
- #
- # # Print out ">, provide yellow and blue color. Clear color settings to default
- # # with \x1b[00m, print a newline
- # printf '\"\x1b[34m>\x1b[00m\n' &&
- #
- # # List our directory contents, with a TON of options. Change to suit your taste
- # ls -aBFhopv --color=always --group-directories-first --hide=.svn --time-style=iso &&
- #
- # # Print a closing </index>, in blue. Reset colors afterwards
- # printf '\x1b[34m</index>\x1b[00m';
- #
- # # Close our command block, pipe the results through more for long directory listing goodness
- # } |more -ds
- ##
Advertisement
Add Comment
Please, Sign In to add comment