Skip to content
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

feat: Support specifying terminal width #34

Closed
pawamoy opened this issue Jan 26, 2024 Discussed in #33 · 5 comments
Closed

feat: Support specifying terminal width #34

pawamoy opened this issue Jan 26, 2024 Discussed in #33 · 5 comments

Comments

@pawamoy
Copy link
Owner

pawamoy commented Jan 26, 2024

Discussed in #33

Originally posted by NikosAlexandris January 26, 2024
Rich table output in the console is truncated (i.e. table column names are incomplete), for example : https://nikosalexandris.github.io/rekx/how_to/inspect/. See in this pages source code the output of commands wrapped inside a block

    ``` bash exec="true" result="ansi" source="above"
    ```

Any idea how to "fix" this ?
See also : squidfunk/mkdocs-material#4964 (comment).


We could provide a new option to set the terminal width in the subprocess. Basically export COLUMNS=1000.

@NikosAlexandris could try the following and let me know if it fixes your issue?

``` bash exec="true" result="ansi" source="above"
export COLUMNS=1000  # markdown-exec: hide
rekx inspect data/single_file/SISin202001010000004231000101MA.nc
```
@NikosAlexandris
Copy link

We could provide a new option to set the terminal width in the subprocess. Basically export COLUMNS=1000.

@NikosAlexandris could try the following and let me know if it fixes your issue?

``` bash exec="true" result="ansi" source="above"
export COLUMNS=1000  # markdown-exec: hide
rekx inspect data/single_file/SISin202001010000004231000101MA.nc

Yes! It works.

In the screenshot, above is without export COLUMNS=1000 and below is with it :

2024-01-26T22:55:53,600430850+02:00

That looks so much better! Had we also a full-width option, it'd be ideal. Kind regards @pawamoy.

@NikosAlexandris
Copy link

Can such an option (here export COLUMNS=1000) be pre-set globally ?

@pawamoy
Copy link
Owner Author

pawamoy commented Jan 26, 2024

Thanks for reporting back 🙂

Can such an option (here export COLUMNS=1000) be pre-set globally ?

Good idea, I'll think about it 🤔

Had we also a full-width option, it'd be ideal.

What do you mean exactly by full-width option?

@NikosAlexandris
Copy link

Had we also a full-width option, it'd be ideal.

What do you mean exactly by full-width option?

Please have a look at https://jupyterbook.org/en/stable/content/layout.html#full-width-code-cells.

@pawamoy
Copy link
Owner Author

pawamoy commented Jan 26, 2024

I see, thanks. This is irrelevant to Markdown Exec though, as it's not responsible for the actual (HTML) rendering of code blocks.

pawamoy added a commit that referenced this issue Jun 13, 2024
It will set the `COLUMNS` environment variable.

Issue-34: #34
@pawamoy pawamoy closed this as completed Jun 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants