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

The procedure to change the pager to less on Windows according to the docs does not work #5226

Open
AngelEzquerra opened this issue Jan 1, 2025 · 5 comments
Labels
🐛bug Something isn't working documentation Improvements or additions to documentation 🪟Windows

Comments

@AngelEzquerra
Copy link

Description

https://jj-vcs.github.io/jj/latest/windows/#pagination says that you can do:

jj config set --user ui.pager '["C:\Program Files\Git\usr\bin\less.exe", "-FRX"]'

To set the pager to less on Windows. However, that command fails with:

error: unexpected argument '-F' found

Manually editing the config file to set ui.pager to that value works fine.

Steps to Reproduce the Problem

  1. Open a Windows Command line
  2. Execute: jj config set --user ui.pager '["C:\Program Files\Git\usr\bin\less.exe", "-FRX"]'
  3. You get error: unexpected argument '-F' found

Specifications

  • Platform: Windows
  • Version: 0.24
@PhilipMetzger PhilipMetzger added 🐛bug Something isn't working documentation Improvements or additions to documentation labels Jan 1, 2025
@ilyagr
Copy link
Contributor

ilyagr commented Jan 1, 2025

On Discord, you claimed that the docs suggestion failed for both cmd.exe and Powershell, right? I'm guessing you get different errors depending on which you use.

@yuja
Copy link
Contributor

yuja commented Jan 2, 2025

I have no idea about the parsing rule of Windows shells, but this might be fixed by 3f115cb in a way that invalid TOML expression is reported as an error. (I don't know if the documentation example is valid or not on PowerShell either.)

@AngelEzquerra
Copy link
Author

FYI I get the same error with jujutsu 0.25.

@yuja
Copy link
Contributor

yuja commented Jan 2, 2025

Can you check what was written to config.toml? I suspect the value expression would be parsed by the shell, and the resulting TOML expression would got wrong.
It would be nice if someone who use Windows can send a documentation fix.

@emilazy
Copy link
Contributor

emilazy commented Jan 2, 2025

AIUI Windows is weird in that cmd.exe doesn’t parse command lines itself, it relies on the program itself to do tokenization (usually by libc, I guess? I assume Rust implements whatever the “standard” syntax is); that seems like it could be relevant here. (I expect PowerShell does something different – I wouldn’t be surprised if it parses the command line and then serializes it back to a string for execution…)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛bug Something isn't working documentation Improvements or additions to documentation 🪟Windows
Projects
None yet
Development

No branches or pull requests

5 participants