Diff
Not logged in

Differences From Artifact [e794a68b50]:

To Artifact [cb14d0e407]:


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/usr/locanl/bin/tclsh
# FILE: "/home/joze/src/tclreadline/tclreadlineSetup.tcl.in"
# LAST MODIFICATION: "Mon Sep 20 01:34:31 1999 (joze)"
# (C) 1998, 1999 by Johannes Zellner, <johannes@zellner.org>
# $Id$
# ---
#
# tclreadline -- gnu readline for tcl
# Copyright (C) 1999  Johannes Zellner
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,


|
|




|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/usr/locanl/bin/tclsh
# FILE: "/home/joze/src/tclreadline/tclreadlineSetup.tcl.in"
# LAST MODIFICATION: "Thu, 23 Mar 2000 22:45:43 +0100 (joze)"
# (C) 1998 - 2000 by Johannes Zellner, <johannes@zellner.org>
# $Id$
# ---
#
# tclreadline -- gnu readline for tcl
# Copyright (C) 1998 - 2000 by Johannes Zellner
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
			} else {
				return -code $code $msg
			}
		}
	}

	# REMOVED THE [info script] TEST (joze, SEP 98)
	if {([info level] == 1) \
			&& [info exists tcl_interactive] && $tcl_interactive} {
		if ![info exists auto_noexec] {
			set new [auto_execok $name]
			if {$new != ""} {
				set errorCode $savedErrorCode
				set errorInfo $savedErrorInfo
				set redir ""
				if {[info commands console] == ""} {







<
|







76
77
78
79
80
81
82

83
84
85
86
87
88
89
90
			} else {
				return -code $code $msg
			}
		}
	}

	# REMOVED THE [info script] TEST (joze, SEP 98)

    if {([info level] == 1) && [info exists tcl_interactive] && $tcl_interactive} {
		if ![info exists auto_noexec] {
			set new [auto_execok $name]
			if {$new != ""} {
				set errorCode $savedErrorCode
				set errorInfo $savedErrorInfo
				set redir ""
				if {[info commands console] == ""} {
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179

	uplevel #0 {

		if {"" == [info commands ::tclreadline::readline]} {
			::tclreadline::Init
		}

		if {[catch {set a [::tclreadline::prompt1]}] \
			&& [info nameofexecutable] != ""} {

			namespace eval ::tclreadline {
				variable prompt_string
				set base [file tail [info nameofexecutable]]

				if {[string match tclsh* $base] && [info exists tcl_version]} {
					set prompt_string \
						"\[0;91mtclsh$tcl_version\[0m"
				} elseif {[string match wish* $base] \
					&& [info exists tk_version]} {
					set prompt_string "\[0;94mwish$tk_version\[0m"
				} else {
					set prompt_string "\[0;91m$base\[0m"
				}

			}

			if {"" == [info procs ::tclreadline::prompt1]} {
				proc ::tclreadline::prompt1 {} {
					variable prompt_string







|
<







|


|

|







150
151
152
153
154
155
156
157

158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177

	uplevel #0 {

		if {"" == [info commands ::tclreadline::readline]} {
			::tclreadline::Init
		}

	if {[catch {set a [::tclreadline::prompt1]}] && [info nameofexecutable] != ""} {


			namespace eval ::tclreadline {
				variable prompt_string
				set base [file tail [info nameofexecutable]]

				if {[string match tclsh* $base] && [info exists tcl_version]} {
					set prompt_string \
		    "\[0;31mtclsh$tcl_version\[0m"
				} elseif {[string match wish* $base] \
					&& [info exists tk_version]} {
			set prompt_string "\[0;34mwish$tk_version\[0m"
				} else {
			set prompt_string "\[0;31m$base\[0m"
				}

			}

			if {"" == [info procs ::tclreadline::prompt1]} {
				proc ::tclreadline::prompt1 {} {
					variable prompt_string