1. 14
  1.  

  2. 1

    I want this to be good. I really do. But why must they continue to make the settings a JSON file? Can you pick a less navigable/readable format?

    Also, I have an unreasonable fondness for this bug.

    You are currently not able to reorder tabs when running the Terminal as administrator (it will crash if you try).

    1. 2

      Agreed, I keep checking back every few weeks and I continue to be astonished they haven’t added a settings GUI yet. Isn’t Windows development supposed to be easy these days? It’s sending an awfully weird message that a legit Microsoft team can’t put together a GUI that would have been a no-brainer in the Windows 95 era. Bizarre.

      Edit: for what it’s worth, you can see some discussion in issue #1564 on their GitHub repo.

      1. 2

        This isn’t as good as a proper GUI, but there is a JSON schema for the settings file. That means any editor with JSON Schema support (e.g. VS Code) will give you basic error checking, autocomplete, etc of the JSON file. See Scott Hanselman’s post

        1. 5

          JSON schema, eh? I guess that XML train has come full circle.

          1. 1

            😅🤷🏾‍♀️

        2. [Comment from banned user removed]

          1. 3

            No, it’s not a joke.

            A settings interface is what this should be, like say, iTerm2. Or at least YAML, like Alacritty, so there is at the ability to comment. Not sure what XML being used in other projects has to do with this. (MS didn’t use XML? Doesn’t matter since both are the wrong interface.)

            Also, why do I care if I can (un)marshal a terminal’s configuration file into an object or a map? I’ve been using terminals for 25 years and have never worked with or known anyone who wanted or needed to do this. I don’t want to write a program to manage my terminal configuration. I just want to change a setting, like fonts or keybindings, every now and then.

            1. 1

              I’ve been using terminals for 25 years

              That may be true, but clearly youve never parsed JSON in any meaningful way in that time. Else you would know the benefit of parsing into an object your language can understand.

              1. 1

                I’d actually prefer json to yaml if I had to hand-edit a configuration file. It’s definitely annoying that json strictly requires no trailing commas and disallows comments, but I’m even more annoyed by yaml’s significant whitespace. It’s always felt less intuitive to me. I’m used to the toml format commonly used by rust projects, and that’s what I’d personally prefer as a config file format, although I’m aware that there are people who have issues with it.

          2. 1

            Can someone help me understand the use case for panes? Why would I want multiple command prompts in a single tab when I can just create a new tab?

            1. 2

              IME they are mostly useful for showing a CLI tool which renders dynamic data, like htop alongside a shell prompt - particularly if you either A) need to keep half an eye on the dynamic thing, or B) need to copy info out of it and work with it from the shell.

              1. 2

                To each their own. For me? There is exactly zero point in using a console / terminal that isn’t capable of doing that.

                Also Windows Terminal has sane cut & paste.

                1. 1

                  Sane as in the process doesn’t block anymore if text is being selected like the Command Prompt does?

                  1. 1

                    Correct.

                    Tested this with (from a Windows terminal window):

                    cpatti@DESKTOP-C663HTN:/mnt/c/Users/cpatt$ while true; do uname -a; date; sleep 1; done
                    Linux DESKTOP-C663HTN 4.4.0-18362-Microsoft #476-Microsoft Fri Nov 01 16:53:00 PST 2019 x86_64 x86_64 x86_64 GNU/Linux
                    Wed Dec  4 11:41:12 EST 2019
                    Linux DESKTOP-C663HTN 4.4.0-18362-Microsoft #476-Microsoft Fri Nov 01 16:53:00 PST 2019 x86_64 x86_64 x86_64 GNU/Linux
                    Wed Dec  4 11:41:13 EST 2019
                    

                    Selected that text and my loop kept running, displaying successive date/uname runs no matter how long I held the select box in place.

                    It’s really a nice piece of work and worth a look.

            2. -4

              Windows Terminal seems useless to me. Whenever it was released it was a mess of VB projects that took me quite a while just to compile. Isn’t the point of Windows to stay away from the terminal anyway? Why not use cmd or powershell?

              1. 15

                Windows Terminal is the thing that renders command line programs to a graphical display, like xterm. Cmd/powershell are command line programs, like bash. They’re not an alternative to each other.

                The source release does have some challenges compiling, mainly because the terminal is a UWP application which introduces signing and packaging requirements, but there’s no Visual Basic in there. This also means it requires a current version of Windows 10 to use.

                (Full disclosure: I work at Microsoft as a developer and use the command line a lot. You can see the tools I’m working on to have a better Windows command line experience at http://www.malsmith.net/yori/ .)

                1. 2

                  Thanks for the explanation; I’m obviously not very knowledgeable about this.

                  1. 1

                    Did you implement that (edit: that being the tab complete, preview of completion, etc) with ReadConsoleInput instead of plain ReadConsole? That’s how I’d do it, but I was recently playing with the CONSOLE_READCONSOLE_CONTROL (I wrote about it here: http://dpldocs.info/this-week-in-d/Blog.Posted_2019_11_25.html ) and how it is possible to do tab complete there but found it kinda meh, not able to work in the middle of a line, for example.

                    I’m just curious if there is something cool in there I missed, or if you just did it one key at a time with the readconsole input (which is what it looks like glancing at your source… but i could be missing something)

                    PS I actually like the Windows console overall!

                    1. 1

                      I was using ReadConsoleInput for a few reasons:

                      1. I didn’t know that the tab complete handshake was documented (thanks for letting me know how it works!);
                      2. The handshake as implemented in CMD is limited to the end of the line, which seems problematic to me. (In fairness, trying to overcome this means Yori is parsing command lines for individual arguments all the time which is itself problematic because there’s no universal standard for argument parsing.)
                      3. If I had known about the ReadConsole handshake, I still wouldn’t have used it since it’s Vista+. The catalyst for building my own was after getting NT 4’s CMD to run on 3.51 but not having tab completion because the 3.51 console didn’t support it (see http://www.malsmith.net/blog/nt351-runs-40-applications/ .)

                      As you’re implying though, ReadConsoleInput is a ton of work because every little detail needs to be painfully reimplemented - scrolling, left/right, backspace, ctrl+left/right, home/end, insert/overwrite, Alt+nn sequences, AltGr handling, blahblah. But on the plus side, it can do things like handle mouse input while typing, letting you move the cursor with the mouse, select text and delete it, etc. So it was a lot of work but not a total loss. Ideally this code would end up in a Windows-Readline type thing.

                      1. 1

                        Yeah, I agree with your reasoning. So brief story on my thing, a work project last week assigned me a bug about “€” getting mangled in input and output randomly. It just used C’s fread function in the code and a batch file doing chcp 65001. (running external programs explained the randomness; they’d change it and these stupid hacks don’t even bother to set it back to how it was upon exit. so sloppy)

                        I was going to switch to my readline type library, which does a lot of that stuff already, but it doesn’t do alt+nn codes and a few other things, it is biased toward my us-english usage. (Though it does do moving the cursor with the mouse! And a input suggestion thing, all very much like your cmd thing, just as a D language library.) ReadConsoleW just works on various input methods handling a lot of those details, so I committed that to call the bug fixed as incremental improvement… but I also played with the tab completion thing, which is barely documented, but I played with it before and know it can do a little bit.

                        But yeah, I agree with you that it is a little too limited… I was just hoping you knew something I didn’t and it was better than I thought. oh well.

                  2. 4

                    Like malxau mentioned it is just like a terminal emulator launching shells. Like in Unix-like systems, it will just launch pwsh for PowerShell. As far as using a terminal on Windows, I very much prefer to use programs like Neovim and Mercurial from the terminal. Windows Terminal getting better support implies these tools work much better with regards to fonts, colours etc.

                    Edit: I found this interview linked in the readme to be helpful in understanding why they did it, http://www.runasradio.com/Shows/Show/645

                    1. 2
                      1. 1

                        It’s also on the Store

                      2. 1

                        Does windows have “A point” :) It’s an operating system platform like any other. Windows Terminal corrects what many of us have seen as a long time deficiency - the ability to have a decent universal terminal emulator for use in Powershell, Cmd, Bash, or whatever other textual applications you want.

                        This makes a world of difference for those of us who feel that a platform isn’t useful until you can pop a shell and run ssh with a few keystrokes and actually have a usable environment :)

                        I used the lazy man’s approach and installed from the Microsoft Store and now it’s what I use for 100% of my command line interactions on Windows, whether they be Powershell, GitBash or WSL/bash.

                        It’s great and if you’re a Windows user who ever needs to work with UNIX or likes the command line, I recommend it.