1
0
mirror of https://github.com/dcarrillo/prezto.git synced 2026-05-06 10:10:01 +00:00
Files

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}"
# }