NetBSD-Bugs archive

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

bin/45084: csh "shift path" doesn't update $PATH

>Number:         45084
>Category:       bin
>Synopsis:       csh's "shift", applied to "path", doesn't update $PATH
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Jun 20 05:30:00 +0000 2011
>Originator:     Mouse
>Release:        NetBSD 4.0.1 or 5.1, possibly others
        First noticed on a so-far-anonymous system during setup;
        verified present on (among others)

System: NetBSD VAIO-Home.Rodents-Montreal.ORG 4.0.1 NetBSD 4.0.1 (VAIO-MP) #2: 
Wed Jun 8 21:19:35 EDT 2011 
mouse%VAIO-A-W.Rodents-Montreal.ORG@localhost:/home/mouse/kbuild/VAIO-MP i386
Architecture: i386
Machine: i386
        csh normally mirrors changes to the path shell variable in the
        PATH environment variable.  However, changing $path by using
        the "shift" command fails to update $PATH.
        % set path = ( /infibulated/gonkulator /bin /usr/bin )
        % /usr/bin/printenv PATH
        % shift path
        % set | /usr/bin/grep path
        path    (/bin /usr/bin)
        % /usr/bin/printenv PATH
        As a workaround, if none of the elements of $path contain shell
        syntax characters, "set path = ( $path )" works to reset $PATH.

        Presumably a proper fix would be to add special-case code for
        STRpath to shift(), akin to what doset() and dolet() have - or,
        more work but better design, rework the relevant code so the
        special case is unnecessary and the re-exporting happens
        somewhere else whenever $path changes by any means.

/~\ The ASCII                             Mouse
\ / Ribbon Campaign
 X  Against HTML      
/ \ Email!           7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B

Home | Main Index | Thread Index | Old Index