[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Minor installation defects



>>>>> Marcus Brinkmann writes:

 MB> Ok, I was confused, because I asked on #debian how to test if a
 MB> command is a builtin or not, and they pointed me to "which",
 MB> which is obviously false.

trick:/pub/gnu$ which test
trick:/pub/gnu$ type test
test is a shell builtin
trick:/pub/gnu$ which which
trick:/pub/gnu$ type which
which is aliased to `type -path'
trick:/pub/gnu$ type type
type is a shell builtin
trick:/pub/gnu$ help type
type: type [-apt] name [name ...]
    For each NAME, indicate how it would be interpreted if used as a
    command name.
    
    If the -t option is used, returns a single word which is one of
    `alias', `keyword', `function', `builtin', `file' or `', if NAME is an
    alias, shell reserved word, shell function, shell builtin, disk file,
    or unfound, respectively.
    
    If the -p flag is used, either returns the name of the disk file
    that would be executed, or nothing if -t would not return `file'.
    
    If the -a flag is used, displays all of the places that contain an
    executable named `file'.  This includes aliases and functions, if and
    only if the -p flag is not also used.
    
    Type accepts -all, -path, and -type in place of -a, -p, and -t,
    respectively.
typeset: typeset [-afFrxi] [-p] name[=value] ...
    Obsolete.  See `declare'.
trick:/pub/gnu$

-- 
 Gordon Matzigkeit <gord@fig.org>  //\ I'm a FIG (http://www.fig.org/)
Committed to freedom and diversity \// I use GNU (http://www.gnu.org/)


Reply to: