Coder Social home page Coder Social logo

Comments (5)

DannyBen avatar DannyBen commented on September 22, 2024 1

Cool. I have added bashly validate --verbose which will show the "compiled" config. Next release.

from bashly.

DannyBen avatar DannyBen commented on September 22, 2024

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.

DannyBen avatar DannyBen commented on September 22, 2024

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.

weierophinney avatar weierophinney commented on September 22, 2024

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.

weierophinney avatar weierophinney commented on September 22, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.