zed
zed copied to clipboard
Using detect_venv using Nushell as default shell doesn't automatically execute the command
Check for existing issues
- [X] Completed
Describe the bug / provide steps to reproduce it
When using nushell
as default and detect_venv
, the overlay use "/Users/tom/Desktop/test_venv_activate_script/.venv/bin/activate.nu"
command is prompted but not executed, we have to manually hit enter.
Otherwise using zsh
the command is properly executed when a new terminal panel is opened.
Environment
Zed: v0.126.0 (Zed Preview) OS: macOS 14.3.1 Memory: 16 GiB Architecture: aarch64
If applicable, add mockups / screenshots to help explain present your vision of the feature
No response
If applicable, attach your ~/Library/Logs/Zed/Zed.log
file to this issue.
If you only need the most recent lines, you can run the zed: open log
command palette action to see the last 1000.
No response
It seems similar to #8633. Do you think it's the same problem?
This is unrelated to #8633, which is about getting the right environment when launching language servers. This here is about launching a terminal.
let Some(activate_script) = activate_script {
// Paths are not strings so we need to jump through some hoops to format the command without `format!`
let mut command = Vec::from(activate_command.as_bytes());
command.push(b' ');
// Wrapping path in double quotes to catch spaces in folder name
command.extend_from_slice(b"\"");
command.extend_from_slice(activate_script.as_os_str().as_encoded_bytes());
command.extend_from_slice(b"\"");
// Exectute the command
command.push(b'\n');
terminal_handle.update(cx, |this, _| this.input_bytes(command));
}
This works fine for zsh but doesn't work for Nushell, I don't know why yet
I didn't have time to run other tests but command.push(b'\n');
which add return to line to the vector to execute the command doesn't work for Nushell but works for zsh