[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How come i wrote a NO-BREAK SPACE in xterm+bash ?



On Fri, Aug 21, 2015 at 04:56:54AM CEST, David Wright <deblis@lionunicorn.co.uk> said:
> Quoting Vincent Lefevre (vincent@vinc17.net):
> > On 2015-08-19 16:33:09 -0500, David Wright wrote:
> > > Quoting Thomas Schmitt (scdbackup@gmx.net):
> > > > But the typographical purpose of NO-BREAK SPACE is to look
> > > > like space without inviting an automatic line break.
> > > > So making it look not like space would be absurd.
> > > 
> > > But shell input is not a typographical context. Most source code
> > > isn't, except in literals. Documents generally are because they are
> > > displayed/printed.
> > 
> > The point is that the terminal cannot do the difference between
> > a NBSP coming from shell input and a NBSP coming from a displayed
> > document. So, it should render a NBSP exactly like a normal space.
> > And it is up to the application (the shell, an editor in some
> > mode, etc.) to render NBSP in a special way if needed.
> 
> Why not? Let's substitute TAB TAB for NBSP in your comment.
> My terminal happily swallows TAB TAB with cat > file, and renders
> it correctly with cat file. But when I type TAB TAB as shell input,
> I get "Display all 3402 possibilities? (y or n)". It seems to be able
> to "do the difference" in this case.

1) You're speaking input, Vincent was speaking output

2) it's the shell which makes a different treatment than cat. Exactly
what Vincent said. It is up to the application running in the shell to
do what is needed.



Reply to: