post create none action
This commit is contained in:
10
README.md
10
README.md
@@ -152,8 +152,8 @@ editor_command = "vi {file}"
|
|||||||
[worktree]
|
[worktree]
|
||||||
relative_worktree_path = "./.worktrees"
|
relative_worktree_path = "./.worktrees"
|
||||||
split_regex = ","
|
split_regex = ","
|
||||||
# One of: "", "cd", "create_panes", "create_panes_floating".
|
# One of: "none", "cd", "create_panes", "create_panes_floating".
|
||||||
post_create_action = ""
|
post_create_action = "none"
|
||||||
|
|
||||||
[env.override]
|
[env.override]
|
||||||
ZELLIJ_SESSION_NAME = ""
|
ZELLIJ_SESSION_NAME = ""
|
||||||
@@ -193,9 +193,9 @@ paste = "CTRL+SHIFT+V"
|
|||||||
- `Alt+s`: open the active pane scrollback in `$EDITOR`
|
- `Alt+s`: open the active pane scrollback in `$EDITOR`
|
||||||
- `Alt+w`: edit one or more worktree names, split by `worktree.split_regex`, then run
|
- `Alt+w`: edit one or more worktree names, split by `worktree.split_regex`, then run
|
||||||
`git worktree add <relative_worktree_path>/<name>` for each name from the previously focused
|
`git worktree add <relative_worktree_path>/<name>` for each name from the previously focused
|
||||||
pane's working directory. `worktree.post_create_action` can then `cd` the previously active pane
|
pane's working directory. `worktree.post_create_action` can then do nothing with `none`, `cd` the
|
||||||
to the last created worktree, create one tiled pane per worktree with `create_panes`, or create
|
previously active pane to the last created worktree, create one tiled pane per worktree with
|
||||||
one floating pane per worktree with `create_panes_floating`.
|
`create_panes`, or create one floating pane per worktree with `create_panes_floating`.
|
||||||
- `Alt+y`: enter pane-sync selection mode, commit the selection, or stop an active pane sync
|
- `Alt+y`: enter pane-sync selection mode, commit the selection, or stop an active pane sync
|
||||||
- `Space`: toggle the focused pane in the sync set while pane-sync selection mode is active
|
- `Space`: toggle the focused pane in the sync set while pane-sync selection mode is active
|
||||||
- Once committed, input typed or pasted into any synced pane is mirrored to the other synced panes
|
- Once committed, input typed or pasted into any synced pane is mirrored to the other synced panes
|
||||||
|
|||||||
@@ -22,8 +22,8 @@ editor_command = "vi {file}"
|
|||||||
[worktree]
|
[worktree]
|
||||||
relative_worktree_path = "./.worktrees"
|
relative_worktree_path = "./.worktrees"
|
||||||
split_regex = ","
|
split_regex = ","
|
||||||
# One of: "", "cd", "create_panes", "create_panes_floating".
|
# One of: "none", "cd", "create_panes", "create_panes_floating".
|
||||||
post_create_action = ""
|
post_create_action = "none"
|
||||||
|
|
||||||
[env.override]
|
[env.override]
|
||||||
ZELLIJ_SESSION_NAME = ""
|
ZELLIJ_SESSION_NAME = ""
|
||||||
|
|||||||
@@ -105,7 +105,7 @@ public record AppConfig(
|
|||||||
defaultScrollbackEditorCommand(),
|
defaultScrollbackEditorCommand(),
|
||||||
"./.worktrees",
|
"./.worktrees",
|
||||||
",",
|
",",
|
||||||
"",
|
"none",
|
||||||
"SIGTERM",
|
"SIGTERM",
|
||||||
Map.of(),
|
Map.of(),
|
||||||
Map.ofEntries(
|
Map.ofEntries(
|
||||||
|
|||||||
@@ -375,6 +375,7 @@ final class TerminalWindow {
|
|||||||
}
|
}
|
||||||
|
|
||||||
switch (action.trim().toLowerCase(Locale.ROOT)) {
|
switch (action.trim().toLowerCase(Locale.ROOT)) {
|
||||||
|
case "none" -> { }
|
||||||
case "cd" -> lastActivePane.send("cd " + shellQuote(worktreePaths.get(worktreePaths.size() - 1)) + "\r");
|
case "cd" -> lastActivePane.send("cd " + shellQuote(worktreePaths.get(worktreePaths.size() - 1)) + "\r");
|
||||||
case "create_panes" -> worktreePaths.forEach(compositor::createTiledPane);
|
case "create_panes" -> worktreePaths.forEach(compositor::createTiledPane);
|
||||||
case "create_panes_floating" -> worktreePaths.forEach(compositor::createFloatingPaneInDirectory);
|
case "create_panes_floating" -> worktreePaths.forEach(compositor::createFloatingPaneInDirectory);
|
||||||
|
|||||||
Reference in New Issue
Block a user