Giter Site home page Giter Site logo

Comments (4)

dannyneira avatar dannyneira commented on July 2, 2024 1

My guess is that you have a custom prompt or fish plugin and Warp is unable to parse it.

You can check whether it’s something in your dotfiles by commenting on your config.fish or disable parts of your dotfiles just for Warp by using this conditional statement:

# Fish
if test "$TERM_PROGRAM" != "WarpTerminal"
# > What you want to disable here <
end

We have a list of incompatible tools here: https://docs.warp.dev/help/known-issues#list-of-incompatible-tools
And more info on custom prompts here: https://docs.warp.dev/features/prompt

from warp.

wonjoonSeol-WS avatar wonjoonSeol-WS commented on July 2, 2024

Hello dannyneira,

I am afraid the issue still persists even after i comment out everything in ~/.config/fish/config.fish. and removing all plugins.
image

After removing all plugins and commenting out config.

image

Please note that the issue doesn't happen when the default shell is zsh and opening subshell by typing 'fish'.
The issue only happens when I set fish as default shell. (After typing chsh -s $(which fish))

from warp.

dannyneira avatar dannyneira commented on July 2, 2024

Oh I see, I'm having trouble reproducing this issue, even with an empty fish config and settings fish as default shell as well.

CleanShot 2024-05-09 at 15 19 35

Can you please try putting the result of which fish into your Settings > Features > Session > Startup shell for new sessions > Custom, then open a new session and activate/deactivate again to see if that helps?

If not, please delete the logs, then post the logs for when you run the activate/deactivate a few times. This could help us see where the script is failing on your end. https://docs.warp.dev/help/sending-us-feedback#gathering-warp-logs

from warp.

wonjoonSeol-WS avatar wonjoonSeol-WS commented on July 2, 2024

Hello, thank you for your message.
Unfortunately, i am not seeing any error message on ~/Library/Logs/warp.log.

image

Warp’s logs do not contain any console input or output.

image

I think it is because Warp itself isn't crashing but the code that wraps fish crashes fish?

fish: Unknown command: _old_fish_prompt
fish:
_old_fish_prompt
^~~~~~~~~~~~~~~^
in command substitution
in function '_warp_prompt'
	called on line 1 of file /var/folders/56/f04gtv6x1mvc_mqn0c4n2nz4msr0jz/T/.tmpXdNHiN
in command substitution
	called on line 120 of file /var/folders/56/f04gtv6x1mvc_mqn0c4n2nz4msr0jz/T/.tmpXdNHiN
in function 'warp_precmd'
in event handler: handler for generic event 'fish_prompt'
fish: Unknown command
        set -l prompt (_old_fish_prompt)
                      ^~~~~~~~~~~~~~~~~^
in function '_warp_prompt'
	called on line 1 of file /var/folders/56/f04gtv6x1mvc_mqn0c4n2nz4msr0jz/T/.tmpXdNHiN
in command substitution
	called on line 120 of file /var/folders/56/f04gtv6x1mvc_mqn0c4n2nz4msr0jz/T/.tmpXdNHiN
in function 'warp_precmd'
in event handler: handler for generic event 'fish_prompt'

This is all i am getting right now

Update:

So this if statement in the activate.fish is problematic

if test -z "$VIRTUAL_ENV_DISABLE_PROMPT"
    # Copy the current `fish_prompt` function as `_old_fish_prompt`.
    functions -c fish_prompt _old_fish_prompt

    function fish_prompt
        # Run the user's prompt first; it might depend on (pipe)status.
        set -l prompt (_old_fish_prompt) # <- ISSUE HERE

        printf '(%s) ' $VIRTUAL_ENV_PROMPT

        string join -- \n $prompt # handle multi-line prompts
    end

    set -gx _OLD_FISH_PROMPT_OVERRIDE "$VIRTUAL_ENV"
end

so by setting

set -Ux VIRTUAL_ENV_DISABLE_PROMPT 1

I can avoid the issue from happening but this is still quite strange.

Also, When i use Warp prompt, I am still getting pythonvirtualenv prompt despite setting VIRTUAL_ENV_DISABLE_PROMPT = 1, so that function part in activate.fish is completely unnecessary when it comes to Warp.

image

from warp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.