-
Notifications
You must be signed in to change notification settings - Fork 171
tree-wide: code style and print message cleanup #190
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
Conversation
b57147f to
853d52d
Compare
TomJo2000
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've been using this branch for my Apt 3.x testing and it is working as expected.
|
Do not replace space indent with tab for entire script ( Do not join local declarations, they seem like change for the sake of change. Rest is fine. |
|
Tabs is recommended in contributing guide for termux-packages. However, tabs rendering is not fixed width, and appears different on different devices/applications, and shouldn't be used for indents, as code and comments formatting gets mangled. Its bit too late to switch from tabs to spaces in termux-packages for existing scripts, but once lot of code gets pulled into libraries, spaces can be used. Even here, I don't think its a good idea to go in the wrong way, and would mess with git line history. Twaiks comment was about multiple invocations of local while being on the same line. Single line declarations can be good, especially for related variables, but people often split declaration in their code bases as its easier to read, including the variables set from parameters |
- Continuation of termux#179, particularly these topics from there: - termux#179 (review) - termux#179 (comment) - Contains things that were proposed there, but that it was decided to separate out into another PR for organization and easier review - Replaces backtick command substitution syntax with dollar symbol and parentheses command substitution syntax in shell scripts - Places double quote symbols around all string (non-numerical) variable references that aren't possibly-empty references in the argument lists of command invocations - (placing double quote symbols around a possibly-empty variable in a command invocation is a case where the double quote symbols would cause an error to happen) - Places double quote symbols around all instances of `@TERMUX_PREFIX@` and other replaced strings in `.sh.in` files - Remove unused function `hostname()` from `pkg` - Remove unused variable `PREFIX` from `termux-restore` - Unify and clarify instances of `login`-related error message in `chsh`
853d52d to
2077455
Compare
|
Looks good. Can merge. Note that |
|
Correct, |
|
You would have to do for base dir as well. But leave for now. I remembered I intended to use Tom, that's a bigger mess I don't have time for right now. Just make release based on this. |
There are many long explanations of various parts of that PR in its thread, but one thing I would like to call attention to briefly for first-time viewers that I didn't really yet, is that there are two variants of the proposal, the one without the "tstein's idea" commit, and the one with the "tstein's idea" commit, I slightly prefer the one without it, but I assume tstein slightly prefers the one with it, and the "tstein's idea" commit doesn't bother me very much and is overall still pretty similar. |
I agree, that PR significantly changes the behavior of |
|
I haven't looked at yours, but even I was working on other ideas, so a lot to look into. |
|
Merging this now then. |
|
I'll make a tag and release in a bit, I'll also go ahead and publish a release for 1.47.1, which never got one. |
|
Thanks. Make sure to bump version before releasing. Line 25 in 9806c79
|
|
I knew I was forgetting something, welp mulligan then. |

Continuation of fix(scripts/login.in): don't canonicalize symlink value #179, particularly these topics from there:
Contains things that were proposed there, but that it was decided to separate out into another PR for organization and easier review
Replaces backtick command substitution syntax with dollar symbol and parentheses command substitution syntax in shell scripts
Places double quote symbols around all string (non-numerical) variable references that aren't possibly-empty references in the argument lists of command invocations
Places double quote symbols around all instances of
@TERMUX_PREFIX@and other replaced strings in.sh.infilesRemove unused function
hostname()frompkgRemove unused variable
PREFIXfromtermux-restoreUnify and clarify instances of
login-related error message inchsh