tangled
alpha
login
or
join now
seth.computer
/
dotfiles
0
fork
atom
this repo has no description
0
fork
atom
overview
issues
pulls
pipelines
zsh: worktree shortcuts
seth.computer
1 month ago
d9422050
b708b777
verified
This commit was signed with the committer's
known signature
.
seth.computer
SSH Key Fingerprint:
SHA256:utUtG8j2hgvZ0Rnm/rPJiqFu4NT5bjOnC26AUIBh500=
+15
1 changed file
expand all
collapse all
unified
split
zsh
zshenv
+15
zsh/zshenv
···
4
4
5
5
export DOTFILES_DIR=$HOME/dotfiles
6
6
7
7
+
export TASKS_DIR=$HOME/projects/.tasks
8
8
+
7
9
export EDITOR=vim
8
10
export BAT_THEME="ansi"
9
11
export DELTA_FEATURES="+side-by-side +line-numbers"
···
30
32
alias gb="git branch"
31
33
alias gfp="git fetch --prune"
32
34
alias gsw="git switch"
35
35
+
33
36
alias wtl="git worktree list"
34
37
alias wtp="git worktree prune"
38
38
+
39
39
+
function wt {
40
40
+
task=${1-"task-$(date +%s)"}
41
41
+
base_branch=${2-$(git branch --show-current)}
42
42
+
repo_folder=$(basename $(pwd))
43
43
+
44
44
+
task_dir=$TASKS_DIR/$task
45
45
+
mkdir -p $task_dir
46
46
+
47
47
+
git worktree add $task_dir/$repo_folder $base_branch
48
48
+
cd $task_dir/$repo_folder
49
49
+
}
35
50
36
51
alias lg="lazygit"
37
52
alias ld="lazydocker"