From 2074c748cb8e6526212fd292fa968b735465691d Mon Sep 17 00:00:00 2001 From: Oliver Davies <oliver@oliverdavies.dev> Date: Tue, 16 Apr 2024 13:00:00 +0100 Subject: [PATCH] Create new sessions using `bin/t` --- lib/shared/modules/zsh.nix | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/shared/modules/zsh.nix b/lib/shared/modules/zsh.nix index bf8b3ea4..93ee422a 100644 --- a/lib/shared/modules/zsh.nix +++ b/lib/shared/modules/zsh.nix @@ -29,14 +29,15 @@ user_path="''${HOME}/Code/github.com/''${user}" user_repo_path="''${user_path}/''${repo_name}" - [[ -d "''${user_repo_path}" ]] && cd "''${user_repo_path}" && return + [[ -d "''${user_repo_path}" ]] && t "''${user_repo_path}" && return ${pkgs.coreutils}/bin/mkdir -p "''${user_path}" - cd "''${user_path}" + pushd "''${user_path}" ${pkgs.git}/bin/git clone "''${repo_url}" "''${repo_name}" - # TODO: create a new tmux session with `bin/t`? + popd + t "''${user_repo_path}" } # Plugins