• Does anyone use the console command on macOS?

    From et99@et99@rocketship1.me to comp.lang.tcl on Mon Aug 10 13:06:40 2026
    From Newsgroup: comp.lang.tcl


    I'm working on TIP-561 to bring the console command (the Tk console window - the one that's always been available on Windows) to Linux/Unix, which has never had it as a built-in command.

    As part of that, I'm trying to find out the current state of console on macOS.

    If you're on a Mac and have ever used console (or tried console show and had it work, or not), I'd really appreciate hearing about it - what version of Tcl/Tk, and whether it worked as expected. Even "I tried it just now and here's what happened" would be useful.

    Thanks,

    -et

    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Robert Heller@heller@deepsoft.com to comp.lang.tcl on Mon Aug 10 21:06:43 2026
    From Newsgroup: comp.lang.tcl

    With both Linux and MacOSX, there is a "real" terminal shell, that is full featured. The console command is only really "needed" with MS-Windows. *Developers* under Linux and MacOSX, generally just fire up a terminal and run wish from the shell command and can have access to everything a console window gives you.
    I don't know specificly about MacOSX, but I have never had any reason use the console command from Linux.
    At Mon, 10 Aug 2026 13:06:40 -0700 et99 <et99@rocketship1.me> wrote:


    I'm working on TIP-561 to bring the console command (the Tk console window - the one that's always been available on Windows) to Linux/Unix, which has never had it as a built-in command.

    As part of that, I'm trying to find out the current state of console on macOS.

    If you're on a Mac and have ever used console (or tried console show and had it work, or not), I'd really appreciate hearing about it - what version of Tcl/Tk, and whether it worked as expected. Even "I tried it just now and here's what happened" would be useful.

    Thanks,

    -et



    --
    Robert Heller -- Cell: 413-658-7953 GV: 978-633-5364
    Deepwoods Software -- Custom Software Services
    http://www.deepsoft.com/ -- Linux Administration Services
    heller@deepsoft.com -- Webhosting Services
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From et99@et99@rocketship1.me to comp.lang.tcl on Mon Aug 10 14:20:40 2026
    From Newsgroup: comp.lang.tcl

    Hi Robert:

    Understood, and that's a reasonable take if you've never had a use for it. To be clear, this isn't meant to convince anyone who's happy with a plain terminal - the TIP leaves it 100% optional, nothing changes for anyone who doesn't ask for it. It's aimed at people who've used console on Windows and found it useful there.

    Given that, I'm still hoping to hear from anyone who actually has a Mac and has tried console there - does it work, and under what circumstances?

    -et


    On 8/10/2026 2:06 PM, Robert Heller wrote:
    With both Linux and MacOSX, there is a "real" terminal shell, that is full featured. The console command is only really "needed" with MS-Windows. *Developers* under Linux and MacOSX, generally just fire up a terminal and run
    wish from the shell command and can have access to everything a console window
    gives you.

    I don't know specificly about MacOSX, but I have never had any reason use the console command from Linux.

    At Mon, 10 Aug 2026 13:06:40 -0700 et99 <et99@rocketship1.me> wrote:



    I'm working on TIP-561 to bring the console command (the Tk console window - the one that's always been available on Windows) to Linux/Unix, which has never had it as a built-in command.

    As part of that, I'm trying to find out the current state of console on macOS.

    If you're on a Mac and have ever used console (or tried console show and had it work, or not), I'd really appreciate hearing about it - what version of Tcl/Tk, and whether it worked as expected. Even "I tried it just now and here's what happened" would be useful.

    Thanks,

    -et





    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Rich@rich@example.invalid to comp.lang.tcl on Mon Aug 10 22:09:56 2026
    From Newsgroup: comp.lang.tcl

    Robert Heller <heller@deepsoft.com> wrote:
    At Mon, 10 Aug 2026 13:06:40 -0700 et99 <et99@rocketship1.me> wrote:

    I'm working on TIP-561 to bring the console command (the Tk console
    window - the one that's always been available on Windows) to
    Linux/Unix, which has never had it as a built-in command.

    As part of that, I'm trying to find out the current state of console
    on macOS.

    If you're on a Mac and have ever used console (or tried console show
    and had it work, or not), I'd really appreciate hearing about it -
    what version of Tcl/Tk, and whether it worked as expected. Even "I
    tried it just now and here's what happened" would be useful.

    With both Linux and MacOSX, there is a "real" terminal shell, that is
    full featured. The console command is only really "needed" with
    MS-Windows. *Developers* under Linux and MacOSX, generally just fire
    up a terminal and run wish from the shell command and can have access
    to everything a console window gives you.

    I don't know specificly about MacOSX, but I have never had any reason
    use the console command from Linux.

    Same here, have never needed the "console" command for Linux, as a full featured terminal is just an xterm away (and, as I'm usually already
    editing in that xterm, running the code "console like" as per windows
    is just suspending the editor and running the code I'm working on from
    the xterm I'm already editing within.

    So, whatever you end up doing, please **do not break** the existing
    Linux (and MacOS) situation where firing up wish in a terminal gives a
    proper "console" (i.e., by redirecting stderr and stdout to somewhere
    other than fd's 1 and 2 that are given to wish via the OS).


    For the few times I am developing something that I also plan to run
    under windows and do want to use the console command on windows, I just
    wrap the call to 'console' inside an if {tcl_platform(platform) eq
    windows} {} statement so it does not try to load under Linux.
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From et99@et99@rocketship1.me to comp.lang.tcl on Mon Aug 10 15:25:09 2026
    From Newsgroup: comp.lang.tcl

    On 8/10/2026 3:09 PM, Rich wrote:
    snip
    So, whatever you end up doing, please **do not break** the existing
    Linux (and MacOS) situation where firing up wish in a terminal gives a
    proper "console" (i.e., by redirecting stderr and stdout to somewhere
    other than fd's 1 and 2 that are given to wish via the OS).



    Nothing to fear. The TIP and the implementation, completely understand that the typical linux/unix user does not want or expect a console to open on running the program with wish (or tclsh even after package require Tk).

    The technique being used currently is the tclIndex mechanism which would only even load anything upon seeing the command "console" and then nothing would happen until the explicit "console show" command is executed. Nothing would happen either if the command console is already defined, as a proc or command as tclIndex uses the unknown command hook.

    However, the question came up on the core mailing list about the console command on macos. I have not been able to get an answer as to if the console command is defined, does anything, and if so what, and I don't have a Mac to test with.

    -et
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Robert Heller@heller@deepsoft.com to comp.lang.tcl on Tue Aug 11 00:17:14 2026
    From Newsgroup: comp.lang.tcl

    OK, I have an old (2013 vintage) Intel MacBook running MacOSX 10.15. I just fired up wish (8.6.16) and typed console. Got 'invalid command name "console"'. (Same for Linux.)
    Why is there any need to bother with the console under MacOSX or Linux? What would be the point?
    At Mon, 10 Aug 2026 15:25:09 -0700 et99 <et99@rocketship1.me> wrote:

    On 8/10/2026 3:09 PM, Rich wrote:
    snip
    So, whatever you end up doing, please **do not break** the existing
    Linux (and MacOS) situation where firing up wish in a terminal gives a proper "console" (i.e., by redirecting stderr and stdout to somewhere
    other than fd's 1 and 2 that are given to wish via the OS).



    Nothing to fear. The TIP and the implementation, completely understand that the typical linux/unix user does not want or expect a console to open on running the program with wish (or tclsh even after package require Tk).

    The technique being used currently is the tclIndex mechanism which would only even load anything upon seeing the command "console" and then nothing would happen until the explicit "console show" command is executed. Nothing would happen either if the command console is already defined, as a proc or command as tclIndex uses the unknown command hook.

    However, the question came up on the core mailing list about the console command on macos. I have not been able to get an answer as to if the console command is defined, does anything, and if so what, and I don't have a Mac to test with.

    -et


    --
    Robert Heller -- Cell: 413-658-7953 GV: 978-633-5364
    Deepwoods Software -- Custom Software Services
    http://www.deepsoft.com/ -- Linux Administration Services
    heller@deepsoft.com -- Webhosting Services
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From et99@et99@rocketship1.me to comp.lang.tcl on Mon Aug 10 18:07:58 2026
    From Newsgroup: comp.lang.tcl

    On 8/10/2026 5:17 PM, Robert Heller wrote:
    OK, I have an old (2013 vintage) Intel MacBook running MacOSX 10.15. I just fired up wish (8.6.16) and typed console. Got 'invalid command name "console"'. (Same for Linux.)

    Why is there any need to bother with the console under MacOSX or Linux? What would be the point?


    Thanks Robert, that's genuinely useful.

    One follow-up question first, before I read too much into it: how exactly did you launch wish - from Terminal with no script argument, or by double-clicking a Wish.app bundle?

    Reason I ask: the manual says TkAqua only disables console for bundled-app launches (startup script + stdin /dev/null), and testers on a different TIP apparently had a working console on a Mac not long ago. Want to rule out launch method before concluding it's missing outright.



    On why bother with a console at all on Unix/Linux - a few concrete things it gives you over a terminal running tclsh/wish:

    - Tab completion for commands, variables, and file names
    - As you type, a fully-completed command or variable name changes color, giving live feedback that what you've typed is recognized, even before pressing tab
    - Brace/bracket/paren matching with highlight
    - Full mouse support for editing - point, click, select, copy/paste anywhere in the buffer
    - stderr shown in red, distinct from stdout
    - A separate window that doesn't clutter or scroll your terminal; history command compatible
    - Zoomable font via mouse wheel/trackpad (9.1+)
    - Direct access to the running interpreter's own live state via console eval
    - That same console eval access also makes it easy to add your own features - extra buttons, menu items, or colorized output streams (e.g. tagging your own output green, separate from the built-in stdout/stderr colors)
    - It's a real text widget underneath, with a lot of extras already built in - if you ever need a logging window in your own app, this saves you from writing one from scratch
    - Windows users who use the console will now have that option on unix systems
    - Until requested, remains unloaded.

    Thanks again for actually testing rather than just asking.

    -et

    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From et99@et99@rocketship1.me to comp.lang.tcl on Tue Aug 11 01:45:26 2026
    From Newsgroup: comp.lang.tcl

    On 8/10/2026 6:07 PM, et99 wrote:
    On 8/10/2026 5:17 PM, Robert Heller wrote:
    OK, I have an old (2013 vintage) Intel MacBook running MacOSX 10.15.-a I just
    fired up wish (8.6.16) and typed console.-a Got 'invalid command name
    "console"'.-a (Same for Linux.)


    According to Torsten Berg, there are two build types for the Mac.

    One, an "install-embedded" build supports the console and a "normal" build does not.

    For the one that does have a console, it opens up automatically - like windows, though I don't know if that happens when a script file is given on the command line.

    Thanks

    -et

    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From sm.smithfield@gmail.com@user3870@newsgrouper.org.invalid to comp.lang.tcl on Tue Aug 11 11:33:55 2026
    From Newsgroup: comp.lang.tcl


    et99 <et99@rocketship1.me> posted:


    According to Torsten Berg, there are two build types for the Mac.

    One, an "install-embedded" build supports the console and a "normal" build does not.

    For the one that does have a console, it opens up automatically - like windows, though I don't know if that happens when a script file is given on the command line.

    Pretty sure I've got the "normal" build, it goes like this...

    me@MAC ~ % tclsh
    % package require Tk
    8.6.18
    % console show
    invalid command name "console"
    % console
    invalid command name "console"

    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From nemethi@csaba.nemethi@t-online.de to comp.lang.tcl on Tue Aug 11 14:54:30 2026
    From Newsgroup: comp.lang.tcl

    Am 11.08.26 um 13:33 schrieb sm.smithfield@gmail.com:

    et99 <et99@rocketship1.me> posted:


    According to Torsten Berg, there are two build types for the Mac.

    One, an "install-embedded" build supports the console and a "normal" build does not.

    For the one that does have a console, it opens up automatically - like windows, though I don't know if that happens when a script file is given on the command line.

    Pretty sure I've got the "normal" build, it goes like this...

    me@MAC ~ % tclsh
    % package require Tk
    8.6.18
    % console show
    invalid command name "console"
    % console
    invalid command name "console"


    For completeness, here is what I posted today on the Tcl Core List:

    Regardless of the build method (embedded or "normal"), the build process
    will create a directory called Wish.app, which, when double-clicked,
    will start the executable

    .../Wish.app/Contents/MacOS/Wish

    and, as part of this action, (1) it will open the console window and (2)
    will register the "console" command. It is only the location of
    Wish.app that depends on the build method.

    OTOH, if you just start the above Wish executable directly (from a
    terminal window) then no console window will be opened and no "console" command will be available.
    --
    Csaba Nemethi https://www.nemethi.de mailto:csaba.nemethi@t-online.de
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Robert Heller@heller@deepsoft.com to comp.lang.tcl on Tue Aug 11 13:01:27 2026
    From Newsgroup: comp.lang.tcl

    At Mon, 10 Aug 2026 18:07:58 -0700 et99 <et99@rocketship1.me> wrote:

    On 8/10/2026 5:17 PM, Robert Heller wrote:
    OK, I have an old (2013 vintage) Intel MacBook running MacOSX 10.15. I just
    fired up wish (8.6.16) and typed console. Got 'invalid command name "console"'. (Same for Linux.)

    Why is there any need to bother with the console under MacOSX or Linux? What
    would be the point?


    Thanks Robert, that's genuinely useful.

    One follow-up question first, before I read too much into it: how exactly
    did you launch wish - from Terminal with no script argument, or by double-clicking a Wish.app bundle?
    I just had a Terminal open (I *always* have a Terminal open), and just typed "wish" at the command prompt. Then at the Tcl prompt type "console" and got the invalid command name message.

    Reason I ask: the manual says TkAqua only disables console for bundled-app launches (startup script + stdin /dev/null), and testers on a different TIP apparently had a working console on a Mac not long ago. Want to rule out launch method before concluding it's missing outright.



    On why bother with a console at all on Unix/Linux - a few concrete things it gives you over a terminal running tclsh/wish:

    - Tab completion for commands, variables, and file names
    - As you type, a fully-completed command or variable name changes color, giving live feedback that what you've typed is recognized, even before pressing tab
    - Brace/bracket/paren matching with highlight
    - Full mouse support for editing - point, click, select, copy/paste anywhere in the buffer
    - stderr shown in red, distinct from stdout
    - A separate window that doesn't clutter or scroll your terminal; history command compatible
    - Zoomable font via mouse wheel/trackpad (9.1+)
    - Direct access to the running interpreter's own live state via console eval - That same console eval access also makes it easy to add your own features - extra buttons, menu items, or colorized output streams (e.g. tagging your own output green, separate from the built-in stdout/stderr colors)
    - It's a real text widget underneath, with a lot of extras already built in - if you ever need a logging window in your own app, this saves you from writing one from scratch
    - Windows users who use the console will now have that option on unix systems - Until requested, remains unloaded.

    Thanks again for actually testing rather than just asking.

    -et



    --
    Robert Heller -- Cell: 413-658-7953 GV: 978-633-5364
    Deepwoods Software -- Custom Software Services
    http://www.deepsoft.com/ -- Linux Administration Services
    heller@deepsoft.com -- Webhosting Services
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From et99@et99@rocketship1.me to comp.lang.tcl on Tue Aug 11 13:36:32 2026
    From Newsgroup: comp.lang.tcl

    On 8/11/2026 6:01 AM, Robert Heller wrote:


    I just had a Terminal open (I *always* have a Terminal open), and just typed "wish" at the command prompt. Then at the Tcl prompt type "console" and got the invalid command name message.


    Thanks Robert - that matches exactly what Csaba Nemethi explained here and over on the core list: it comes down to isatty on stdin, not build type. A real terminal session like yours means no console, by design.

    Worth repeating that with the TIP, nothing changes unless you specifically ask for it. If you never type console show, your terminal session works exactly like it does today - the console will only ever open if and when you request one.

    -et

    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From et99@et99@rocketship1.me to comp.lang.tcl on Tue Aug 11 13:46:03 2026
    From Newsgroup: comp.lang.tcl

    On 8/11/2026 4:33 AM, sm.smithfield@gmail.com wrote:

    Thanks for testing.

    As it turns out, that same thing happens on windows. However, there as on mac, sourcing my script will create a console command and upon entering console show, will open a console.

    If you're interested, and would like to test this, you can easily download the script and source it after the package require Tk.


    https://github.com/rocketship88/tcl-console-unix/blob/main/consolecmd.impl

    There should be a download button in the upper right between the copy, and pencil icons.


    Thanks

    -et


    et99 <et99@rocketship1.me> posted:


    According to Torsten Berg, there are two build types for the Mac.

    One, an "install-embedded" build supports the console and a "normal" build does not.

    For the one that does have a console, it opens up automatically - like windows, though I don't know if that happens when a script file is given on the command line.

    Pretty sure I've got the "normal" build, it goes like this...

    me@MAC ~ % tclsh
    % package require Tk
    8.6.18
    % console show
    invalid command name "console"
    % console
    invalid command name "console"


    --- Synchronet 3.22a-Linux NewsLink 1.2