Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

When is .tclshrc used

29 views
Skip to first unread message

Cecil Westerhof

unread,
Jan 6, 2018, 11:14:06 AM1/6/18
to
When starting with tcl I really did not like the standard prompt. So I
changed it. When searching the internet I found that I had to do
something like the following:
if {${tcl_interactive}} {
package require tclreadline

set auto_noexec 1

proc ::tclreadline::prompt1 {} {

But if I look at:
http://wiki.tcl.tk/17072

It says:
will be read by tclsh when it is started interactively.

So the if is not necessary?

--
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof

Cecil Westerhof

unread,
Jan 6, 2018, 12:59:06 PM1/6/18
to
Cecil Westerhof <Ce...@decebal.nl> writes:

> When starting with tcl I really did not like the standard prompt. So I
> changed it. When searching the internet I found that I had to do
> something like the following:
> if {${tcl_interactive}} {
> package require tclreadline
>
> set auto_noexec 1
>
> proc ::tclreadline::prompt1 {} {
>
> But if I look at:
> http://wiki.tcl.tk/17072
>
> It says:
> will be read by tclsh when it is started interactively.
>
> So the if is not necessary?

I read somewhere that old tclsh also read it when it was not
interactive. So probably I can remove it.
0 new messages