warpdotdev / Warp

Warp is a modern, Rust-based terminal with AI built in so you and your team can build great software, faster.
https://warp.dev
Other
21.51k stars 376 forks source link

Support running Warp with the fish shell #190

Closed zachlloyd closed 2 years ago

zachlloyd commented 3 years ago

Describe the solution you'd like?

Support for fish at the same level as bash and zsh.

If you upvote this, kindly add which features of fish you most care about.

E.g. Autosuggestions, running fish scripts, fish syntax highlighting

Is your feature request related to a problem? Please describe.

No response

Additional context

No response

knownasilya commented 3 years ago

I like not having to use cd, for example ./folder will go into that folder.

iampeterbanjo commented 3 years ago

My most used features are

reitzig commented 3 years ago

Definitely autosuggestions, especially with combination with up-arrow history navigation, which gets filtered automatically.

reitzig commented 3 years ago

Tab completion -- there are many completions for fish already. I would not necessarily want to migrate all these to the terminal (emulator).

tofagerl commented 3 years ago

This is keeping me from using Warp for more than a few minutes at a time right now. I always end up missing parts of my Fish config, so I go back to iTerm.

hussainweb commented 3 years ago

The features I care about in using fish are autocompletion, aliases, and the features brought to it with integration with starship. Even if similar features can be built in zsh, I am more concerned with keeping my config if at all possible.

chriskrycho commented 3 years ago

Fish's history navigation and completion, especially the way it handles history driven Tab and Emacs-style key navigation completion, are huge productivity boosters for me. Its history navigation is context-specific, which means it doesn't autocomplete useless things like cd-ing into the directory Iā€™m already in, and it lets me Ctrlf or Metaf to navigate forward through the completion (and the same with b for backward), as well all the other standard Emacs-style navigation behaviors.

ta3pks commented 2 years ago

This is keeping me from using Warp for more than a few minutes at a time right now. I always end up missing parts of my Fish config, so I go back to iTerm.

I ended up running fish inside warp. It is still way faster than iterm and kitty. On linux I used to use kitty but on mac except for warp every emulator I tried has a horrible lag for some reason

smoores-dev commented 2 years ago

For what it's worth, this hasn't really been mentioned yet, but I use fish in large part because of its syntax. Warp has implemented some of the other things fish does fairly well, which is quite nice, but I'm definitely still struggling to switch over for daily use because I keep expecting to be able to use all of my fish functions, autocompletions, and the fish shell syntax

tofagerl commented 2 years ago

Yeah, I'm not switching shells to use a spiffy terminal emulator.

lessless commented 2 years ago

Autosuggestions, syntax highlighting

elviskahoro commented 2 years ago

@lessless subscribe (github watch) this:

ghost commented 2 years ago

I use fish as my main shell and I love it for it's syntax, simplicity and ease of use. šŸ¤© In Bash or ZSH I heavily relied on other's solving my issues. With fish I solve them myself. šŸ’Ŗ

In Warp, I run fish manually as Warp ignores the systems default shell ā€” fish that is on all of my Macs.

Warp executes fish much faster than any other terminal emulators I've tried so far eg.: iTerm2, Alacrity, WezTerm, KittY, and Terminal.app

gertjana commented 2 years ago

my biggest gripe is that although I can run fish inside warp, it will treat the whole fish session as one block, love to see it as an option to start a session with

chrish42 commented 2 years ago

Yes to auto-suggestions, syntax highlighting, auto-completions as mentioned above. But hopefully with that comes support for my custom prompt setup too!

elviskahoro commented 2 years ago

@chrish42 see our prompt discussion: https://github.com/warpdotdev/Warp/discussions/422

elviskahoro commented 2 years ago

Gonna lock this issue to help with notifications.

elviskahoro commented 2 years ago

With today's update! We have support for Fish! stable release 2022-03-24 (v0.2022.03.23.22.10.stable_01)

There are a couple of nuances though that we've documented here: https://docs.warp.dev/help/known-issues#fish-shell-read-command

I've unlocked the issue so people can share any bugs that they encounter while using it!

jrr commented 2 years ago

Thanks for adding Fish support! I'm excited to combine my old favorite shell with my new favorite terminal. I noticed two things during the first ~hour with it:

1) History searching

Fish does this a little differently from most shells' Ctrl+R.

In Terminal.app, I can type a substring of a previous command, hit the up arrow, and recall the command. (for example, conf -> vim ~/.config/fish/config.fish)

In Warp:

This isn't super important to me -- I'm sure I'll get used to using Warp's history searching instead of fish's -- but it's definitely a speed bump.

2) Tab completion

I noticed this with homebrew. Fish seems to know more about homebrew's CLI than Warp does:

Here's an example: asciicast

Warp's completion knows about fewer brew subcommands, and doesn't offer completions for available packages.

Could Warp one day use Fish's smarts for these?

SandyChapman commented 2 years ago

This may seem like a dumb question, but how do I go about changing Warp from zsh to fish? There's nothing in the command palette that I can see.

rmaclean-ee commented 2 years ago

I did sudo chsh -s /opt/homebrew/bin/fish "$USER"

SandyChapman commented 2 years ago

That changes the system default login shell though, no? On terminal you can set the "Run command" under your profile's shell options to "/usr/local/bin/fish". And in Kitty there's a config for shell /usr/local/bin/fish. I expected Warp to do similar and have the shell chosen via an application parameter. I've always avoided using chsh for fish as it's not posix compliant.

nerdalytics commented 2 years ago

But that is how you change shells on *nix systems. Using an app parameter just tells that app what to run. Accidentally, your parameter tells Terminal to run a shell.

SandyChapman commented 2 years ago

@nerdalytics Yeah, but there's also this setting in Terminal which has the same effect which also happens to be Apple's recommended way to set the shell in Terminal. It's also mentioned here as an alternative to setting your login shell. And there are reasons why using a non-posix login shell could be a bad idea.

image

nerdalytics commented 2 years ago

This Terminal setting doesn't influence other apps, and thus other apps don't see the systems' environment the way you see it in your Terminal app.

SandyChapman commented 2 years ago

@nerdalytics Yes, exactly. I'd like the see the same functionality in Warp. I don't wish to change my login shell to fish.

gertjana commented 2 years ago

to comment about the shell discussion above, I like how the terminal in vs code does, it give you the default you set but you can choose another (see screenshot) Screenshot 2022-03-25 at 22 59 01

gertjana commented 2 years ago

One other issue I've encountered, I'm not sure if it's fish related or a general issue, but if I open an ssh tunnel to some system for instance ssh -L 4430:<remote system>:443 <user>@<jumphost> The tunnel works but it doesn't show a prompt at all.

Update: Its the combination of the ssh wrapper and the ps1 prompt, I guess because there's no ps1 prompt setup on the remote systems no prompt is shown

reitzig commented 2 years ago

I can't speak for the maintainers, but I think y'all should open new isses for, well, new issues. ;)

That said, based on what @jrr writes, it seems the OP has been misunderstood as it's not about running fish but about _using (all) features of fish. (Disclaimer: Not running warp myself; Linux and fish here. :sweat_smile: Following this to get an idea of when it might be worth trying out.)

elviskahoro commented 2 years ago

Thanks for this feedback. Gonna close and lock this issue. I'll be gathering the newly created Fish issues and put them into this milestone, so it's easy to track progress.

https://github.com/warpdotdev/Warp/milestone/4

I'll also open up new issues for the comments mentioned here.

elviskahoro commented 2 years ago

@jrr See here:

elviskahoro commented 2 years ago

@SandyChapman @nerdalytics @gertjana Just added the feedback here:

So we can take recall it when we implement session management (profiles, etc.) If it ends up not making V1 I'll open an issue for it after V1 launches. No ETA on this yet though.

Advait-M commented 2 years ago

Hey folks šŸ‘‹ !

Super excited to let everyone know that we just launched Syntax Highlighting and Error Underlining on Warp yesterday šŸŽ‰ ! By default, Warp will highlight each part of a command in a different color denoting arguments, options/flags, variables, etc. and underline invalid commands with a dashed red line. You can toggle these features on/off via the Command Palette or Settings > Features.

Note that these features are built into Warp itself and will be active within Warp's custom input editor. Syntax highlighting by shells, such as fish, will continue to apply to past commands (in the block grid), since they function by using ANSI escape sequences for coloring text. We may explore adding Warp syntax highlighting to past commands as well, in the future.

Please download the latest release (v0.2022.10.11.08.13.stable_01) to get access to these features! The screenshot below shows the features in action:

Syntax Highlighting and Error Underlining Demo

Check out our user documentation for more details!

Let us know if you have any comments/feedback on these features!

+ CC folks that mentioned syntax highlighting specifically: @iampeterbanjo @lessless @chrish42