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

Implement printf %*s and %.*s #650

Closed
Crestwave opened this issue Mar 9, 2020 · 5 comments · Fixed by #668
Closed

Implement printf %*s and %.*s #650

Crestwave opened this issue Mar 9, 2020 · 5 comments · Fixed by #668

Comments

@Crestwave
Copy link
Contributor

Crestwave commented Mar 9, 2020

This basically uses the first argument as a replacement for the asterisk, i.e. printf '%*s' 10 foo should be equivalent to printf %10s foo and printf '%.*s' 2 bar should be equivalent to printf '%.2s' bar.

@andychu
Copy link
Contributor

andychu commented Mar 9, 2020

OK interesting, which programs use it? That will help prioritize things, e.g. we want to fill out more of:

https://github.com/oilshell/oil/wiki/Shell-Programs-That-Run-Under-OSH

@Crestwave
Copy link
Contributor Author

Well, um, it was used in pfetch, but I found out that it wasn't POSIX and reported it so now it doesn't. I also use it in shmenu and it's also used in fff, though.

@andychu
Copy link
Contributor

andychu commented Mar 15, 2020

#653 also mentioned printf %()T and these could be tackled together

@andychu
Copy link
Contributor

andychu commented Mar 19, 2020

cde3f10

@andychu
Copy link
Contributor

andychu commented Mar 25, 2020

@andychu andychu closed this as completed Mar 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants