Skip to content

Commit fdc143c

Browse files
committed
BREAKING CHANGE: change config output format. Join commands with ; instead of using JSON array
Reason: it better fits into a future with built-in shell-like combinators #278 Before: $ aerospace config --get mode.service.binding --json { "alt-shift-k" : [ "join-with up", "mode main" ], "backspace" : [ "close-all-windows-but-current", "mode main" ], ... } After: $ aerospace config --get mode.service.binding --json { "alt-shift-h" : "join-with left; mode main", "esc" : "mode main; reload-config", "alt-shift-k" : "join-with up; mode main", "r" : "flatten-workspace-tree; mode main", "backspace" : "close-all-windows-but-current; mode main", "alt-shift-j" : "join-with down; mode main", "f" : "layout floating tiling; mode main", "alt-shift-l" : "join-with right; mode main" } Raycast extension doesn't depend on this API yet, so it should be fine to break it #215
1 parent 8edd3b8 commit fdc143c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/AppBundle/command/query/ConfigCommand.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ extension ConfigMapValue {
143143
func buildConfigMap() -> ConfigMapValue {
144144
let mode = config.modes.mapValues { (mode: Mode) -> ConfigMapValue in
145145
let binding: [String: ConfigMapValue] = mode.bindings.mapValues { binding in
146-
.array(binding.commands.map { .scalar(.string($0.args.description)) })
146+
.scalar(.string(binding.commands.map { $0.args.description }.joined(separator: "; ")))
147147
}
148148
return .map(["binding": .map(binding)])
149149
}

0 commit comments

Comments
 (0)