Project

General

Profile

Feature #3774 ยป which_all.patch

Initial working patch. - Garrick Peterson, 2013-05-20 02:35 PM

View differences:

new/usr/src/cmd/which/which.csh Mon May 20 10:30:43 2013
20 20
unset prompt _which_saved_path_
21 21
set noglob
22 22
set exit_status = 0
23
set aflag = 0
23 24
foreach arg ( $argv )
25
    if ( $arg == "-a" || $arg == "--all" ) then
26
      set aflag = 1
27
      continue
28
    endif
24 29
    set alius = `alias $arg`
25 30
    switch ( $#alius )
26 31
        case 0 :
......
46 51
            if ( -x $i/$arg && ! -d $i/$arg ) then
47 52
                echo $i/$arg
48 53
                set found
49
                break
54
                if ( $aflag == 1 ) then
55
                  continue
56
                else 
57
                  break
58
                endif
50 59
            endif
51 60
        end
52 61
    endif
    (1-1/1)