use dash instead of bash for inlined application-setup commands
Use dash instead of bash for inlined application-setup commands
Type of Change
- [ ] New feature
- [x] Bug fix
- [ ] Documentation Update
- [x] Refactoring
- [ ] Hotfix
- [ ] Security patch
- [x] UI/UX improvement
Description
The setup scripts for both mybash & Chris's custom neovim setup use ANSI escapes to color text, but bash isn't posix compliant in the way that the echo command handles escapes. This change allows for proper presentation of the commands as they emit notifications without distracting escape sequences being emitted without being interpreted.
Testing
Very simple change, just verified that the commands run with the escape sequences being interpreted properly
Impact
Removes a lot of superfluous escape sequences and makes the command output more readable.
Checklist
- [x] My code adheres to the coding and style guidelines of the project.
- [x] I have performed a self-review of my own code.
- [x] I have commented my code, particularly in hard-to-understand areas.
- [x] I have made corresponding changes to the documentation.
- [x] My changes generate no errors/warnings/merge conflicts.
Instead of doing that I think we should just move those scripts over to this repository and make them posix compliant if they aren't.
It's probably better that they stay where they are since they're definitely going to be changing. They're posix enough that they're designed to be run with dash anyway, hence the echo issues
I just took a look at the setup scripts in those repositories and it seems there are quite a lot of bashisms, I'm going to make a PR in a bit that will remove those bashisms and move the scripts over to this repository.
Considering that one of them is a bash config, it should be fine...
Considering that one of them is a bash config, it should be fine...
Running the mybash-installer doesn't have to mean you're on bash; it could mean that you're using zsh or another shell, if that's the case then having bashisms inside of a script that installs the mybash-configuration will be bad and the script won't work properly. If a person is indeed using zsh or some other shell that adheres to posix standards and does not support bashisms they will not be able to use the script to install bash and CTT's mybash config because it contained bashisms. - Exaggerated but could be a real situation. Especially with the neovim config, In the PR I made I rewrote it in posix compliant standards so people using Linutil won't have to worry about being on bash to run the script without errors.
The setup script for mybash* has no bashisms
The setup script for mybash* has no bashisms
The original script in CTT's repo does have bashisms
@cartercanedy Also, Chris did say he wanted to eventually move everything over to this repository; so I think it should be fine.
The setup script for mybash* has no bashisms
The original script in CTT's repo does have bashisms
This warning is part of* the reason that I made the switch. Bash doesn't render escapes by default, which isn't posix compliant, but this is printed normally using dash or any other shell
The setup script for mybash* has no bashisms
The original script in CTT's repo does have bashisms
This warning is pay off the reason that I made the switch. Bash doesn't render escapes by default, which isn't posix compliant, but this is printed normally using dash or any other shell
I see. Could you give me opinions on #335 ?
Sorry for the inconvenience. We had a massive restructure of the codebase to improve future development. Because of this can you update your PR to the new structure. Thank you for your assistance and contribution.
