#!/bin/sh # Show type & contents of given files or PWD for last; do true; done last=${last:-.} file "$last" | grep -v --color=never directory case "$(file --dereference --mime "$last")" in *inode/directory*) ls -l --color=auto --human-readable --group-directories-first --file-type --dereference-command-line --all --reverse "$@";; *binary) ;; *) bat --style header "$@";; esac