Unverified Commit 2e5a764e authored by Leona Maroni's avatar Leona Maroni Committed by GitHub
Browse files

git-worktree-switcher: init at 0.2.4 (#355484)

parents e9eff470 3318aa52
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -10519,6 +10519,18 @@
    githubId = 1476865;
    name = "jigglycrumb";
  };
  jiriks74 = {
    name = "Jiří Štefka";
    email = "jiri@stefka.eu";
    github = "jiriks74";
    githubId = 54378412;
    matrix = "@jiriks74:matrix.org";
    keys = [
      {
        fingerprint = "563AC7887FD6414714A6ACAC1D5E30D3DB2264DE";
      }
    ];
  };
  jirkamarsik = {
    email = "jiri.marsik89@gmail.com";
    github = "jirkamarsik";
+2 −0
Original line number Diff line number Diff line
@@ -34,6 +34,8 @@

- [KanBoard](https://github.com/kanboard/kanboard), a project management tool that focuses on the Kanban methodology. Available as [services.kanboard](#opt-services.kanboard.enable).

- [git-worktree-switcher](https://github.com/mateusauler/git-worktree-switcher), switch between git worktrees with speed. Available as [programs.git-worktree-switcher](#opt-programs.git-worktree-switcher.enable)

<!-- To avoid merge conflicts, consider adding your item at an arbitrary place in the list instead. -->

## Backward Incompatibilities {#sec-release-25.05-incompatibilities}
+1 −0
Original line number Diff line number Diff line
@@ -207,6 +207,7 @@
  ./programs/gdk-pixbuf.nix
  ./programs/geary.nix
  ./programs/git.nix
  ./programs/git-worktree-switcher.nix
  ./programs/gnome-disks.nix
  ./programs/gnome-terminal.nix
  ./programs/gnupg.nix
+40 −0
Original line number Diff line number Diff line
{
  config,
  pkgs,
  lib,
  ...
}:

let
  cfg = config.programs.git-worktree-switcher;

  initScript =
    shell:
    if (shell == "fish") then
      ''
        ${lib.getExe pkgs.git-worktree-switcher} init ${shell} | source
      ''
    else
      ''
        eval "$(${lib.getExe pkgs.git-worktree-switcher} init ${shell})"
      '';
in
{
  options = {
    programs.git-worktree-switcher = {
      enable = lib.mkEnableOption "git-worktree-switcher, switch between git worktrees with speed.";
    };
  };

  config = lib.mkIf cfg.enable {
    environment.systemPackages = with pkgs; [ git-worktree-switcher ];

    programs.bash.interactiveShellInit = initScript "bash";
    programs.zsh.interactiveShellInit = lib.optionalString config.programs.zsh.enable (
      initScript "zsh"
    );
    programs.fish.interactiveShellInit = lib.optionalString config.programs.fish.enable (
      initScript "fish"
    );
  };
}
+30 −0
Original line number Diff line number Diff line
diff --git a/wt b/wt
index 60999f2..5687822 100755
--- a/wt
+++ b/wt
@@ -27,7 +27,6 @@ help_message() {
 	echo -e "\twt: go to the main worktree"
 	echo -e "\twt <worktree-name>: search for worktree names and change to that directory."
 	echo -e "\twt names: list out only the git worktree names."
-	echo -e "\twt update: update to the latest release of worktree switcher."
 	echo -e "\twt version: show the CLI version."
 	echo -e "\twt init <shell>: print the init script for <shell>."
 	echo -e "\twt help: shows this help message."
@@ -163,9 +162,6 @@ case "${args[0]}" in
 names)
 	worktree_list_names
 	;;
-update)
-	update
-	;;
 help)
 	help_message
 	;;
@@ -176,7 +172,6 @@ init)
 	init
 	;;
 *)
-	auto_check_update
 	directory=$(git worktree list --porcelain 2> /dev/null | sed -n '/'"${arg:-.}"'/{s/^worktree\s*//p;q}')
 	;;
 esac
Loading