-
-
Notifications
You must be signed in to change notification settings - Fork 329
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
request: allow ; shift
to remain at the end of lines
#679
Comments
"$1"; shift
"$1"; shift
; shift
to remain at the end of lines
You might be interested in #564. It's a similar kind of feature, but for a good reason; since Bash parses lines one by one, spliting Other people have asked for ways to have "one-liners", such as #591 #602 #261. The problem is - where do we draw the line? I certainly don't want to allow multiple commands on a single line in general, as that would make the formatting too inconsistent. So my default stance is to only allow the I will say that I find this case more commonly useful than the other cases which have been brought up, since this is a useful (and the only) way to have named parameters in a function declaration. Maybe it would be reasonable to pattern-match |
Please don't paste large screenshots of text. Just paste the text. We'll definitely not add a feature like never-split. You're free to use forks, but those are different projects entirely. My thinking is still leaning in favor of doing this, see my last comment. |
I figured since there's already some options for indenting switch cases or putting a space after redirect operators, you also might be open to supporting the following pattern:
Here's a few examples from shell scripts of popular projects where this pattern could be found:
https://github.com/ohmybash/oh-my-bash/blob/master/themes/colours.theme.sh
https://github.com/sonph/onehalf/blob/master/gnome-terminal/onehalfdark.sh#L84-L106
https://github.com/kohler/click/blob/master/click-compile.in#L43-L85
I'm going to look through the code to see if it's something I could tackle, but in the meantime figured I'd open this request. If you don't think it's something you'd like to support, that's okay. I still really appreciate the tool!
Thanks!
The text was updated successfully, but these errors were encountered: