Hello,

 When I start a tcsh not connected to a /dev/tty? I get a annoying
"Couldnt get a file descriptor referring to the console".

 Looking at a strace output one can see it tries to access the /dev/tty,
/dev/tty0 and /dev/console without permissions and thus fail and output
the above string to stderr.

 AFAIU this is a perfectly correct behaviour so the only fix should be
to filter out the stderr output in order not to disturb the user.

 I think the simplest way to do this is to also pipe the stderr into the
grep and not only stdout. This should not be a problem as the grep won't
match this line.

Here is the patch:

--- /tmp/inputrc.csh    Tue Feb 19 11:04:10 2002
+++ inputrc.csh Tue Feb 19 11:07:31 2002
@@ -30,5 +30,5 @@
 # the BackSpace key sends ^? or ^H, depending on config
 setenv BSNUM 14
-setenv BACKSPACE `dumpkeys | grep "^keycode  $BSNUM" | awk '{print $4}'`
+setenv BACKSPACE `dumpkeys |& grep "^keycode  $BSNUM" | awk '{print $4}'`
 if ($BACKSPACE == "BackSpace") then
    bindkey "\C-?": delete-char


Cheers,


                                Odie

-- 
-----------------------------------------------------
Olivier Dormond aka Odie ([EMAIL PROTECTED])

Reply via email to