Add the --short flag to type (#6403)

* Add the `--succinct` flag to `type`

* Use `echo` rather than `printf`

* Change `succinct` to `short`; print path if known

* Clean up the printing logic ever so slightly
This commit is contained in:
Dan Martinez
2019-12-11 13:24:29 -08:00
committed by Fabian Homborg
parent 0b53e51634
commit 16dc606001
2 changed files with 18 additions and 3 deletions

View File

@@ -20,6 +20,8 @@ The following options are available:
- ``-a`` or ``--all`` prints all of possible definitions of the specified names.
- ``-s`` or ``--short`` suppresses function expansion when used with no options or with ``-a``/``--all``.
- ``-f`` or ``--no-functions`` suppresses function and builtin lookup.
- ``-t`` or ``--type`` prints ``function``, ``builtin``, or ``file`` if ``NAME`` is a shell function, builtin, or disk file, respectively.