Skip to content

Commit ad63e75

Browse files
committed
bash: Change to primary git worktree via cw (no args)
1 parent 04d77cc commit ad63e75

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

dotfiles/bash/aliases

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,11 @@ popd() {
6363

6464
# Change worktree to another suffix
6565
cw() {
66+
if [[ -z "$@" ]]
67+
then
68+
cd "${PWD%.*}"
69+
return
70+
fi
6671
cd "${PWD%.*}.$@"
6772
}
6873

0 commit comments

Comments
 (0)