Open dcervenkov opened 11 months ago
Hi @dcervenkov The completions for new variables/commands bootstraps on new Warp sessions. So as a workaround to this issue, you can manually type in the known variable echo $TEST_VAR
and it should produce the result. As a possible workaround, you can also echo "export TEST_VAR=1" >> ~/.zshrc
to add the variable to your rc files and it should bootstrap new Warp sessions with that var assigned and should auto-complete.
Please let me know if this helps with your issue.
Hey @dannyneira, not sure what you mean by "The completions for new variables/commands bootstraps on new Warp sessions."
Yes, I can indeed type the variable name out or save it to ~/.zshrc
, but that still means the completion is broken in Warp (while it works in other shells).
What I mean by this is that Warp loads the variables in the ~/.zshrc
file on starting a new session (open a new window/tab or pane), this is what enables completions for those variables. I'll let the team know and we'll post any updates on this thread.
Hey Folks, just wanted to chime in here and set the expectation that this bug fix may require significant engineering lift and may not be prioritized in the near term.
That being said, to anyone else facing this issue, please add a 👍 to the original post at the top or comment with your details, and subscribe if you'd like to be notified. The more 👍 an issue has, the higher the chance of it getting prioritized for future cycles.
Hi @dcervenkov The completions for new variables/commands bootstraps on new Warp sessions. So as a workaround to this issue, you can manually type in the known variable
echo $TEST_VAR
and it should produce the result. As a possible workaround, you can alsoecho "export TEST_VAR=1" >> ~/.zshrc
to add the variable to your rc files and it should bootstrap new Warp sessions with that var assigned and should auto-complete.Please let me know if this helps with your issue.
Also, don't forget run source ~/.zshrc to executes the file
When exporting vars with commands, adding them to ~/.zshrc wasn't sufficient. I found a workaround that may help others, although it's not perfect. When I enter a subshell by typing 'zsh', the autocomplete function works successfully.
Example Warp terminal: export TEST="SomeString" #Var exported before entering sub shell zsh export VAR="SomeString" #Var exported after entering sub shell echo $MY (tab for completion)
Same problem here with (non-export) variables in bash:
Warp on the left and a classic terminal on the right.
In both cases I entered echo $fo<TAB>
in the last prompt.
Warp gives unhelpful suggestion. Classic terminal automatically completes to $foo
Are you referring to my last comment? If you, notice - I used export var=values. Then I created a new shell (zsh), and auto-complete worked for me. I know it is not ideal, but it is better than nothing. I hope it is useful, and I hope the Wrap team will fix it. I love warp, my 2 big issues are auto-complete (like this case) and it does not work inside of IDE (vscode in my case).
Are you referring to my last comment?
No I'm referring to the original issue here: completion of variables and env/exported vars doesn't work if they are created after the shell started.
Also applies to (bash) aliases by the way: aliases that have been set up in e.g. .bashrc
are suggested/autocompleted. But aliases created after shell start are unknown to warp's suggestion/completion functionality
To me, it doesn't show some variables like $GID or $UID. I am not sure if that's also related to this bug, but it's something I can easily check with the ubuntu terminal with ZSH, It does autocomplete the sentence, but not in warp.
Discord username (optional)
No response
Describe the bug
Some environment variable names are missing from completion suggestions.
To reproduce
export TEST_VAR=1
echo $TES
Expected behavior
I expect to see
TEST_VAR
among the suggestions.Screenshots
Operating system
MacOS
Operating system and version
14.0
Shell Version
zsh 5.9 (arm-apple-darwin23.0.0)
Current Warp version
v0.2023.11.14.08.02.stable_02
Regression
No, this bug or issue has existed throughout my experience using Warp
Recent working Warp date
No response
Additional context
No response
Does this block you from using Warp daily?
No
Is this a Warp specific issue? (i.e. does it happen in Terminal, iTerm, Kitty, etc.)
Yes, this I confirmed this only happens in Warp, not other terminals.
Warp Internal (ignore): linear-label:b8107fdf-ba31-488d-b103-d271c89cac3e
None