2021年8月23日(月) 6:13 Emanuele Torre <torreemanue...@gmail.com>:
> It would be nice to have a parameter transformation (e.g. "${par@p}")
> that expands $par to a string that will not be expanded by PS1, PS2, &c.

It seems to me that you can just put '$par' (not "$par") in PS1.
Then, the suggested "${par@p}" can be simply '$par', which isn't worth
implementing as a new transform.  You can write

  PS1='blabla $tmp_var blabla'

Or

  PS1="blabla \$tmp_var blabla"

If you want to modify the variable later, you can save it in a
different variable.

  PS1_tmp_var=$tmp_var
  PS1="blabla \$PS1_tmp_var blabla"

--
Koichi

Reply via email to