Tcl Source Code

Check-in [1710c3171d]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:3546275 Make [auto_execok] search match [exec]. Thanks Koen Danckaert.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | core-8-5-branch
Files: files | file ages | folders
SHA1: 1710c3171d86587eab4c35617fc64ee302a40700
User & Date: dgp 2012-07-25 14:44:30
Context
2012-07-25
14:56
update changes check-in: 972b3415a1 user: dgp tags: core-8-5-branch
14:47
3546275 Make [auto_execok] search match [exec]. Thanks Koen Danckaert. check-in: 6909864f56 user: dgp tags: trunk
14:44
3546275 Make [auto_execok] search match [exec]. Thanks Koen Danckaert. check-in: 1710c3171d user: dgp tags: core-8-5-branch
14:39
3546275 Make [auto_execok] search match [exec]. Thanks Koen Danckaert. check-in: a504c293c3 user: dgp tags: core-8-4-branch
2012-07-24
20:19
merge mark check-in: 702f260e56 user: dgp tags: core-8-5-branch
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to library/init.tcl.

694
695
696
697
698
699
700


701
702
703


704
705
706
707
708
709
710
711
712

    foreach var {PATH Path path} {
	if {[info exists env($var)]} {
	    append path ";$env($var)"
	}
    }



    foreach dir [split $path {;}] {
	# Skip already checked directories
	if {[info exists checked($dir)] || ($dir eq {})} { continue }


	set checked($dir) {}
	foreach ext $execExtensions {
	    set file [file join $dir ${name}${ext}]
	    if {[file exists $file] && ![file isdirectory $file]} {
		return [set auto_execs($name) [list $file]]
	    }
	}
    }
    return ""







>
>
|
|
|
>
>
|
<







694
695
696
697
698
699
700
701
702
703
704
705
706
707
708

709
710
711
712
713
714
715

    foreach var {PATH Path path} {
	if {[info exists env($var)]} {
	    append path ";$env($var)"
	}
    }

    foreach ext $execExtensions {
	unset -nocomplain checked
	foreach dir [split $path {;}] {
	    # Skip already checked directories
	    if {[info exists checked($dir)] || ($dir eq {})} {
		continue
	    }
	    set checked($dir) {}

	    set file [file join $dir ${name}${ext}]
	    if {[file exists $file] && ![file isdirectory $file]} {
		return [set auto_execs($name) [list $file]]
	    }
	}
    }
    return ""