Kernel Hacks & Weird Filenames
Ian Dall
idall at augean.OZ
Sat May 14 16:38:12 AEST 1988
In article <56 at lazlo.UUCP> ccs at lazlo.UUCP (Clifford C. Skolnick) writes:
>In article <326 at augean.OZ> idall at augean.OZ (Ian Dall) writes:
>...
>:If done in the terminal driver, new stty options could be added to say
>:what characters are to be considered unprintable. This could break
>:some things which like to setup terminals by using "cat foo" where foo
>:is a file full of special characters but this already has potential
>:problems if foo has ^M, ^J or ^I in it (perhaps we need a r(aw)cat).
>:Yes I know the terminal stuff is already a mess but at least this
>:concentrates the mess in one place :-). This scheme handles European,
>:Japanese or whatever character sets fairly well.
>
>This solution will also handle any control strings for the terminal. I
>wonder what "vi" would look like on his terminal :-).
I always did think it was a kludge the way the termcap routines
carefully avoid outputing certain characters. I really think that
programs which want to send terminal escape sequences should use an
appropriate terminal mode, because it is conceivable that someone could
design a terminal whose set of control codes made it impossible to
avoid sending ^J, ^M or ^I.
"vi" on my terminal? The only thing I use vi for is to install emacs :-)
However I acknowledge that many programs would break if the new
terminal modes I proposed were set (note though that you only need to
set these modes if you have funny file names).
> Many things
> would break if you put the stuff in the kernel tty driver, let's leave
> it in the "ls" or "cat" command. By the way, isn't there a Berkleyish
> type command "see" which does expand these things? I seem to remember
> "ls | see" from somewhere, maybe it was Xenix.
Another advantage of putting this in "ls" is that the terminal driver
has know way of knowing it has been asked to output a file name. If a
file name has ^J in it "ls" could display it appropriately whereas the
driver would have to just assume it was supposed to start a new line
or whatever.
Some one else did say that both the Berkley and the SysV ls already
display "unprintable" filenames. I wasn't aware of this. Must be
because I don't make a habit of creating file names with "odd"
characters in them :-).
It seems like we have agreement here that nothing actually needs to
be done!
--
Ian Dall "In any argument there will be people on your
side who you wish were on the other side."
idall at augean.oz
More information about the Comp.unix.wizards
mailing list