Skip to content

Commit

Permalink
fix(git-wt): rename wt script to git-wt
Browse files Browse the repository at this point in the history
This change was made so that 'command wt' is not required. This
separates the script from the wrapping eval script.
  • Loading branch information
EdenEast committed Nov 22, 2023
1 parent 89978f8 commit 4612081
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions bin/wt → bin/git-wt
Original file line number Diff line number Diff line change
Expand Up @@ -428,18 +428,18 @@ EOF
cat <<EOF
function wt() {
if [[ "\$1" =~ ^\(switch\|s\)\$ ]]; then
SCRIPT="\$(command wt \$@)"
SCRIPT="\$(git-wt \$@)"
[ \$? -eq 0 ] && eval "\$SCRIPT" || printf "\$SCRIPT"
else
command wt \$@
git-wt \$@
fi
}
# =============================================================================
#
# To initialize wt, add this to your configuration (usually ~/.bashrc):
#
# [ -x "\$(command -v wt)" ] && eval "\$(wt source)"
# [ -x "\$(command -v git-wt)" ] && eval "\$(git-wt source)"
EOF
}

Expand Down
2 changes: 1 addition & 1 deletion config/.config/shell/bash/002-application-settings.bash
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ if [ "$(command -v zoxide)" ]; then
eval "$(zoxide init bash)"
fi

eval "$(wt source)"
eval "$(git-wt source)"
2 changes: 1 addition & 1 deletion config/.config/shell/zsh/002-application-settings.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ if [ "$(command -v zoxide)" ]; then
eval "$(zoxide init zsh)"
fi

eval "$(wt source)"
eval "$(git-wt source)"

0 comments on commit 4612081

Please sign in to comment.