Expand description
Reading command definition files and merging them into one library.
Layers are merged weakest first, so a later layer shadows an earlier one by entry id. Any layer may also hide entries by glob pattern without redefining them.
Structs§
- NewEntry
- A command on its way into the user’s library.
Enums§
- Written
- What
upsertdid to the file.
Functions§
- append
- Appends an entry to the user’s library, creating the file if needed.
- appended
textwithentryadded as the last item of itscommandslist.- derive_
tags - Words to know a command by, taken from the command itself.
- disable
- Hides an entry the user cannot delete, such as one compiled into the binary.
- load
- Loads the builtin library, overlaying the user’s own file when it exists.
- merge_
tags - Tags the user gave first, then the ones the command suggests.
- parse_
tags - Splits the comma separated tags a user typed into a clean list.
- parse_
user - Parses the text of a user library, checked the way loading checks it.
- remove
- Cuts an entry out of a library file, reporting whether it was there.
- removed
textwithout the entry declared asid, orNoneif there is none.- split_
purpose - Separates
#tagsfrom the answer to “what is it for?”. - suggest_
id - Turns a command into an id that is stable, readable and not already taken.
- upsert
- Writes an entry into the user’s library, replacing one already declared under the same id.
- upserted
textwithentryin place of the one declared under its id, or added to the end of the list when there is none.- with_
disabled textwithpatternadded to itsdisabledlist.- with_
enabled textwithpatterntaken off itsdisabledlist, if it was on it.