1 2 3 4 5 6 7 8 9
#!/bin/sh [ -d "$1" ] && { tree -CL 3 "$1"; exit; } if command -V highlight >/dev/null; then highlight --force --out-format=ansi -- "$1" else cat "$1" fi