I have shell script that uses
type -t, but since apparently it was originally written for bash and on this machine I on zsh, it's not working.
I see bash docs that
type -t does:
If the -t option is used, type prints a single word which is one of ‘alias’, ‘function’, ‘builtin’, ‘file’ or ‘keyword’, if name is an alias, shell function, shell builtin, disk file, or shell reserved word, respectively. If the name is not found, then nothing is printed, and type returns a failure status.
But in zsh,
type doesn't accept the
-t option, and it actually aliases to
type [ -fpam ] name ... Same as whence -v.
For each name, indicate how it would be interpreted if used as a command name. The '-v' flag produces a more verbose report. The '-c' flag prints the results in a csh-like format and takes precedence over '-v'. The '-f' flag causes the contents of a shell function to be displayed, which would otherwise not happen unless the '-c' flag were used. The '-p' flag does a path search for name even if it is an alias, reserved word, shell function or builtin. The '-a' flag does a search for all occurrences of name throughout the command path. With the '-m' flag, the arguments are taken as patterns (which should be quoted), and the information is displayed for each command matching one of these patterns.
Which does not included the desired output. A way to get the en equivalent result on zsh? Changing shells is not an option on this machine.