Please open an issue at https://github.com/fish-shell/fish-shell/issues/new
It looks like the PROMPT_SP hack to deal with output from a command that
does not end with a newline has been broken. Note that this does not happen
if the output has more than a single character so we probably have an off
by one error somewhere in the code. I wonder if zsh has the same bug since
we copied that implementation.
Note that you can see the character is actually written by using the
`script` command to capture all output.
On Mon, Feb 13, 2017 at 7:33 PM, Giuseppe Calabrese wrote:
> Hello everyone,
>
> When I try to print a single non-control character to the terminal, I
> get nothing back. I tried different terminals and shells; it happens
> everywhere, only with Fish.
>
> echo -n x # prints nothing
> printf "%d" 9 # idem
> printf "%s" Y # idem
> printf "%x" 15# idem
>
> echo x# prints "x\n"
> printf "%s" Yep # prints "Yep"
> printf "%02x" 15 # prints "0f"
> printf "%d" 10# prints "10"
> printf "%x" 16# idem
>
> echo # prints "\n"
> printf \n # idem
> printf \a # plays sound
>
> This problem affects any program run under Fish which prints to
> stdin/stderr, e.g.:
>
> printf 'int main() { printf("x"); }' \
> | cc -x c -w - -o test-prog\
> ; ./test-prog
>
> Since, however, printing to other files, pipes, etc. seems to work,
> the issue must concern echoing.
>
> echo (echo -n x)# prints "x\n"
> printf "%s\n" (printf x)# idem
> printf x\n | cat > test-file; cat test-file # idem
>
> Can anyone reproduce with Fish 2.5.0?
>
> Giuseppe
>
>
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> ___
> Fish-users mailing list
> Fish-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/fish-users
>
--
Kurtis Rader
Caretaker of the exceptional canines Junior and Hank
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot___
Fish-users mailing list
Fish-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fish-users