@jswork/ushell-module-git 1.0.66 → 1.0.68

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.sh CHANGED
@@ -8,7 +8,7 @@ source $ROOT_PATH/modules/07-git-rebase.sh
8
8
  source $ROOT_PATH/modules/11-lazygit.sh
9
9
  source $ROOT_PATH/modules/14-gr.sh
10
10
  source $ROOT_PATH/modules/15-ignore-file.sh
11
- source $ROOT_PATH/modules/16-wt.sh
11
+ # source $ROOT_PATH/modules/16-wt.sh
12
12
 
13
13
  ## git base:
14
14
  alias gl='git pull'
package/modules/16-wt.sh CHANGED
@@ -1,19 +1,22 @@
1
1
  #!/usr/bin/env bash
2
2
 
3
- # wt CLI - Git Worktree Directory Switching
3
+ # wtt CLI - Git Worktree Directory Switching (wtt = worktree-tool)
4
4
  # https://github.com/yourusername/worktree-cli
5
5
 
6
6
  # Check if wt binary exists
7
7
  if command -v wt >/dev/null 2>&1; then
8
8
 
9
- # 🚀 wt function for true directory switching
10
- # This function overrides the wt binary to support real directory switching
11
- wt() {
9
+ # Find the actual wt binary path
10
+ WT_BIN=$(command -v wt)
11
+
12
+ # 🚀 wtt function for true directory switching
13
+ # wtt (worktree-tool) provides directory switching without conflicting with wt binary
14
+ wtt() {
12
15
  case "$1" in
13
16
  switch|co)
14
17
  # Handle switch/co commands for true directory switching
15
18
  shift
16
- local wt_cli="wt" # Use wt from PATH
19
+ local wt_cli="$WT_BIN" # Use the actual binary path
17
20
 
18
21
  # Get the path from wt switch command
19
22
  local path
@@ -29,21 +32,17 @@ if command -v wt >/dev/null 2>&1; then
29
32
  fi
30
33
  ;;
31
34
  *)
32
- # Pass all other commands to wt binary
33
- wt "$@"
35
+ # Pass all other commands to wt binary (use full path to avoid recursion)
36
+ "$WT_BIN" "$@"
34
37
  ;;
35
38
  esac
36
39
  }
37
40
 
38
- # Convenience alias
39
- alias wtco='wt co' # Quick switch to worktree
40
- alias wtl='wt switch --list' # List all worktrees
41
-
42
41
  else
43
42
  # wt binary not found - show installation message once
44
- if [[ -z "$WT_SHOWN_MISSING" ]]; then
43
+ if [[ -z "$WTT_SHOWN_MISSING" ]]; then
45
44
  echo "⚠️ wt CLI not found in PATH"
46
45
  echo "Install: go build -o wt main.go && sudo mv wt /usr/local/bin/wt"
47
- export WT_SHOWN_MISSING=1
46
+ export WTT_SHOWN_MISSING=1
48
47
  fi
49
48
  fi
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jswork/ushell-module-git",
3
- "version": "1.0.66",
3
+ "version": "1.0.68",
4
4
  "description": "Unix like shell module for git.",
5
5
  "main": "index.sh",
6
6
  "repository": {