Files
dotfiles/config/zsh/.zprezto/modules/helper/functions/escape-eval
T

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