Comments (8)
Ooh, that's an exciting package that I was totally unaware of! Thanks!
from bashly.
The generated scripts require bash 4 as stated in the prerequisites section of the documentation.
Changing the shebang to zsh
is not a good idea as it will just require double effort in testing, and will force the generated script to use the lowest common demonimator. You can still run bash scripts in zsh (or any other) shell, as long as a modern bash is installed.
Bash 4.0 was released in 2009 - the complaint should be directed to Apple for bundling a 12 year old software.
I can add the instruction for brew install bash
in the prerequisites section - will that be acceptable as a hint? In addition, if you know your users are mostly on mac with outdated bash, you can customize this error by adding the following file to your src
folder:
# src/bashly-strings.yml
unsupported_bash_version: "bash version 4 or higher is required (brew install bash on mac)"
See Custom Strings in the docs for more info.
Also, the graceful exit when bash is < 4 was recently added by a user request (#90).
but updating bash can be viewed as invasive by sysadmin.
... there is really no reason to keep an old bash in the system. Apple uses it just due to some licensing wars to my understanding. I don't believe in "staying behind" just because the manufacturer has a different agenda than user happiness (e.g. Internet Explorer 11...).
from bashly.
Happy to help :) sorry if my "solutions" came across as a bit "not-thought-through" - I was just trying to think of ideas.
Very excited to use the bashly script that we've created! :)
from bashly.
sorry if my "solutions" came across as a bit "not-thought-through"
Are you kidding? It is very appreciated that you took the time to look for solutions and not just point out a problem.
In fact, I feel like I should be the one to apologize for not having this requirement (and solution) more clearly on the documentation site - so let's meet in the middle, and nobody apologizes to nobody! :)
Very excited to use the bashly script that we've created! :)
Happy to hear!
There are quite a few "hidden features" that can be found in the documentations and examples, and also note that the generated script is by design, very human readable.
from bashly.
Nice! Thanks for the suggestion on the .yml, we'll do that!
The graceful exit makes total sense :)
I agree with blaming Apple for all this nonsense!
from bashly.
Cool.
I will update the docs, and if more users land on this issue and think that changing the default error message to include instructions to brew install bash
is a good idea, please comment here and I will add it if there is demand.
Thanks for your report, and If something else is unclear or not working as expected, feel free to open a new issue.
from bashly.
Sounds great 😄 Thanks for your help!
from bashly.
Oh - and one last tip:
If you are serious about your bash scripts, and the quality of your code, you should use shellcheck to verify the output.
All code generated by bashly itself, is shellcheck compliant.
EDIT: I have added more details about Testing Your Scripts to the docs.
from bashly.
Related Issues (20)
- Keep comments in ini config file HOT 1
- Here documents don't work HOT 6
- Update bashly schema to support `flag.unique` and `arg.unique` HOT 2
- Package external files with the generated bashly command HOT 3
- Allow default array when repeatable is true HOT 9
- Add support for array in `flag.default` and `arg.default` schema HOT 1
- JSON schema validation passes when it shouldn't HOT 12
- Add JSON schema tests to ensure the validation fails when it should HOT 1
- Whitelisted arg with default from environment HOT 6
- Add `environment_variable.allowed` whitelist HOT 1
- Update `inspect_args` to also print managed environment variables HOT 1
- Docker container does not have pandoc installed HOT 2
- Do not render `inspect_args` when `env` is set to `production` HOT 2
- Add key-value parameters HOT 6
- Add support for recursive --help HOT 6
- Build multi-arch docker HOT 2
- Default argument is not validated HOT 6
- Flag arguments with a single hyphen prefix are not working HOT 1
- bash completions can't work properly when the position args used 'allowed:' HOT 3
- Repeatable args don't escape quotation marks HOT 12
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bashly.