@jswork/ushell-module-git 1.0.66 → 1.0.67

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.
Files changed (2) hide show
  1. package/modules/16-wt.sh +6 -3
  2. package/package.json +1 -1
package/modules/16-wt.sh CHANGED
@@ -6,6 +6,9 @@
6
6
  # Check if wt binary exists
7
7
  if command -v wt >/dev/null 2>&1; then
8
8
 
9
+ # Find the actual wt binary path
10
+ WT_BIN=$(command -v wt)
11
+
9
12
  # 🚀 wt function for true directory switching
10
13
  # This function overrides the wt binary to support real directory switching
11
14
  wt() {
@@ -13,7 +16,7 @@ if command -v wt >/dev/null 2>&1; then
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,8 +32,8 @@ 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
  }
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.67",
4
4
  "description": "Unix like shell module for git.",
5
5
  "main": "index.sh",
6
6
  "repository": {