Comments (3)
Yes, another case is when we would like to inspect the parameters so the command handles arguments from the STDIN or from files. To exemplify take the Unix command head
we could send arguments to head
through a pipe:
cat Package.swift | head
or we can send filenames as arguments to command.
head Package.swift README.md
Ruby handles these cases using ARGF
. for an example: https://rderik.com/blog/shell-friendly-ruby-scripts/. If we could provide something similar I think it would be helpful to build commands that are friendly to be composed not just stand-alone commands.
from console-kit.
In Console 4, would it be ok to do this?
final class Run: Command {
struct Signature: CommandSignature { }
let signature: Run.Signature = Signature()
// ....
}
There isn't any signature validation unless you set strict
to true
, so it would work.
from console-kit.
This now exists as AnyCommand
.
from console-kit.
Related Issues (20)
- Create a CLI without a Vapor Application HOT 1
- dynamic command HOT 2
- property wrappers
- Determinate help output ordering HOT 3
- unknown command help
- Property Wrappers look not to work
- Add readme. HOT 1
- Logging improvements. HOT 5
- Corrupt LoadingBar? HOT 1
- Persisting prompts and options HOT 1
- Not compiling for other platforms HOT 3
- Investigate Flaky Tests
- async overload for `Command.run(using context: CommandContext, signature: Signature)`
- Latest version fails to build on Xcode 13.4 HOT 1
- Default values HOT 6
- Use ArgumentParser instead of custom solution HOT 2
- AsyncCommand integration with Vapor.Application HOT 2
- Crash when using Secure Input in Docker container for custom Vapor Command HOT 8
- Console output generated via Vapor request loggers lagging in Linux deployment
- Concurrency warnings HOT 1
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 console-kit.