How to merge set -x and set -v in ash? (or set -v with a prefix)
In other words, echo back command upon running.
The DEBUG signal does not exist in ash: DEBUG: invalid signal specification.
set -x
$ echo > foo.txt # Normal
$ set -x
$ echo > foo.txt # Example
+ echo
$ # Missing "> foo.txt # Example"
set -v
$ echo > foo.txt # Normal
$ set -v
$ echo > foo.txt # Example
echo > foo.txt # Example
$ # Missing prefix "> "
set -xv
$ echo > foo.txt # Normal
$ set -vx
$ echo > foo.txt # Example
echo > foo.txt # Example
+ echo
$ # Now there are two problems... (missing "> foo.txt # Example" and missing prefix "> ")
Desired
$ echo > foo.txt # Normal
$ magic_command "> "
$ echo > foo.txt # Example
> echo > foo.txt # Example
$ ls
> ls
foo.txt