Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
jdx committed Dec 10, 2024
1 parent b569cd3 commit 83b6a6b
Show file tree
Hide file tree
Showing 14 changed files with 135 additions and 111 deletions.
126 changes: 51 additions & 75 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ path = "src/main.rs"
chrono = "0.4"
clap = { version = "4", features = ["derive"] }
clap_usage = "1"
cli-table = "0.4.9"
comfy-table = "7.1.3"
console = "0.15"
dirs = "5"
duct = "0.13"
Expand Down
20 changes: 16 additions & 4 deletions docs/cli/commands.json
Original file line number Diff line number Diff line change
Expand Up @@ -373,13 +373,20 @@
"full_cmd": [
"status"
],
"usage": "status",
"usage": "status <ID>",
"subcommands": {},
"args": [],
"args": [
{
"name": "ID",
"usage": "<ID>",
"required": true,
"hide": false
}
],
"flags": [],
"mounts": [],
"hide": false,
"help": "Display the status of a daemons",
"help": "Display the status of a daemon",
"name": "status",
"aliases": [
"stat"
Expand Down Expand Up @@ -571,5 +578,10 @@
"props": {}
},
"usage": "Usage: pitchfork-cli <COMMAND>",
"complete": {}
"complete": {
"id": {
"name": "id",
"run": "pitchfork ls | awk '{print $1}'"
}
}
}
2 changes: 1 addition & 1 deletion docs/cli/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
- [`pitchfork logs [-n <N>] [-t --tail] [NAME]...`](/cli/logs.md)
- [`pitchfork run [-f --force] <NAME> [CMD]...`](/cli/run.md)
- [`pitchfork start [NAME]...`](/cli/start.md)
- [`pitchfork status`](/cli/status.md)
- [`pitchfork status <ID>`](/cli/status.md)
- [`pitchfork stop`](/cli/stop.md)
- [`pitchfork supervisor <SUBCOMMAND>`](/cli/supervisor.md)
- [`pitchfork supervisor run [-f --force]`](/cli/supervisor/run.md)
Expand Down
10 changes: 8 additions & 2 deletions docs/cli/status.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
# `pitchfork status`

- **Usage**: `pitchfork status`
- **Usage**: `pitchfork status <ID>`
- **Aliases**: `stat`

Display the status of a daemons
Display the status of a daemon

## Arguments

### `<ID>`

Display the status of a daemon
1 change: 1 addition & 0 deletions pitchfork-extras.usage.kdl
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
complete "id" run="pitchfork ls | awk '{print $1}'"
5 changes: 4 additions & 1 deletion pitchfork.usage.kdl
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,9 @@ cmd "start" help="Starts a daemon from a pitchfork.toml file" {
alias "s"
arg "[NAME]..." help="Name of the daemon(s) in pitchfork.toml to start" var=true
}
cmd "status" help="Display the status of a daemons" {
cmd "status" help="Display the status of a daemon" {
alias "stat"
arg "<ID>"
}
cmd "stop" help="Kill a running daemon" {
alias "kill"
Expand All @@ -87,3 +88,5 @@ cmd "wait" help="Wait for a daemon to stop, tailing the logs along the way" {
Exits with the same status code as the daemon"
}

complete "id" run="pitchfork ls | awk '{print $1}'"

1 change: 0 additions & 1 deletion src/cli/completion.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ impl Completion {
)
.run()
.into_diagnostic()?;

Ok(())
}
}
Loading

0 comments on commit 83b6a6b

Please sign in to comment.