D630

Results 8 comments of D630

Ok, I have updated my [repo](https://github.com/D630/bpx) to use PS0 only. Note: PSO is meant to be expanded; there is no PROMPT_COMMAND like thing for it. So we have to write...

That's possible: ``` sh foo () { printf '%s\n\r' FOO; } PSO='\h\n\T$(foo)' PS0='$(printf "%s\n%s\n%s\n\r" \h \T FOO)' ``` But not: ``` sh foo () { printf '%s\n%s\n%s\n\r' \\h \\T FOO;...

Also possible: ``` sh foo () { printf '%s\n\r' "${paa[u]}" "${paa[V]}" "${pa[0]}" "$PROMPT_w" "$1"; } PS0='$(declare -A paa=([u]="\u" [V]="\V"); pa=("\w") ;PROMPT_w="\w" foo "\H")' ```

I would go with something like: ``` sh foo () { for i in "${!BPX_PROMPT[@]}" do printf '%s -> %s\n\r' "$i" "${BPX_PROMPT[$i]}" done } PS0='$( builtin unset -v BPX_PROMPT; builtin...

Thanks for pointing it out again. I think, it's obviously a preprompt, not preexecution thing! PS0 will be set before the hole command line is beeing executed, which may also...

I have been thinking about the preexec hook for quite a while (again). Maybe I am wrong, but in the end I found, that PS0 cannot replace the DEBUG trap...

ah, interesting. similiar to `funsubs` and `valsubs` in mksh, right?

But also for achieving reproducible builds: https://github.com/tcurdt/jdeb/pull/363, https://github.com/tcurdt/jdeb/commit/563212124561357e4bbd3a33b70624b6b41f8718