Skip to content

Doesn't capture functions #1

@netikras

Description

@netikras

Nice utility!

Although it doesn't find functions (even the ones that are defined in ~/.bashrc). And functions are also executable constructs, which could easily wrap any binary in ${PATH}.

~/workspace/origin/target$ top() { echo 'hey!'; /bin/ls ${@}; }

~/workspace/origin/target$ top
hey!
origin	origin.o

~/workspace/origin/target$ LC_ALL=C type top
top is a function
top () 
{ 
    echo 'hey!';
    /bin/ls ${@}
}

~/workspace/origin/target$ ./origin top
'top' found in PATH as '/usr/bin/top'
'/usr/bin/top' is an executable

~/workspace/origin/target$

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions