fish: rename repo path variables

This commit is contained in:
Primrose 2024-11-15 17:56:07 +01:00
parent acfc46aeb5
commit d49561657e
Signed by: primrose
GPG key ID: 4E887A4CA9714ADA
7 changed files with 19 additions and 22 deletions

View file

@ -18,8 +18,8 @@
home = {
sessionVariables = lib.mapAttrs (_: path: "${config.home.homeDirectory}/${path}") {
REPOS_PATH = "repos";
UNIV_REPOS_PATH = "univ-repos";
REPO_PATH = "repo";
UNIV_REPO_PATH = "univ-repo";
PLAYGROUND_PATH = "playground";
WORKTREE_PATH = "worktree";
};

View file

@ -7,7 +7,7 @@ function clone_to_repos
set name_repo (echo $argv | sed -E 's/.*[:\\/]([^\\/]+)\\/([^\\/]+?)(:?\\.git)$/\1 \2/')
set name (echo $name_repo | cut -d ' ' -f1)
set repo (echo $name_repo | cut -d ' ' -f2)
mkdir -p $REPOS_PATH/$name
git clone $argv $REPOS_PATH/$name/$repo
mkdir -p $REPO_PATH/$name
git clone $argv $REPO_PATH/$name/$repo
end

View file

@ -3,7 +3,7 @@ function tmux_sessionizer \
set selected \
(begin
fd . $REPOS_PATH $UNIV_REPOS_PATH --exact-depth 2 --type d
fd . $REPO_PATH $UNIV_REPO_PATH --exact-depth 2 --type d
fd . $WORKTREE_PATH --exact-depth 1 --type d
fd . $PLAYGROUND_PATH --exact-depth 1 --type d
# Special mode to create a playground