1
2
3
4
5
6
7
8
9
10
|
#!/usr/local/bin/tclsh
# FILE: "/diska/home/joze/src/tclreadline/tclreadlineSetup.tcl.in"
# LAST MODIFICATION: "Mon Aug 23 00:34:14 1999 (joze)"
# (C) 1998, 1999 by Johannes Zellner, <johannes@zellner.org>
# $Id$
# ---
#
# tclreadline -- gnu readline for tcl
# Copyright (C) 1999 Johannes Zellner
#
|
|
|
|
1
2
3
4
5
6
7
8
9
10
|
#!/usr/local/bin/tclsh
# FILE: "/home/joze/src/tclreadline/tclreadlineSetup.tcl.in"
# LAST MODIFICATION: "Mon Aug 23 00:54:01 1999 (joze)"
# (C) 1998, 1999 by Johannes Zellner, <johannes@zellner.org>
# $Id$
# ---
#
# tclreadline -- gnu readline for tcl
# Copyright (C) 1999 Johannes Zellner
#
|
218
219
220
221
222
223
224
225
226
227
228
229
230
231
|
return ""; # nothing to complete
}
} else {
return ""
}
return "NOTREACHED (this is probably an error)"
}
proc ::tclreadline::Setup {} {
uplevel #0 {
if {[info commands ::tclreadline::readline] == ""} {
::tclreadline::Init
|
>
>
>
>
>
>
>
>
|
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
|
return ""; # nothing to complete
}
} else {
return ""
}
return "NOTREACHED (this is probably an error)"
}
proc tclreadline::ls {args} {
if {[exec uname -s] == "Linux"} {
eval exec ls --color -FC [::tclreadline::Glob $args]
} else {
eval exec ls -FC [::tclreadline::Glob $args]
}
}
proc ::tclreadline::Setup {} {
uplevel #0 {
if {[info commands ::tclreadline::readline] == ""} {
::tclreadline::Init
|
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
|
regsub $env(HOME) $pwd "~" pwd
}
return "$prompt_string \[$pwd\]"
}
}
}
proc ls {args} {
if {[exec uname -s] == "Linux"} {
eval exec ls --color -FC [::tclreadline::Glob $args]
} else {
eval exec ls -FC [::tclreadline::Glob $args]
}
}
if {[info procs cd] == ""} {
catch {rename ::tclreadline::Cd ""}
rename cd ::tclreadline::Cd
proc cd {args} {
if {[catch {eval ::tclreadline::Cd $args} message]} {
puts stderr "$message"
}
ls
}
}
if {[info procs exit] == ""} {
catch {rename ::tclreadline::Exit ""}
rename exit ::tclreadline::Exit
proc exit {args} {
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
270
271
272
273
274
275
276
277
278
279
280
281
282
283
|
regsub $env(HOME) $pwd "~" pwd
}
return "$prompt_string \[$pwd\]"
}
}
}
if {[info procs exit] == ""} {
catch {rename ::tclreadline::Exit ""}
rename exit ::tclreadline::Exit
proc exit {args} {
|