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

--terminal-width -10 is parsed incorrectly #611

Closed
rwe opened this issue Jul 21, 2019 · 3 comments
Closed

--terminal-width -10 is parsed incorrectly #611

rwe opened this issue Jul 21, 2019 · 3 comments
Labels
bug Something isn't working

Comments

@rwe
Copy link

rwe commented Jul 21, 2019

The dash appears to be interpreted as a flag.

The man page says:

If prefixed with '+' or '-', the value will be treated as an offset to the actual terminal width.

However, executing produces an error.

$ bat --terminal-width -10 foo.md
error: Found argument '-1' which wasn't expected, or isn't valid in this context

USAGE:
    bat --terminal-width <width> --theme <theme>

For more information try --help

Using a positive offset (+10) or fixed value (120) both behave as expected.

@rwe
Copy link
Author

rwe commented Jul 21, 2019

As a workaround, combining the option into a single token behaves correctly:
--terminal-width=-10

@sharkdp sharkdp added the bug Something isn't working label Jul 24, 2019
@sharkdp
Copy link
Owner

sharkdp commented Jul 24, 2019

Thank you for the feedback.

Fixed in 76c615a

@sharkdp
Copy link
Owner

sharkdp commented Aug 31, 2019

Fixed in bat v0.12.

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

No branches or pull requests

2 participants