This is a cheat sheet for how to perform various actions to ZSH, which can be tricky to find on the web as the syntax is not intuitive and it is generally not very well-documented.
Description | Syntax |
---|---|
Get a single character | ${VARNAME[index]} |
Get the string from a specific index | ${VARNAME[index,-1]} |