Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 14 Nov 2009 16:35:22 GMT
From:      Frank Durda IV <uhclem@FreeBSD.org>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   misc/140557: ports shells/44bsd-csh ESC file completion and ^D (view choices) broken in 8.0 RC3
Message-ID:  <200911141635.nAEGZMvt045392@www.freebsd.org>
Resent-Message-ID: <200911141640.nAEGe0M0036654@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         140557
>Category:       misc
>Synopsis:       ports shells/44bsd-csh ESC file completion and ^D (view choices) broken in 8.0 RC3
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Nov 14 16:40:00 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator:     Frank Durda IV
>Release:        8.0 RC3  (problem doesn't exist in 7.2 and earlier)
>Organization:
>Environment:
FreeBSD walkoff.lonestar.org 8.0-RC3 FreeBSD 8.0-RC3 #0: Tue Nov 10 07:50:36 UT
C 2009     root@almeida.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  i386

>Description:
Freshly installed 8.0RC3, ports as provided on DVD ISO image.

Build of 44bsd-csh shell completes with the typical warnings.
However, once it is executed, the ESC for filename completion
and the CTRL-D command for viewing available choices no longer
works as it has for the previous ~30 years (since BSD 3.0).

This shell worked as expected as recently as 7.2-RELEASE.  (I don't
know if it worked in any of the 8.0 development releases.)

(For anyone suggesting that it is okay to leave this broken
and that tcsh can be used instead, tcsh isn't entirely compatible
with one specific behavior of real, original csh, so csh is still
needed.)

Specifics

Problem #1 is that when a single ESC key is entered in a partly typed
filename or directory name, csh will complete the name as far as it
can be completed (as it has done previously), but now it appears to
also silently erase or fail to reload the entire command into the
input buffer, so if you then press ENTER, the result is that no
command is executed at all, or you only get characters the human
typed following the ESC.   The history command also shows that the 
command that used ESC completion never occurred as far as it is
concerned (or only was the characters typed after the ESC), despite
what you see on the screen.

Problem #2 is that if CTRL-D is used to show available choices
in a partly-entered filename or directory name, the matching choices
are shown, but then the command typed so far is no longer put back in
the input buffer and redisplayed.  You are just left at an empty
command prompt.

Both misbehaviors are easy to demonstrate, as shown below,
and can be compared against previous csh behavior.

>How-To-Repeat:
Annotated script: (CTRL characters shown in square brackets)

victim# set history=10[ENTER]
victim# history[ENTER]
..
    64  set history=10
    65  history
victim# pwd[ENTER]
/tmp
victim# cd /usr/lo[ESC]cal[ENTER]
victim# pwd[ENTER]
/tmp
(NOTE THAT IT DIDN'T ACTUALLY CHANGE DIRECTORIES DESPITE
PRESSING ENTER)
victim# history[ENTER]
..
    64  set history=10
    65  history
    66  pwd
    67  pwd
    68  history
victim# date[ENTER]
Sat Nov 14 09:58:51 CST 2009
victim# pwd[ENTER]
/tmp
victim# cd /usr/lo[ESC]cal[ENTER]
victim# pwd[ENTER]
/tmp
(NOTE THAT IT DID'T ACTUALLY CHANGE DIRECTORIES AGAIN)
victim# history[ENTER]
    64  set history=10
    65  history
    66  pwd
    67  pwd
    68  h
    69  date
    70  pwd
    71  pwd
    72  history
(NOTE "CD" COMMAND IS NOT LISTED IN HISTORY)
victim# cd /usr/^D
bin/     games/   include/ libdata/ local/   ports/   share/   tmp/
compat/  home/    lib/     libexec/ obj/     sbin/    src/
victim#
(NOTE "cd /usr/" DIDN'T REDRAW AFTER LIST OF CHOICES AND YOU ARE LEFT
AT AN EMPTY COMMAND PROMPT)

>Fix:


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200911141635.nAEGZMvt045392>