mirror of
https://github.com/dcarrillo/prezto.git
synced 2026-04-18 14:24:06 +00:00
14 lines
238 B
Plaintext
14 lines
238 B
Plaintext
#
|
|
# Escapes a string for safe use in ${(e)...} parameter expansion.
|
|
#
|
|
# Authors:
|
|
# Trey Keown <trey@crystalpeaksecurity.com>
|
|
#
|
|
|
|
# function escape-eval {
|
|
|
|
setopt LOCAL_OPTIONS EXTENDED_GLOB
|
|
print -r -- "${1//(#m)[\\\$\`]/\\$MATCH}"
|
|
|
|
# }
|