diff --git a/README.md b/README.md index 900bc35..980a9e8 100644 --- a/README.md +++ b/README.md @@ -152,8 +152,8 @@ editor_command = "vi {file}" [worktree] relative_worktree_path = "./.worktrees" split_regex = "," -# One of: "", "cd", "create_panes", "create_panes_floating". -post_create_action = "" +# One of: "none", "cd", "create_panes", "create_panes_floating". +post_create_action = "none" [env.override] ZELLIJ_SESSION_NAME = "" @@ -193,9 +193,9 @@ paste = "CTRL+SHIFT+V" - `Alt+s`: open the active pane scrollback in `$EDITOR` - `Alt+w`: edit one or more worktree names, split by `worktree.split_regex`, then run `git worktree add /` for each name from the previously focused - pane's working directory. `worktree.post_create_action` can then `cd` the previously active pane - to the last created worktree, create one tiled pane per worktree with `create_panes`, or create - one floating pane per worktree with `create_panes_floating`. + pane's working directory. `worktree.post_create_action` can then do nothing with `none`, `cd` the + previously active pane to the last created worktree, create one tiled pane per worktree with + `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 - `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 diff --git a/config.example.toml b/config.example.toml index b5313c1..72c2e90 100644 --- a/config.example.toml +++ b/config.example.toml @@ -22,8 +22,8 @@ editor_command = "vi {file}" [worktree] relative_worktree_path = "./.worktrees" split_regex = "," -# One of: "", "cd", "create_panes", "create_panes_floating". -post_create_action = "" +# One of: "none", "cd", "create_panes", "create_panes_floating". +post_create_action = "none" [env.override] ZELLIJ_SESSION_NAME = "" diff --git a/src/main/java/com/gregor/jprototerm/AppConfig.java b/src/main/java/com/gregor/jprototerm/AppConfig.java index a60606a..93163c2 100644 --- a/src/main/java/com/gregor/jprototerm/AppConfig.java +++ b/src/main/java/com/gregor/jprototerm/AppConfig.java @@ -105,7 +105,7 @@ public record AppConfig( defaultScrollbackEditorCommand(), "./.worktrees", ",", - "", + "none", "SIGTERM", Map.of(), Map.ofEntries( diff --git a/src/main/java/com/gregor/jprototerm/TerminalWindow.java b/src/main/java/com/gregor/jprototerm/TerminalWindow.java index f799420..9836079 100644 --- a/src/main/java/com/gregor/jprototerm/TerminalWindow.java +++ b/src/main/java/com/gregor/jprototerm/TerminalWindow.java @@ -375,6 +375,7 @@ final class TerminalWindow { } switch (action.trim().toLowerCase(Locale.ROOT)) { + case "none" -> { } case "cd" -> lastActivePane.send("cd " + shellQuote(worktreePaths.get(worktreePaths.size() - 1)) + "\r"); case "create_panes" -> worktreePaths.forEach(compositor::createTiledPane); case "create_panes_floating" -> worktreePaths.forEach(compositor::createFloatingPaneInDirectory);