~ecs/tm

tm/tm-object-type -rwxr-xr-x 187 bytes
0022137dEmber Sawady Fix shellcheck warnings 2 years ago
                                                                                
1
2
3
4
5
6
7
8
#!/bin/sh

# shellcheck source=./lib.sh
. "$(dirname -- "$0")/lib.sh"
[ $# -eq 1 ] || abort "usage: tm object-type <ref>"

ref="$(tm resolve-ref "$1")" || exit 1
tm cat "$ref" | head -n1