ZSH expansion modifiers

  • Variable transformations
  • permite modificar una variable usando : en el formato ${VAR}
    • u: uppercase
    • l: lowercase
    • q: quote
    • Q: quita un nivel de comillas
    • P: absolute path of file
    • h: basename
    • r: remove extension
    • s: sustituciones (s/<CAD1>/<CAD2>/)
      zsh
      for hash in $(./rhash_static --list-hashes); do echo "hash: ${hash:l:s/-//}"; done
    • incluye algunos modificadores para archivos
  • linux/zsh/modifiers.txt
  • Darrera modificació: 22/03/2020 05:50
  • per mate