Skip to content
/ gmd Public

Quickly retrieve source code of your Python classes and functions

License

Notifications You must be signed in to change notification settings

ychiucco/gmd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 

Repository files navigation

Give Me Definition

Give Me Definition (gmd) is a shell utility that allows you to quickly find and retrieve details about class and function definitions in a Python project tracked by git.

Installation

git clone [email protected]:ychiucco/gmd.git
gcc gmd/gmd.c -o /usr/local/bin/gmd

Usage

gmd [-c|-f] [-s] [-p] [-n] [-o] 'arg'
  • Query options:

    • -c, --class: Search for class definitions only (cannot be used with -f)
    • -f, --function: Search for function definitions only (cannot be used with -c)
    • -s, --sensitive: Make the search case-sensitive
  • Printing options:

    • -p, --path: Display the file path and line number of the match
    • -n, --name: Display the name of the matched object
    • -o, --open: Open matching file at the correct line with VSCode (ignore -p and/or -n)
  • Positional arguments:

    • arg: The class or function name to search for. Use .* in any position as a wildcard to match patterns. Wrap the argument inside quotes (double or single) when using wildcards.

About

Quickly retrieve source code of your Python classes and functions

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages