[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 2015-08-21 22:08:33 -0500, David Wright wrote:
> Quoting Vincent Lefevre (vincent@vinc17.net):
> > No, here's what I said:
> > 
> > | In general, one wants NO-BREAK SPACE to be displayed just like
> > | a space. The differentiation is useful mainly in source code
> > | and when editing, thus it must be done by the application via
> > | configuration (actually applications running in the terminal
> > | rather than the terminal itself).
> 
> So we may be talking at cross-purposes here as I'm distinguishing the
> shell (command interpreter/application launcher) from applications,
> much as Erwan appears to in that sentence. Sorry; but that's why I wrote
> (AIUI) just there.

>From the terminal point of view, the shell is just like another
process.

Moreover, one can often start commands from other applications
(conventional "!" shell escape), and even an interactive shell.
So, it becomes more difficult to do the difference...

> > Your "counter-example" is something different because it is about
> > input (though this doesn't really matter since the notion of context
> > is the same for both input and output) and because the TAB handling
> > is not done by the terminal, but by two different applications
> > running in the terminal (the shell and "cat"). As I've said later,
> > both applications receive TAB in input. They behave differently only
> > because they interpret TAB differently, i.e. the differentiation is
> > done by the application (the shell and "cat").
> 
> This may come down to terminology again. I don't know. To me, input to
> the shell is what the keys produce (scan codes) and then the keymap
> turns them into. That's what I was struggling with yesterday in
> another thread, playing about with /etc/console-setup/remap.inc.
> 
> When a character goes into the shell, it is interpreted. What then
> reflects on the screen, to me, is output from the shell.

It is a bit more complex. A character goes to the terminal first.
Run "sleep 10" in a shell, and type characters: they will appear,
but they do not come from the shell (which is just waiting for
"sleep 10" to terminate). They are echoed directly by the terminal.
The characters will go to the shell (or another application running
in the terminal) later.

-- 
Vincent Lefèvre <vincent@vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)


Reply to: