๐ฆ Use core libraries
๐ฆ Use core libraries
๐งฉ Source core libraries
A set of core libraries are immediately available on Valet. To use the library functions, you need to source the library that you need, e.g.:
source string
source interactive
All Valet functions are prefixed with the library name. E.g. the function string::cutField
is from the string
library. A clear error message will be displayed if you are trying to use a library function without sourcing the library.
๐ก
The bash built-in
source
is overridden by a function in Valet. This allows to not source the same file twice, so you can safely call source mylibrary
several times without impacting the runtime performance. If you need to use the default source keyword, use builtin source
.๐ Available core libraries
For more details, please check the documentation on each library:
This library exports variables containing ASCII escape codes, enabling interactive programs.
Functions to manipulate bash arrays.
The core functions of Valet.
Functions to display a full screen fuzzy search, which is used for the Valet menus.
Functions to make your program interactive.
Functions for file manipulation, command execution…
Wrapper functions around curl.
Logging functions.
Functions enable and disable the bash profiler.
Functions for string manipulation.
Functions to get system/user information.
Functions usable in your test scripts.