-
Notifications
You must be signed in to change notification settings - Fork 8.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Auto display readme`s #8647
Comments
This would need something like #3158 to be implemented first, so that the shell can tell the terminal what the current directory is. |
This probably wouldn't be a feature of the terminal but instead something that you would implement inside of your shell instead. When #4472 eventually lands you will be able to use the Doing all this would be outside the scope of the terminal which should be a 'dumb' process isn't going to be scanning directories or rendering markdown in the first place. |
If you change from one directory to another, and each directory has its own README, then perhaps you want the README of the new directory to display in the same pane as the previous one, instead of opening a third pane. On the other hand, if you detach the README pane from the original tab to a separate tab (#4587), then perhaps you want that to keep displaying the same README regardless of what happens in the shell session afterwards. This might be implemented by allowing each pane to have a name (in addition to the pane title described in #7290). The shell could then run a command like Alternatively, Windows Terminal could support named relationships between panes, i.e. know that the README viewer pane has a |
If the shell is running on a remote computer behind (Later DEC terminals, like the VT420, support the TD/SMP protocol for multiplexing several sessions over the same serial cable. In theory, I imagine TD/SMP could be used over SSH, instead of tmux control mode. However, it does not seem to be widely implemented on servers nowadays, I cannot find a protocol specification, and it might not support features such as resizable panes. It was also patented, although the patents may have expired by now.) |
Alright, from the start, this isn't something we'd build into the Terminal by default. If anything, it'd have to be an extension, so #4000. Once #4472 lands, this will be a lot easier. Assuming
and that'll open a new split in the current directory, in the current window, running that command.
EDIT: Unsurprisingly, the above does not work. I'll stick this on the backlog for extensions for "trigger some extension behavior when the shell's current directory changes". |
How would |
🤦♂️ Yea that won't work. I'll edit my comment. That's what I get for triaging on a Sunday 😄 |
This adds support to the Terminal for parsing Markdown to XAML. We're using https://github.com/github/cmark-gfm as our parser, so that we can support the fullness of github-flavored markdown. The parser parses the markdown to produce a `RichTextBlock`, which covers just about all the scenarios we need. Since we're initially just targeting using this for "Release notes", I didn't implement _everything_ in markdown[^1]. But headers, bold & italic, unordered lists, images, links, code spans & blocks - all that works. We can work on additional elements as we need them. The parser is encapsulated into `Microsoft.Terminal.UI.Markdown.dll`, so that we won't load it on startup, only when the pane is actually made the first time. To test this out, I've added a `MarkdownPaneContent` pane type on `x-markdown` (the `x-` is "experimental"). Go ahead and add that with: ```json { "command": { "action": "splitPane", "type": "x-markdown" } } ``` That's got the ability to load arbitrary MD files and render them. I wouldn't call that experience finished though[^2][^3](and it probably won't be in 1.22 timeframe). However, it is an excellent testbed for validating what we do and do not support. We'll use the markdown parser Soon<sup>TM</sup> for the What's New panes. * Done in pursuit of displaying release notes in the Terminal. * Doesn't quite close out #16495 * Should make #8647 possible * may help with #16484 [^1]: the most notable gap being "block quotes" with `>`. I don't think I can draw a vertical line in a rich text block easily. Footnotes are also missing, as well as tables. [^2]: I say it's not finished because the aforementioned MD gaps. Also the UX there is not polished at all. [^3]: I don't believe we'll have time to polish out the pure markdown pane for 1.22, but what the parser covers now is more than enough for the release notes pane in time for 1.22
This one is a bit like that fighting type bird pokemon.
Description of the new feature/enhancement
t`would be sort of cool if there was a way to show readme’s in a new vertically split pane.
(preferably with markdown rendered like here (https://github.com/mikaelbr/marked-terminal))
Proposed technical implementation details (optional)
Search current dir level for readme.* and then auto execute split pane vertically and have it ran in marked-terminal or preferably something that is written c++ or rust. And also outputs plain txt
The text was updated successfully, but these errors were encountered: