#!/bin/sh -e
#
# ffl - fancy file viewer - prints a source code file with syntax highlighting
# dependencies: source-highlight (gdb)

input="$1"
tab_spaces_width=4
[ -n "${input}" ] && input="-i${input}"
shift

exec source-highlight --out-format=esc --output=STDOUT "${input}" "$@" \
  | expand -t"${tab_spaces_width}" \
  | nl -ba
