Comments (5)
@voobscout Same issue for me
from admiral.cr.
from admiral.cr.
I'm using branch: HEAD
in my shard.yaml
from admiral.cr.
Using master, head as well
from admiral.cr.
imho this can be closed...
I would appreciate the ability to do this as well:
# hello.cr
require "admiral"
class Planetary < Admiral::Command
def run
puts "Hello World"
end
end
class Municipality < Admiral::Command
define_help description: "City"
class Zip < Admiral::Command
def run
puts "Hello City, Zip!"
end
end
def run
puts help
end
register_sub_command zip : Zip, description: "Nested subcommand"
end
class Hello < Admiral::Command
register_sub_command planet : Planetary, description: ""
register_sub_command city : Municipality, description: ""
define_help description: "Testing subcommands"
def run
puts help
end
end
Hello.run
Not sure even if it is possible to achieve, since i'm a crystal noob, but the ability to just inherit from Admiral::Command and stick that class as a subcommand of any other Admiral::Command sound quite awesome!
atm protected method 'parse_and_run' called for <classname>
appears when trying to run the above..
from admiral.cr.
Related Issues (19)
- Can't call --help when there is any required flags HOT 1
- Flags inheritance with subcommands HOT 1
- Help does not work when required arguments are missing HOT 1
- Required arguments not working HOT 6
- Empty arg error handling
- No variable named long_reg HOT 1
- Crystal 0.27.0 Upgrade HOT 5
- Defining flags after or before command HOT 2
- Flags don't work with spaces. HOT 2
- Negative numbers not accepted as argument HOT 1
- Flag arrays with required false are still required
- Parent flags/arguments in subcommands help HOT 2
- Problem initializing default value for flag from code HOT 1
- Exit status for unknown command/subcommand HOT 1
- A way to say "this or this" HOT 3
- IO might be Bool HOT 6
- Displaying application version in examples
- Ability to remove parsed parts HOT 2
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 admiral.cr.