Autocomplete not working with aliases #21
-
Checks
Expected behaviourI have aliases like:
I want that autocomplete suggestiions for all above command will be appear. Actual behaviourautocomplete for above aliases not working Steps to reproduceUsing Same EnvironmentCODEWHISPERER-details:
- 0.12.0
hardware-info:
- model:
- model-id:
- chip-id: Apple M1 Pro
- cores: 8
- mem: 16.00 GB
os-info:
- macOS 14.1.0 (23B74)
environment:
- shell: /bin/zsh
- terminal: iterm
- cwd: /Users/lidora
- exe-path: /Users/lidora/.local/bin/cw
- install-method: unknown
- env-vars:
- CWTERM_SESSION_ID: 56c7e4038b3147b697119f79355fcf7a
- CW_SET_PARENT_CHECK: 1
- CW_TERM: 0.12.0
- PATH: /Users/lidora/.krew/bin:/Users/lidora/.asdf/shims:/opt/homebrew/opt/asdf/libexec/bin:/Users/lidora/.krew/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Library/TeX/texbin:/Users/lidora/.local/bin:/Users/lidora/Library/Python/3.10/bin:/Users/lidora/scripts:/Users/lidora/bin:/Users/lidora/Library/Python/3.10/bin:/Users/lidora/scripts:/Users/lidora/bin
- SHELL: /bin/zsh
- TERM: xterm-256color
- __CFBundleIdentifier: com.googlecode.iterm2
- CW_SET_PARENT: 56c7e4038b3147b697119f79355fcf7a |
Beta Was this translation helpful? Give feedback.
Replies: 20 comments 39 replies
-
Weird... @grant0417 any ideas? |
Beta Was this translation helpful? Give feedback.
-
@lidora-everc can you run |
Beta Was this translation helpful? Give feedback.
-
Has this been solved? CW isn't working with my aliases either, even though fig works fine. |
Beta Was this translation helpful? Give feedback.
-
+1 I was about to open this issue as well. For me it's |
Beta Was this translation helpful? Give feedback.
-
If you are having an issue can you try typing in the terminal |
Beta Was this translation helpful? Give feedback.
-
Hi all. As @grant0417 demoed above and you can see again in my screenshot below, we should be picking up all your aliases every time you go to a new line. e.g. I create an alias called "b" and then it's instantly available and showing me suggestions the next line. Why would your aliases not show up? How can I solve it?
![]() |
Beta Was this translation helpful? Give feedback.
-
I have the same problem. |
Beta Was this translation helpful? Give feedback.
-
same problem. not working when I have |
Beta Was this translation helpful? Give feedback.
-
Same here, all was working with Fig, just switched to cw and now the alias do not work |
Beta Was this translation helpful? Give feedback.
-
same with me |
Beta Was this translation helpful? Give feedback.
-
Same here |
Beta Was this translation helpful? Give feedback.
-
Same here |
Beta Was this translation helpful? Give feedback.
-
Acknowledging this new surge of issues. We are investigating and will revert back asap. In the meantime please see my comment further above |
Beta Was this translation helpful? Give feedback.
-
This issue, combined with general slowness and orphaned zsh processes, has led me to reverting back to using fig. I hope this is fixed before fig is sunsetted in September as things sit right now CW is not a production ready replacement. |
Beta Was this translation helpful? Give feedback.
-
Hi everyone, an update. We still believe that the issue is due to some conflict with a 3rd party plugin (potentially ohmyzsh). To help us resolve, could everyone facing this issue please do the following:
|
Beta Was this translation helpful? Give feedback.
-
I found the issue. it will start to work $ZSH is $HOEM/.oh-my-zsh the problematic script there - oh-my-zsh.sh |
Beta Was this translation helpful? Give feedback.
-
based on my testing this lines are the problem if you remove them it will work again but you're terminal will look ugly plugins=(git)
source $ZSH/oh-my-zsh.sh |
Beta Was this translation helpful? Give feedback.
-
I just did some more digging by commenting each line of the # Load all of the lib files in ~/oh-my-zsh/lib that end in .zsh
# TIP: Add files you don't want in git to .gitignore
for lib_file ("$ZSH"/lib/*.zsh); do
_omz_source "lib/${lib_file:t}"
done
unset lib_file So I went into the
@brendanfalk any idea why this might be causing an issue? |
Beta Was this translation helpful? Give feedback.
-
remarking alias -- -='cd -' solved the issue |
Beta Was this translation helpful? Give feedback.
-
The 0.15.0 build is released with a fix for this issue. You can click the "Check for updates..." button in the menu to trigger the update. ![]() |
Beta Was this translation helpful? Give feedback.
Thank you so much for debugging this! This will be fixed in the next release.
A quick fix is removing any alias that starts with a
-
Details on why this was happening:
The issues was when we ran the
alias
command due to the sort order the first character was-
.The way we get aliases is running a shell command in your dotfiles that loads the commands:
cw _ pre-cmd --alias "$(\alias)"
Using clap there is an option to allow arguments to start with a hyphen which was not enabled and thus the command failed: https://docs.rs/clap/latest/clap/struct.Arg.html#method.allow_hyphen_values