---
This avoid extra slicing, but practically it's mostly a cosmetic surgery
removing the punctuation soup where possible.
src/api/_FnTable.zig | 2 +-
src/api/bind_button.zig | 4 ++--
src/api/bind_click.zig | 4 ++--
src/api/bind_gesture.zig | 4 ++--
src/api/bind_key.zig | 4 ++--
src/api/bind_quit.zig | 4 ++--
src/api/bind_signal.zig | 4 ++--
src/api/bind_timer.zig | 4 ++--
src/api/cache_dlbbox.zig | 4 ++--
src/api/cache_dlradius.zig | 4 ++--
src/api/cache_queueclear.zig | 2 +-
src/api/center_on_mouse.zig | 2 +-
src/api/center_on_pin.zig | 2 +-
src/api/clipcopy.zig | 2 +-
src/api/clippaste.zig | 2 +-
src/api/filedump.zig | 4 ++--
src/api/fileload.zig | 4 ++--
src/api/move_relative.zig | 4 ++--
src/api/pin_activate.zig | 4 ++--
src/api/pin_add.zig | 4 ++--
src/api/pin_cycle.zig | 4 ++--
src/api/pin_deactivate.zig | 2 +-
src/api/pin_delete.zig | 4 ++--
src/api/pin_groupactivate.zig | 4 ++--
src/api/pin_meta.zig | 4 ++--
src/api/pin_purge.zig | 2 +-
src/api/pin_transfer.zig | 4 ++--
src/api/prefinc.zig | 4 ++--
src/api/prefset_n.zig | 4 ++--
src/api/prefset_t.zig | 4 ++--
src/api/preftoggle.zig | 4 ++--
src/api/quit.zig | 2 +-
src/api/shellpipe_async.zig | 4 ++--
src/api/shellpipe_sync.zig | 4 ++--
src/api/zoom_relative.zig | 4 ++--
35 files changed, 61 insertions(+), 61 deletions(-)
diff --git a/src/api/_FnTable.zig b/src/api/_FnTable.zig
index 6e415500fc4a..a8a576ea7a96 100644
--- a/src/api/_FnTable.zig
+++ b/src/api/_FnTable.zig
@@ -1,7 +1,7 @@
const types = @import("../types.zig");
const std = @import("std");
-pub const fn_specs = &[_]types.MepoFnSpec{
+pub const fn_specs = [_]types.MepoFnSpec{
@import("bind_button.zig").spec,
@import("bind_click.zig").spec,
@import("bind_gesture.zig").spec,
diff --git a/src/api/bind_button.zig b/src/api/bind_button.zig
index fb1d7bd57aee..c45d8279d82a 100644
--- a/src/api/bind_button.zig
+++ b/src/api/bind_button.zig
@@ -7,13 +7,13 @@ const utildbg = @import("../util/utildbg.zig");
pub const spec = .{
.name = "bind_button",
.desc = "Create a UI button which executes a mepolang action. UI buttons appear aligned in the bottom right of the screen or the top left alongside the pin details overlay (see first argument).",
- .args = (&[_]types.MepoFnSpecArg{
+ .args = &.{
.{ .tag = .Number, .name = "visible_only_when_pin_active", .desc = "Set to `1` to only show button in top bar *if* there is a currently activated pin." },
.{ .tag = .Number, .name = "group_number", .desc = "Group number (`0`-`9`) to associate with button. A Colorbar will match group # and button will highlight when group active. Use `-1` for no associated group." },
.{ .tag = .Text, .name = "button_text", .desc = "Text that will be shown on the button" },
.{ .tag = .Text, .name = "mepolang_expression_click_single", .desc = "Mepolang expression to run on single clicking the button" },
.{ .tag = .Text, .name = "mepolang_expression_click_hold", .desc = "Mepolang expression to run on holding the button" },
- })[0..],
+ },
.execute = execute,
};
diff --git a/src/api/bind_click.zig b/src/api/bind_click.zig
index 9934282a59e7..dd1ce350c559 100644
--- a/src/api/bind_click.zig
+++ b/src/api/bind_click.zig
@@ -7,11 +7,11 @@ const utildbg = @import("../util/utildbg.zig");
pub const spec = .{
.name = "bind_click",
.desc = "Bind a particular number of successive clicks to run a mepolang action.",
- .args = (&[_]types.MepoFnSpecArg{
+ .args = &.{
.{ .tag = .Number, .name = "button", .desc = "Mousebutton to bind (`1` = left, `2` = right, `3` = middle)" },
.{ .tag = .Number, .name = "clicks", .desc = "Number of successive clicks to trigger action" },
.{ .tag = .Text, .name = "mepolang_expression", .desc = "Mepolang expression to run" },
- })[0..],
+ },
.execute = execute,
};
diff --git a/src/api/bind_gesture.zig b/src/api/bind_gesture.zig
index 72204654b564..b9169e467941 100644
--- a/src/api/bind_gesture.zig
+++ b/src/api/bind_gesture.zig
@@ -7,12 +7,12 @@ const utildbg = @import("../util/utildbg.zig");
pub const spec = .{
.name = "bind_gesture",
.desc = "Bind a multitouch gesture event to execute a mepolang action.",
- .args = (&[_]types.MepoFnSpecArg{
+ .args = &.{
.{ .tag = .Text, .name = "action", .desc = "Gesture action (set to either `pan` or `rotate`)" },
.{ .tag = .Number, .name = "fingers", .desc = "Number of fingers to trigger expression" },
.{ .tag = .Number, .name = "direction", .desc = "Direction for gesture (e.g. `1` for in or `-1` for out)" },
.{ .tag = .Text, .name = "mepolang_expression", .desc = "Mepolang expression to run" },
- })[0..],
+ },
.execute = execute,
};
diff --git a/src/api/bind_key.zig b/src/api/bind_key.zig
index 5212c8e2ee0c..5c8eeaf045c8 100644
--- a/src/api/bind_key.zig
+++ b/src/api/bind_key.zig
@@ -7,11 +7,11 @@ const utildbg = @import("../util/utildbg.zig");
pub const spec = .{
.name = "bind_key",
.desc = "Bind a key combination to execute a mepolang action.",
- .args = (&[_]types.MepoFnSpecArg{
+ .args = &.{
.{ .tag = .Text, .name = "modifier", .desc = "Modifier combination (`c`=control, `s`=shift, `a`=alt); ex. `cs` would mean control and shift" },
.{ .tag = .Text, .name = "key", .desc = "Key to bind; note case indiscriminate since modifier handled by modifier argument" },
.{ .tag = .Text, .name = "mepolang_expression", .desc = "Mepolang expression to run" },
- })[0..],
+ },
.execute = execute,
};
diff --git a/src/api/bind_quit.zig b/src/api/bind_quit.zig
index 7d236c54bd04..22a246042df3 100644
--- a/src/api/bind_quit.zig
+++ b/src/api/bind_quit.zig
@@ -7,9 +7,9 @@ const utildbg = @import("../util/utildbg.zig");
pub const spec = .{
.name = "bind_quit",
.desc = "Bind a mepolang expression to run on quitting the application.",
- .args = (&[_]types.MepoFnSpecArg{
+ .args = &.{
.{ .tag = .Text, .name = "mepolang_expression", .desc = "Mepolang expression to run" },
- })[0..],
+ },
.execute = execute,
};
diff --git a/src/api/bind_signal.zig b/src/api/bind_signal.zig
index a80033bd5ea0..07eb113b4eb1 100644
--- a/src/api/bind_signal.zig
+++ b/src/api/bind_signal.zig
@@ -8,10 +8,10 @@ const utilsdl = @import("../util/utilsdl.zig");
pub const spec = .{
.name = "bind_signal",
.desc = "Bind a signal to execute a mepolang action.",
- .args = (&[_]types.MepoFnSpecArg{
+ .args = &.{
.{ .tag = .Text, .name = "signal_name", .desc = "Signal name; can be `USR1`, `USR2`, `TERM`, or `INT`" },
.{ .tag = .Text, .name = "mepolang_expression", .desc = "Mepolang expression to run" },
- })[0..],
+ },
.execute = execute,
};
diff --git a/src/api/bind_timer.zig b/src/api/bind_timer.zig
index 7860389f32e7..36a9f521acbd 100644
--- a/src/api/bind_timer.zig
+++ b/src/api/bind_timer.zig
@@ -8,10 +8,10 @@ const utilsdl = @import("../util/utilsdl.zig");
pub const spec = .{
.name = "bind_timer",
.desc = "Bind a timer to execute a mepolang action at the given interval.",
- .args = (&[_]types.MepoFnSpecArg{
+ .args = &.{
.{ .tag = .Number, .name = "interval_seconds", .desc = "Number of seconds between successive runs of given mepolang expression" },
.{ .tag = .Text, .name = "mepolang_expression", .desc = "Mepolang expression to run" },
- })[0..],
+ },
.execute = execute,
};
diff --git a/src/api/cache_dlbbox.zig b/src/api/cache_dlbbox.zig
index b2478dc48d27..474f56c22bff 100644
--- a/src/api/cache_dlbbox.zig
+++ b/src/api/cache_dlbbox.zig
@@ -9,14 +9,14 @@ const config = @import("../config.zig");
pub const spec = .{
.name = "cache_dlbbox",
.desc = "Queue tiles for a bounding box to download to the cache in the background for the given zoom levels. Writes directly to filesystem cache (path determined by `tile_cache_dir` preference) as tiles are downloaded.",
- .args = (&[_]types.MepoFnSpecArg{
+ .args = &.{
.{ .tag = .Number, .name = "a_lat", .desc = "Starting latitude" },
.{ .tag = .Number, .name = "a_lon", .desc = "Starting longitude" },
.{ .tag = .Number, .name = "b_lat", .desc = "Ending latitude" },
.{ .tag = .Number, .name = "b_lon", .desc = "Ending longitude" },
.{ .tag = .Number, .name = "zoom_min", .desc = "Minimum zoom level" },
.{ .tag = .Number, .name = "zoom_max", .desc = "Maximum zoom level" },
- })[0..],
+ },
.execute = execute,
};
diff --git a/src/api/cache_dlradius.zig b/src/api/cache_dlradius.zig
index 47f498474dbf..990e4e349d91 100644
--- a/src/api/cache_dlradius.zig
+++ b/src/api/cache_dlradius.zig
@@ -9,13 +9,13 @@ const config = @import("../config.zig");
pub const spec = .{
.name = "cache_dlradius",
.desc = "Queue tiles for a bounding box to download to the cache in the background for the given zoom levels. Writes directly to filesystem cache (path determined by `tile_cache_dir` preference) as tiles are downloaded.",
- .args = (&[_]types.MepoFnSpecArg{
+ .args = &.{
.{ .tag = .Number, .name = "lat", .desc = "Centerpoint latitude" },
.{ .tag = .Number, .name = "lon", .desc = "Centerpoint longitude" },
.{ .tag = .Number, .name = "zoom_min", .desc = "Minimum zoom level" },
.{ .tag = .Number, .name = "zoom_max", .desc = "Maximum zoom level" },
.{ .tag = .Number, .name = "km_radius", .desc = "Radius from centerpoint in kilometers to download tiles for" },
- })[0..],
+ },
.execute = execute,
};
diff --git a/src/api/cache_queueclear.zig b/src/api/cache_queueclear.zig
index 300c60c64463..661406e45351 100644
--- a/src/api/cache_queueclear.zig
+++ b/src/api/cache_queueclear.zig
@@ -8,7 +8,7 @@ const config = @import("../config.zig");
pub const spec = .{
.name = "cache_queueclear",
.desc = "Clear any queued background downloading process queued with `cache_dlbbox` or `cache_dlradius`. Note this does not remove filesystem tiles, but simply stops in-progress downloading.",
- .args = (&[_]types.MepoFnSpecArg{})[0..],
+ .args = &.{},
.execute = execute,
};
diff --git a/src/api/center_on_mouse.zig b/src/api/center_on_mouse.zig
index 4c41097a57ad..4df40fe506ab 100644
--- a/src/api/center_on_mouse.zig
+++ b/src/api/center_on_mouse.zig
@@ -7,7 +7,7 @@ const p = @import("../util/utilprefs.zig");
pub const spec = .{
.name = "center_on_mouse",
.desc = "Center the map on the current position of the mouse.",
- .args = (&[_]types.MepoFnSpecArg{})[0..],
+ .args = &.{},
.execute = execute,
};
diff --git a/src/api/center_on_pin.zig b/src/api/center_on_pin.zig
index 980c1a5cf9a4..e69302ef678d 100644
--- a/src/api/center_on_pin.zig
+++ b/src/api/center_on_pin.zig
@@ -6,7 +6,7 @@ const p = @import("../util/utilprefs.zig");
pub const spec = .{
.name = "center_on_pin",
.desc = "Center the map on the currently active pin.",
- .args = (&[_]types.MepoFnSpecArg{})[0..],
+ .args = &.{},
.execute = execute,
};
diff --git a/src/api/clipcopy.zig b/src/api/clipcopy.zig
index c2e221aac63f..99182f11f7f3 100644
--- a/src/api/clipcopy.zig
+++ b/src/api/clipcopy.zig
@@ -9,7 +9,7 @@ const p = @import("../util/utilprefs.zig");
pub const spec = .{
.name = "clipcopy",
.desc = "Copy the current map coordinates to the clipboard; will be in format: `lat lon`.",
- .args = (&[_]types.MepoFnSpecArg{})[0..],
+ .args = &.{},
.execute = execute,
};
diff --git a/src/api/clippaste.zig b/src/api/clippaste.zig
index ea1c58e83cec..ad64bb474876 100644
--- a/src/api/clippaste.zig
+++ b/src/api/clippaste.zig
@@ -9,7 +9,7 @@ const p = @import("../util/utilprefs.zig");
pub const spec = .{
.name = "clippaste",
.desc = "Extract clipboard contents and either center on coordinate (if clipboard content matches `lat lon` format); otherwise run clipboard contents as a mepolang expression.",
- .args = (&[_]types.MepoFnSpecArg{})[0..],
+ .args = &.{},
.execute = execute,
};
diff --git a/src/api/filedump.zig b/src/api/filedump.zig
index 38adbb0087f1..e98cd311ba36 100644
--- a/src/api/filedump.zig
+++ b/src/api/filedump.zig
@@ -10,10 +10,10 @@ const utilprefs = @import("../util/utilprefs.zig");
pub const spec = .{
.name = "filedump",
.desc = "Save the current state of pins, preference, and/or bindings to a file as mepolang.",
- .args = (&[_]types.MepoFnSpecArg{
+ .args = &.{
.{ .tag = .Text, .name = "datatypes", .desc = "Types of data to save (`p` = pins, `r` = preferences, `b` = bindings); ex. `pr` would save both pins and preferences but not bindings" },
.{ .tag = .Text, .name = "filepath", .desc = "Path to file to save state to" },
- })[0..],
+ },
.execute = execute,
};
diff --git a/src/api/fileload.zig b/src/api/fileload.zig
index 699a446e5595..31abb94681fc 100644
--- a/src/api/fileload.zig
+++ b/src/api/fileload.zig
@@ -6,9 +6,9 @@ const utilfile = @import("../util/utilfile.zig");
pub const spec = .{
.name = "fileload",
.desc = "Load mepolang from an arbitrary filesystem file.",
- .args = (&[_]types.MepoFnSpecArg{
+ .args = &.{
.{ .tag = .Text, .name = "filepath", .desc = "Path to file to load" },
- })[0..],
+ },
.execute = execute,
};
diff --git a/src/api/move_relative.zig b/src/api/move_relative.zig
index d7522d2382b7..c5be4f6dc537 100644
--- a/src/api/move_relative.zig
+++ b/src/api/move_relative.zig
@@ -5,10 +5,10 @@ const std = @import("std");
pub const spec = .{
.name = "move_relative",
.desc = "Move the map by a relative x/y amount.",
- .args = (&[_]types.MepoFnSpecArg{
+ .args = &.{
.{ .tag = .Number, .name = "rel_x", .desc = "Relative x amount" },
.{ .tag = .Number, .name = "rel_y", .desc = "Relative y amount" },
- })[0..],
+ },
.execute = execute,
};
diff --git a/src/api/pin_activate.zig b/src/api/pin_activate.zig
index 8ea5cadc0f9f..c2a582d21c10 100644
--- a/src/api/pin_activate.zig
+++ b/src/api/pin_activate.zig
@@ -5,10 +5,10 @@ const std = @import("std");
pub const spec = .{
.name = "pin_activate",
.desc = "Activate a pin by its handle.",
- .args = (&[_]types.MepoFnSpecArg{
+ .args = &.{
.{ .tag = .Number, .name = "group_number", .desc = "Group number" },
.{ .tag = .Text, .name = "pin_handle", .desc = "Pin's handle to activate" },
- })[0..],
+ },
.execute = execute,
};
diff --git a/src/api/pin_add.zig b/src/api/pin_add.zig
index b3517f90ddd4..60e5a8d1b8d2 100644
--- a/src/api/pin_add.zig
+++ b/src/api/pin_add.zig
@@ -5,13 +5,13 @@ const std = @import("std");
pub const spec = .{
.name = "pin_add",
.desc = "Add a pin to the map.",
- .args = (&[_]types.MepoFnSpecArg{
+ .args = &.{
.{ .tag = .Number, .name = "group_number", .desc = "Group number" },
.{ .tag = .Number, .name = "is_structural", .desc = "If set to `1`, will be a 'structural' pin which is useful for curved paths and similar" },
.{ .tag = .Number, .name = "lat", .desc = "Latitude" },
.{ .tag = .Number, .name = "lon", .desc = "Longitude" },
.{ .tag = .Text, .name = "handle", .desc = "*Unique* handle to refer to pin; can use this handle subsequently with `pin_meta` to update pin metadata" },
- })[0..],
+ },
.execute = execute,
};
diff --git a/src/api/pin_cycle.zig b/src/api/pin_cycle.zig
index fdd33cfe2ced..24ff857a1717 100644
--- a/src/api/pin_cycle.zig
+++ b/src/api/pin_cycle.zig
@@ -6,10 +6,10 @@ const p = @import("../util/utilprefs.zig");
pub const spec = .{
.name = "pin_cycle",
.desc = "Cycle the currently focused pin group pin.",
- .args = (&[_]types.MepoFnSpecArg{
+ .args = &.{
.{ .tag = .Number, .name = "viewport_only", .desc = "Use `1` to only cycle between pins in viewport" },
.{ .tag = .Number, .name = "delta", .desc = "Delta amount (positive or negative) for number of pins to skip" },
- })[0..],
+ },
.execute = execute,
};
diff --git a/src/api/pin_deactivate.zig b/src/api/pin_deactivate.zig
index 8e4dba376bdb..b20567d00c67 100644
--- a/src/api/pin_deactivate.zig
+++ b/src/api/pin_deactivate.zig
@@ -5,7 +5,7 @@ const std = @import("std");
pub const spec = .{
.name = "pin_deactivate",
.desc = "Deactivate currently active pin.",
- .args = (&[_]types.MepoFnSpecArg{})[0..],
+ .args = &.{},
.execute = execute,
};
diff --git a/src/api/pin_delete.zig b/src/api/pin_delete.zig
index 429cb4ef4c3d..f4b33e36cf25 100644
--- a/src/api/pin_delete.zig
+++ b/src/api/pin_delete.zig
@@ -5,10 +5,10 @@ const std = @import("std");
pub const spec = .{
.name = "pin_delete",
.desc = "Delete a pin by its handle.",
- .args = (&[_]types.MepoFnSpecArg{
+ .args = &.{
.{ .tag = .Number, .name = "group_number", .desc = "Group number or `-1` to use the current pin group." },
.{ .tag = .Text, .name = "pin_handle", .desc = "Pin's handle to delete, or empty string `[]` to use the current pin handle" },
- })[0..],
+ },
.execute = execute,
};
diff --git a/src/api/pin_groupactivate.zig b/src/api/pin_groupactivate.zig
index 6c2930e07b9e..04f2a8a74102 100644
--- a/src/api/pin_groupactivate.zig
+++ b/src/api/pin_groupactivate.zig
@@ -6,9 +6,9 @@ const pin_cycle = @import("pin_cycle.zig").pin_cycle;
pub const spec = .{
.name = "pin_groupactivate",
.desc = "Activate the pin group specified.",
- .args = (&[_]types.MepoFnSpecArg{
+ .args = &.{
.{ .tag = .Number, .name = "group_number", .desc = "Group number" },
- })[0..],
+ },
.execute = execute,
};
diff --git a/src/api/pin_meta.zig b/src/api/pin_meta.zig
index dbbae145f4ca..cc9288a654e1 100644
--- a/src/api/pin_meta.zig
+++ b/src/api/pin_meta.zig
@@ -5,12 +5,12 @@ const std = @import("std");
pub const spec = .{
.name = "pin_meta",
.desc = "Update a pin's metadata.",
- .args = (&[_]types.MepoFnSpecArg{
+ .args = &.{
.{ .tag = .Number, .name = "group_number", .desc = "Group number" },
.{ .tag = .Text, .name = "pin_handle", .desc = "Pin handle" },
.{ .tag = .Text, .name = "key", .desc = "Metadata key to update" },
.{ .tag = .Text, .name = "value", .desc = "New value for metadata key" },
- })[0..],
+ },
.execute = execute,
};
diff --git a/src/api/pin_purge.zig b/src/api/pin_purge.zig
index e1ba4106c221..4c9464a5ddc1 100644
--- a/src/api/pin_purge.zig
+++ b/src/api/pin_purge.zig
@@ -5,7 +5,7 @@ const std = @import("std");
pub const spec = .{
.name = "pin_purge",
.desc = "Purge all pins in the currently active pin group.",
- .args = (&[_]types.MepoFnSpecArg{})[0..],
+ .args = &.{},
.execute = execute,
};
diff --git a/src/api/pin_transfer.zig b/src/api/pin_transfer.zig
index aa05f16df212..9308e47366eb 100644
--- a/src/api/pin_transfer.zig
+++ b/src/api/pin_transfer.zig
@@ -5,11 +5,11 @@ const std = @import("std");
pub const spec = .{
.name = "pin_transfer",
.desc = "Transfer a pin from one group to another.",
- .args = (&[_]types.MepoFnSpecArg{
+ .args = &.{
.{ .tag = .Number, .name = "from_group_number", .desc = "Group number, or `-1` for the current group number." },
.{ .tag = .Text, .name = "pin_handle", .desc = "Handle of the pin to transfer; or empty string `[]` will transfer the current pin. Use the string `all` for all pins in group." },
.{ .tag = .Number, .name = "to_group_number", .desc = "Group number" },
- })[0..],
+ },
.execute = execute,
};
diff --git a/src/api/prefinc.zig b/src/api/prefinc.zig
index c1947c998f6f..338ca4d84a73 100644
--- a/src/api/prefinc.zig
+++ b/src/api/prefinc.zig
@@ -7,10 +7,10 @@ const p = @import("../util/utilprefs.zig");
pub const spec = .{
.name = "prefinc",
.desc = "Increase or decrease a preference by the given delta value.",
- .args = (&[_]types.MepoFnSpecArg{
+ .args = &.{
.{ .tag = .Text, .name = "prefname", .desc = "Preference name" },
.{ .tag = .Number, .name = "delta", .desc = "Delta value to increment/decrement (positive or negative)" },
- })[0..],
+ },
.execute = execute,
};
diff --git a/src/api/prefset_n.zig b/src/api/prefset_n.zig
index 376abe98adb0..6c7eb71b2f29 100644
--- a/src/api/prefset_n.zig
+++ b/src/api/prefset_n.zig
@@ -7,10 +7,10 @@ const p = @import("../util/utilprefs.zig");
pub const spec = .{
.name = "prefset_n",
.desc = "Set a preference number value.",
- .args = (&[_]types.MepoFnSpecArg{
+ .args = &.{
.{ .tag = .Text, .name = "prefname", .desc = "Preference name" },
.{ .tag = .Number, .name = "prefvalue", .desc = "Preference number value" },
- })[0..],
+ },
.execute = execute,
};
diff --git a/src/api/prefset_t.zig b/src/api/prefset_t.zig
index ac599323de93..8c94791c0b4f 100644
--- a/src/api/prefset_t.zig
+++ b/src/api/prefset_t.zig
@@ -7,10 +7,10 @@ const p = @import("../util/utilprefs.zig");
pub const spec = .{
.name = "prefset_t",
.desc = "Set a preference text value.",
- .args = (&[_]types.MepoFnSpecArg{
+ .args = &.{
.{ .tag = .Text, .name = "prefname", .desc = "Preference name" },
.{ .tag = .Text, .name = "prefvalue", .desc = "Preference number value" },
- })[0..],
+ },
.execute = execute,
};
diff --git a/src/api/preftoggle.zig b/src/api/preftoggle.zig
index b7c2a090acc9..2eaf57dd775b 100644
--- a/src/api/preftoggle.zig
+++ b/src/api/preftoggle.zig
@@ -7,9 +7,9 @@ const p = @import("../util/utilprefs.zig");
pub const spec = .{
.name = "preftoggle",
.desc = "Toggle a boolean number preference between `1` and `0`.",
- .args = (&[_]types.MepoFnSpecArg{
+ .args = &.{
.{ .tag = .Text, .name = "prefname", .desc = "Preference name" },
- })[0..],
+ },
.execute = execute,
};
diff --git a/src/api/quit.zig b/src/api/quit.zig
index 09cc88e8fa11..2ae97cc90f92 100644
--- a/src/api/quit.zig
+++ b/src/api/quit.zig
@@ -5,7 +5,7 @@ const std = @import("std");
pub const spec = .{
.name = "quit",
.desc = "Quit the application.",
- .args = (&[_]types.MepoFnSpecArg{})[0..],
+ .args = &.{},
.execute = execute,
};
diff --git a/src/api/shellpipe_async.zig b/src/api/shellpipe_async.zig
index 63c919a0caeb..730ea3631933 100644
--- a/src/api/shellpipe_async.zig
+++ b/src/api/shellpipe_async.zig
@@ -18,10 +18,10 @@ const AsyncShellpipeRequest = struct {
pub const spec = .{
.name = "shellpipe_async",
.desc = "Run a system (shell) command and pipe asynchronously; STDOUT returned from command will be executed back as a mepolang expression.",
- .args = (&[_]types.MepoFnSpecArg{
+ .args = &.{
.{ .tag = .Number, .name = "unique_handle_id", .desc = "Optional id to deduplicate individual async shellpipe requests" },
.{ .tag = .Text, .name = "shell_statement", .desc = "Shell statement to execute" },
- })[0..],
+ },
.execute = execute,
};
diff --git a/src/api/shellpipe_sync.zig b/src/api/shellpipe_sync.zig
index 71051fdd103a..133b8c7b55d9 100644
--- a/src/api/shellpipe_sync.zig
+++ b/src/api/shellpipe_sync.zig
@@ -11,9 +11,9 @@ const sdl = @import("../sdlshim.zig");
pub const spec = .{
.name = "shellpipe_sync",
.desc = "Run a system (shell) command synchronously and pipe; STDOUT returned from command will be executed back as a mepolang expression.",
- .args = (&[_]types.MepoFnSpecArg{
+ .args = &.{
.{ .tag = .Text, .name = "shell_statement", .desc = "Shell statement to execute" },
- })[0..],
+ },
.execute = execute,
};
diff --git a/src/api/zoom_relative.zig b/src/api/zoom_relative.zig
index 79d655ca92c7..9319d6334ac7 100644
--- a/src/api/zoom_relative.zig
+++ b/src/api/zoom_relative.zig
@@ -6,9 +6,9 @@ const p = @import("../util/utilprefs.zig");
pub const spec = .{
.name = "zoom_relative",
.desc = "Update the map's zoom level by a relative delta.",
- .args = (&[_]types.MepoFnSpecArg{
+ .args = &.{
.{ .tag = .Number, .name = "zoom_delta", .desc = "Zoom level relative delta" },
- })[0..],
+ },
.execute = execute,
};
--
2.41.0