11 lines
419 B
Bash
Executable File
11 lines
419 B
Bash
Executable File
#!/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) ;;
|
|
*) $(test -f "$last" -a ! -r "$last") bat --style header "$@";;
|
|
esac
|