On Sun, Mar 24, 2024, at 11:01 PM, Dan Jacobson wrote:
> P.S., "\t%s" seems to have an extra space squeezed between them with 
> bash: "\t %s",
> unless perhaps the spec says that %s always starts with a space.

The standard doesn't say that, so in native mode bash's `fc' is
indeed slightly nonconformant, but in POSIX mode it does omit the
extra space.

$ set +o posix
$ fc -ln -1 | od -t c -t x1
0000000   \t       s   e   t       +   o       p   o   s   i   x  \n
           09  20  73  65  74  20  2b  6f  20  70  6f  73  69  78  0a
0000017
$ set -o posix
$ fc -ln -1 | od -t c -t x1
0000000   \t   s   e   t       -   o       p   o   s   i   x  \n
           09  73  65  74  20  2d  6f  20  70  6f  73  69  78  0a
0000016

-- 
vq

Reply via email to