Skip to content

echo -n doesn't work for string less then 3 characters #12246

@elaijuh

Description

@elaijuh

I find echo -n doesn't work for string less than 3 characters, printf doesn't work either.

❯ fish --version
fish, version 4.3.2
❯ echo $version
4.3.2
❯ uname
Linux
❯ echo $TERM
foot

❯ sh -c 'env HOME=$(mktemp -d) XDG_CONFIG_HOME= XDG_DATA_DIRS= fish'
hjl@eos /h/hjl> echo -n 1
hjl@eos /h/hjl> echo -n 11
hjl@eos /h/hjl> echo -n 111
111⏎  
  
hjl@eos /h/hjl> printf "1"
hjl@eos /h/hjl> printf "11"
hjl@eos /h/hjl> printf "111"
111⏎           

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions