#when using with nix shell the warp features stop working
1 messages · Page 1 of 1 (latest)
Hi @lost mason. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
It seems like you're experiencing an issue where Warp's features stop working when using nix shell. This could be due to the fact that Warp's subshells feature only works with Shell-based subshells (bash/zsh/fish/ssh/poetry shell/eb ssh/etc.), and other REPLs like nix-shell aren't currently supported for this feature. There is a GitHub feature request tracking this issue here (https://github.com/warpdotdev/Warp/issues/64) as mentioned in the Discord support thread (https://discord.com/channels/851854972600451112/1172530946214461450).
Additionally, there was a similar issue reported where the AI command search shortcut stopped working in nix-shell. You can find more details about this issue here (https://github.com/warpdotdev/Warp/issues/2869).
As a workaround, you might want to try disabling certain parts of your dotfiles just for Warp by using a conditional statement. Here's an example for zsh:
# Enable just for Warp
if [[ $TERM_PROGRAM -eq "WarpTerminal" ]]; then
# What you want to ENABLE just for Warp here
fi
And for fish:
**Fish**
if test "$TERM_PROGRAM" != "WarpTerminal"
**> What you want to disable here <**
end
These examples were mentioned in the Github Issue (https://github.com/warpdotdev/Warp/issues/3232) and Github Issue (https://github.com/warpdotdev/Warp/issues/2244) respectively.
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
@lost mason kapa.ai is still learning and improving, please let us know how it did by reacting below
Hey @lost mason I imagine that command enters a subshell, @hot river how can they add the nix flake develop to the subshell menu? provide links to the docs
Let me check the knowledge base for you. One moment! :books:
To add nix flake develop to the subshell menu in Warp, you can follow these steps:
- Go to Settings > Subshells in Warp.
- Add
nix flake developto your custom list of commands.
Once added, commands that initiate subshells will generate a prompt that lets you “Warpify” on the fly. If you’d like to remember your preferences and bypass the banner, you can edit your RC files for automatic Warpification.
On the flip side, if you’d prefer to never Warpify one of the commands Warp recognized as “subshell-compatible,” you can use the blocklist under Settings > Subshells to ensure you’re never interrupted with a banner.
You can learn more about this feature in the Warp's blog post about subshell support (https://www.warp.dev/blog/warp-supports-subshells).
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
@smoky heath kapa.ai is still learning and improving, please let us know how it did by reacting below
@smoky heath tried it, getting stuck on this garbage output when i try to enter nix shell now:
'"'"'\x1b\x50\x24\x64%s\x9c'"'"' "$_msg"; unset _hostname _user _msg;' || [ -z $WARP_BOOTSTRAPPED ] && echo $0 | command -p grep -q bash && eval 'export WARP_HONOR_PS1=0; export WARP_COMBINED_PROMPT_COMMAND_GRID=0; command -p stty raw;unset PROMPTTMPDIR and TMP environment variables have been unset for Bazel.
(nix:userdev-env) pdeva-mac:monorepo pdeva$ [ -z $WARP_BOOTSTRAPPED ] && echo $0 | command -p grep -q zsh && unsetopt ZLE && eval 'export WARP_HONOR_PS1=0; export WARP_COMBINED_PROMPT_COMMAND_GRID=0; setopt hist_ignore_space; unsetopt ZLE; WARP_IS_SUBSHELL=1; WARP_SESSION_ID="$(command -p date +%s)$RANDOM"; _hostname=$(command -pv hostname >/dev/null 2>&1 && command -p hostname 2>/dev/null || command -p uname -n); _user=$(command -pv whoami >/dev/null 2>&1 && command -p whoami 2>/dev/null || echo $USER); _msg=$(printf "{"hook": "InitShell", "value": {"session_id": $WARP_SESSION_ID, "shell": "zsh", "user": "$_user", "hostname": "$_hostname", "is_subshell": true}}" | command -p od -An -v -tx1 | command -p tr -d " \n"); printf '"'"'\x1b\x50\x24\x64%s\x9c'"'"' "$_msg"; unset _hostname _user _msg;' || [ -z $WARP_BOOTSTRAPPED ] && echo $0 | command -p grep -q bash && eval 'export WARP_HONOR_PS1=0; export WARP_COMBINED_PROMPT_COMMAND_GRID=0; command -p stty raw;unset PROMPT_COMMAND;HISTCONTROL=ignorespace;HISTIGNORE=" *";WARP_IS_SUBSHEL
discord wont let me send the full output..