Commands Cache (xonsh.commands_cache
)¶
-
class
xonsh.commands_cache.
CommandsCache
[source]¶ A lazy cache representing the commands available on the file system. The keys are the command names and the values a tuple of (loc, has_alias) where loc is either a str pointing to the executable on the file system or None (if no executable exists) and has_alias is a boolean flag for whether the command has an alias.
-
get
(k[, d]) → D[k] if k in D, else d. d defaults to None.¶
-
static
get_possible_names
(name)[source]¶ Generates the possible PATHEXT extension variants of a given executable name on Windows as a list, conserving the ordering in PATHEXT. Returns a list as name being the only item in it on other platforms.
-
items
() → a set-like object providing a view on D's items¶
-
keys
() → a set-like object providing a view on D's keys¶
-
lazy_locate_binary
(name)[source]¶ Locates an executable in the cache, without checking its validity.
-
lazyin
(key)[source]¶ Checks if the value is in the current cache without the potential to update the cache. It just says whether the value is known now. This may not reflect precisely what is on the $PATH.
-
lazyiter
()[source]¶ Returns an iterator over the current cache contents without the potential to update the cache. This may not reflect what is on the $PATH.
-
lazylen
()[source]¶ Returns the length of the current cache contents without the potential to update the cache. This may not reflect precisely what is on the $PATH.
-
values
() → an object providing a view on D's values¶
-
all_commands
¶
-