`wt config show` flags any line in `~.zshrc` containing `alias`, then `/`, then `wt`
Hello,
wt config show seems to find any line in ~/.zshrc starting with alias and containing a / followed by the letters wt and flags them as related to worktrunk's config.
If you have an alias like this in ~/.zshrc:
alias gravity=/path/to/newton.bin
# 1^ 2^ 3^^
- starts with
alias - contains a
/ - contains
wtafter the/
then running wt config show prints a warning and suggests a change:
▲ Alias gravity bypasses shell integration — won't auto-cd
alias gravity=/path/to/newton.bin
↳ Change to alias gravity="wt" @ ~/.zshrc:153
The line is not relevant, and the suggestion is incorrect.
All 3 conditions are required, i.e. alias weld=blowtorch start does not get flagged, but alias weld=/blowtorch start does.
This happens with wt version 0.33.0, the latest release at this time.
Thanks for reporting this! I was able to reproduce the issue and identified the root cause: detect_bypass_alias() used a substring match (target.contains("wt")) on the full alias target path, so any path containing "wt" as part of another word (like "newton") triggered a false positive.
I've opened #1773 with a fix that extracts the filename component from the path and matches it exactly instead. A maintainer will review it shortly.
thanks @nicolasff !
Thanks for the quick fix @max-sixty!