Comments (5)
Cool. I have added bashly validate --verbose
which will show the "compiled" config. Next release.
from bashly.
I can't reproduce this.
Followed your instructions, and the actual behavior matches the expected.
# src/bashly.yml
name: cli
commands:
- name: toplevel
help: "The toplevel command namespace"
commands:
- import: src/toplevel_nested_command.sh
# src/toplevel_nested_command.sh
name: nested
help: "The nested command"
---
inspect_args
Output
➜ ./cli
cli
Usage:
cli COMMAND
cli [COMMAND] --help | -h
cli --version | -v
Commands:
toplevel The toplevel command namespace
➜ ./cli toplevel
cli toplevel - The toplevel command namespace
Usage:
cli toplevel COMMAND
cli toplevel [COMMAND] --help | -h
Commands:
nested The nested command
And the second variant works as well (although I did not expect it to).
The import
directive is just bringing that YAML snippet to the host file.
Assuming your file is more complex than the example (judging by root.commands[14].name must be a string
) - I would guess the error is elsewhere. Possibly indentation issues?
from bashly.
Perhaps it would be helpful for such use cases if bashly validate
had a flag that if set, would show the "complete" YAML file?
from bashly.
I wonder if it's a difference between 0.8.7 and 0.8.8; I'll try to reproduce with 0.8.8.
from bashly.
Closing; it turned out to be a configuration issue on my part (I'd included the command file earlier in my script as well).
from bashly.
Related Issues (20)
- Presence of `header.sh` breaks executable HOT 5
- How to access permanent environment variable in ./zshrc or ./bashrc HOT 3
- Automation Tools
- test/approve template missing HOT 3
- How can I install this on CentOS ? HOT 1
- Allow flags for commands that have subcommands HOT 20
- Flags not shown in help
- Is there a way to add alias "help" to fixed_flags_filter ? HOT 5
- Is there a way to put cli_usage to custom header? HOT 1
- Dafault environment_variables should be accessible in initialize script HOT 3
- Send errors to stderr HOT 7
- Upgrade template & utility functions HOT 3
- Only commands can be imported? HOT 4
- Is there a way to create global flags? HOT 17
- Issues with `normalize_input` and `catch_all` HOT 14
- Ambiguous error messages HOT 8
- Make invalid `expose` warn instead of error HOT 8
- Alias a command to a subcommand HOT 20
- Ambiguous error messages HOT 11
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.