sh / bash / ksh / csh
Summary
Section titled “Summary”The shell-emulation ices (sh, bash, ksh, csh — and their !-prefixed
variants) source the plugin or snippet in a sticky shell-emulation context so that
functions defined within it also execute under that emulation.
Syntax / Usage
Section titled “Syntax / Usage”zi ice sh # emulate sh; functions get sticky sh emulationzi ice bash # emulate bash (also disables SH_GLOB for Bash regexes)zi ice ksh # emulate kshzi ice csh # emulate csh
# ! variants: apply additional options less critical for portabilityzi ice !shzi ice !bashzi ice !kshzi ice !cshDetails
Section titled “Details”Each ice sets up the corresponding Zsh emulation mode before sourcing the plugin and makes that mode sticky: every function declared during sourcing will also execute under that emulation when called later.
bash/!bash additionally disables the SH_GLOB option, which allows Bash-style
extended regular expressions to work.
The ! variant enables some additional options that are technically not needed for
compatibility but which the strict emulation mode would otherwise suppress.
Works with both plugins and snippets.
Examples
Section titled “Examples”# Load a bash script that uses bashismszi ice bashzi snippet ~/scripts/bash-tool.sh
# Load a ksh plugin with full sticky emulationzi ice kshzi light user/ksh-pluginSee Also
Section titled “See Also”- aliases
- subst