Skip to content

Instantly share code, notes, and snippets.

@pyliaorachel
pyliaorachel / treeignore.sh
Last active January 21, 2019 00:22
Command to display directory tree structure ignoring everything in .gitignore
# Tested on AWS EC2 Linux
# tree -I '<pattern-to-ignore>' -> display tree
# grep -o '^[^#]*' .gitignore -> remove comments in .gitignore
# | sed 's/\/$//g' -> replace trailing '/' after directories
# | tr '\n' '|' -> join strings with '|'
tree -I $(grep -o '^[^#]*' .gitignore | sed 's/\/$//g' | tr '\n' '|')
# Tested on MacOSX

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name: