Adapted from tips for restricted-source in Python
Just like code-golf, restricted-source pushes one to exploit quirks and hidden features of the zsh language. While we already have a place to collect all these tips for code-golf, those for restricted-source remain transmitted by word of mouth or hidden deep within the manual pages.
So, what are some tips for solving restricted-source challenges in zsh?
Please only include 1 tip per answer. Please downvote answers with multiple tips in them.
What makes a good tip here? There are a couple of criteria I think a good tip should have:
It should be (somewhat) non obvious.
Similar to the code-golf tips, it should be something that someone who has golfed in zsh (or bash) a bit and read the tips page would not immediately think of. For example, "replace
a + b
witha+b
to avoid using spaces" is obvious to any golfer since it is already a way to make your code shorter and thus not a good tip.It should not be too specific.
Since there are many different types of source restrictions, answers here should be at least somewhat applicable to multiple source restrictions, or one common source restriction. For example tips of the form "How to X without using character(s) Y" are generally useful since banned characters is a common source restriction. The thing your tip helps to do should also be somewhat general. For example tips of the form "How to create numbers with X restriction" are useful since many programs utilize numbers regardless of the challenge. Tips of the form "How to implement Shor's algorithm with X restriction" are basically just answers to a challenge you just invented and not very helpful to people solving other challenges.