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

ls -w should reject invalid values #3609

Closed
sylvestre opened this issue Jun 9, 2022 · 1 comment
Closed

ls -w should reject invalid values #3609

sylvestre opened this issue Jun 9, 2022 · 1 comment
Labels

Comments

@sylvestre
Copy link
Contributor

This option does the following:

       -w, --width=COLS
              set output width to COLS.  0 means no limit
$ ls -w8 > /dev/null; echo $?
0

$ ls -w08; echo $?                                                                                                                                                                                                   
ls: invalid line width: '08'
2

$ ./target/debug/coreutils ls -w08 > /dev/null; echo $?                                                                                                                                                              
0

Tested by GNU here:
https://github.com/coreutils/coreutils/blob/master/tests/ls/w-option.sh#L30=

@sylvestre
Copy link
Contributor Author

Fixed by @Ganneff

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

No branches or pull requests

1 participant