-
Notifications
You must be signed in to change notification settings - Fork 3
Explore
yoda provides a few exploration facilitations which can help finding your way through it quickly:
-
see
"decompile" a word, showing the corresponding bash function and generated code.
Example:see quit
-
where
show file name and line where a word was defined
Example:where quit
-
review
uses the information ofwhere
to open file in editor and jump to line.
Requires either a supported editor, or adding support for those not yet supported (which is
generally easy to do). Editor needs to be able to jump to specified line.
Example:review quit
The currently supported editors are these. This file is also where and how support for additional editors is added. -
about
show information about word. -
doc
similar toabout
, but open about text in the editor.
Example:doc quit
-
crossref
produces a list of bash function names, along with their corresponding yoda word names. Usually you wouldn't be interested in the bash function names that much, but there are situations where the desire to know the function -> word name mapping may arise.
For translating a single function name to word name, strip the function name of everything except the number, push it to stack and execute.name
. Example:1264 .name
To convert a single word name to its function name, tick it and prepend the function name prefix, which is by default "yoda_". Example:' words .
( may give 1264, in which case function name is yoda_1264. Actual number may be different, though)
words for exploration added to library:
-
category
substring search the "category:" field of words docs for input string, then print the contents of the "name:" field of the matching files.
An example session shown below. As always, text in green colour is input:
-
p
followed by a word name, this shows the first line of its source.
This requires that the word has been loaded from file. For interactively created words,see
can be used.
Actually not very useful - this was added with the idea that stack diagram would be on that line, but more often than not will those be on a different line. Potential removal candidate. -
changes
shows what has changed between previous version and currently running version. -
concerning
followed by a string to search for will look through word docs for matches and list the word names with string in their documentation.