Skip to content

Commit fe4353e

Browse files
jonchunclaude
andauthored
Allow --no-pager flag for all systemctl subcommands (#100)
* Fix connection key mismatch between Go and fawdy2 Return bare hostname as `key` in connect response so fawdy2 uses it for subsequent command lookups, instead of constructing user@host:port which doesn't match Go's internal connection map. Co-Authored-By: Claude Opus 4.6 <[email protected]> * Allow --no-pager flag for all systemctl subcommands The --no-pager flag is a global systemctl option useful in non-interactive contexts. It was only allowed for systemctl_status but rejected for list-units, show, is-active, and is-enabled. Co-Authored-By: Claude Opus 4.6 <[email protected]> --------- Co-authored-by: Claude Opus 4.6 <[email protected]>
1 parent 59483de commit fe4353e

File tree

5 files changed

+7
-2
lines changed

5 files changed

+7
-2
lines changed

control/control.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ func (s *Server) dispatch(ctx context.Context, req Request) Response {
148148
}
149149
data, _ := json.Marshal(map[string]string{
150150
"host": params.Host,
151+
"key": params.Host,
151152
"message": "Connected to " + params.Host,
152153
})
153154
return Response{OK: true, Data: data}
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: systemctl_is-active
22
description: Check whether units are active
33
category: services
4-
flags: []
4+
flags:
5+
- flag: "--no-pager"
56
stdin: false
67
stdout: true
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: systemctl_is-enabled
22
description: Check whether unit files are enabled
33
category: services
4-
flags: []
4+
flags:
5+
- flag: "--no-pager"
56
stdin: false
67
stdout: true

manifest/manifests/systemctl_list-units.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,6 @@ flags:
55
- flag: "--type"
66
takes_value: true
77
- flag: "--failed"
8+
- flag: "--no-pager"
89
stdin: false
910
stdout: true

manifest/manifests/systemctl_show.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,6 @@ category: services
44
flags:
55
- flag: "-p"
66
takes_value: true
7+
- flag: "--no-pager"
78
stdin: false
89
stdout: true

0 commit comments

Comments
 (0)