Skip to content

Doesn't capture functions #1

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$

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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