Skip to content

Commit e4a072d

Browse files
committed
feat: allow shell-command to be given as multiple arguments
1 parent df6774b commit e4a072d

4 files changed

Lines changed: 509616 additions & 494374 deletions

File tree

grammar.js

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ module.exports = grammar({
1717
[$.new_window_directive],
1818
[$.refresh_client_directive],
1919
[$.resize_pane_directive],
20+
[$.respawn_pane_directive],
21+
[$.respawn_window_directive],
2022
[$.server_access_directive],
2123
[$.set_environment_directive],
2224
[$.set_option_directive],
@@ -530,7 +532,7 @@ module.exports = grammar({
530532
$._width,
531533
$._height,
532534
),
533-
optional($._shell),
535+
optional($._shell_rest),
534536
),
535537
new_window_directive: ($) =>
536538
command(
@@ -544,7 +546,7 @@ module.exports = grammar({
544546
$._window_name,
545547
$._target_window,
546548
),
547-
optional($._shell),
549+
optional($._shell_rest),
548550
),
549551
next_layout_directive: ($) =>
550552
command($, choice("next-layout", "nextl"), cmdOpts($._target_window)),
@@ -638,7 +640,7 @@ module.exports = grammar({
638640
$._environment,
639641
$._target_pane,
640642
),
641-
$._shell,
643+
optional($._shell_rest),
642644
),
643645
respawn_window_directive: ($) =>
644646
command(
@@ -650,7 +652,7 @@ module.exports = grammar({
650652
$._environment,
651653
$._target_pane,
652654
),
653-
$._shell,
655+
optional($._shell_rest),
654656
),
655657
rotate_window_directive: ($) =>
656658
command(
@@ -837,7 +839,7 @@ module.exports = grammar({
837839
$._target_pane,
838840
$._format,
839841
),
840-
optional($._shell),
842+
optional($._shell_rest),
841843
),
842844
start_server_directive: ($) => command($, choice("start-server", "start")),
843845
suspend_client_directive: ($) =>
@@ -953,6 +955,7 @@ module.exports = grammar({
953955
block: ($) => seq("{", commands($), "}"),
954956
block_immediate: ($) => seq(token.immediate("{"), commands($), "}"),
955957
_shell: ($) => $._string,
958+
_shell_rest: ($) => repeat1($._string),
956959
_tmux: ($) =>
957960
choice(
958961
$.backslash_escape,

src/grammar.json

Lines changed: 36 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)