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.38k stars 373 forks source link

Fish abbreviations don't expand until warp runs the command #852

Closed taranlu-houzz closed 1 year ago

taranlu-houzz commented 2 years ago

Describe the bug

With `fish`, you can define abbreviations that expand after pressing `space` or `enter`. This allows you to have the convenience of aliases without forgetting what the underlaying commands actually are. In `fish`, this is expanded as you type, so an abbreviation could be a base or partial command that you then manually add to. Currently, the expansion of the abbreviation only happens after you press `enter` in `warp`, which hampers their use.

To Reproduce

  1. Start fish
  2. abbr -a -U -- gfa 'git fetch --all'
  3. Type gfa in warp, then press space (the abbreviation does not get expanded)
  4. Press enter (the command is run, and the abbreviation is expanded)

Expected behaviour

I would expect abbreviations to be expanded as the user types.

Screenshots

No response

Operating System

MacOS

OS Version

10.15.7

Additional context

No response

elviskahoro commented 2 years ago

It's still unclear what the team will do for this and also the ETA after flushing out the approach. Apologies that this is currently missing!

andresespinosapc commented 2 years ago

This feature is very important, I use it all the time to add parameters after aliases. For example doing something like gco branch-name for git checkout branch-name

chrisfromredfin commented 2 years ago

similarly not working with zsh-abbr too, afaict.

diktomat commented 2 years ago

Also, they sometimes don't expand at all, seems to be the case mostly when parameters are added after the abbr like:

image
shrugalic commented 2 years ago

πŸ‘ I'm also missing this feature.

Just to reiterate, expansion does work after enter, but not after space.

I have this abbreviation gcb to create a branch, so it expands to git checkout -b:

abbr --add --global -- gcb 'git checkout -b'

It expands without parameter (after typing enter), but this is useless:

 ~  ❯ git checkout -b
fatal: not a git repository (or any of the parent directories): .git

With the (very important) parameter it does not expand:

 ~  ❯ gcb my_new_branch
fish: Unknown command: gcb
pat-s commented 1 year ago

I just found out that if you reinit the config by running fish in a tab, the expansion with a parameter added works afterwards.

iain commented 1 year ago

@pat-s that seems to be because you are running plain fish inside Warp. This way Warp cannot use it special powers.

orbiteleven commented 1 year ago

I just found out that if you reinit the config by running fish in a tab, the expansion with a parameter added works afterwards.

Yeah, while this "works" in that abbreviations/autocompletions work again, it kinda negates a bit purpose for using Warp in the first place.

For my part, it's more important that I can use something similar to https://github.com/jhillyerd/plugin-git on Warp than it is that my "old ways" work 100%, but I can't seem to find an analog in Warp.

sullimander commented 1 year ago

Any update on getting this fixed? Fish is basically broken without abbreviations working.

rrajath commented 1 year ago

I have the same issue. The abbreviation doesn't expand whether I hit space or enter. It keeps saying "Unknown command"

telmen commented 1 year ago

This feature is most wanted and really hopes that it is in the plan : )

ubmit commented 1 year ago

Has anyone encountered a workaround to be able to use jhillyerd/plugin-git or something similar?

Gorthog commented 1 year ago

One way to work around it and get some of the functionality is to add in fish config

alias gb="git branch -vv"

You will need to add it manually for each alias. It won't expand in real time but the correct command will be executed, and autocomplete of warp will detect it correctly.

erykpiast commented 1 year ago

Not sure if adding one more vote helps, but yes, I want this, too, badly! I just wasted an hour figuring out what I have misconfigured that it doesn't work (after months of patient ignorance) and just found out in this thread that it's Warp that doesn't support it as it is supposed :( Pretty please, add this feature πŸ™

james2doyle commented 1 year ago

I've gone back to WezTerm for now until this is fixed. I didn't realize how much I rely on abbreviations...

On Wed, Feb 15, 2023, 12:48 a.m. Eryk NapieraΕ‚a @.***> wrote:

Not sure if adding one more vote helps, but yes, I want this, too, badly! I just wasted an hour figuring out what I have misconfigured that it doesn't work (after months of patient ignorance) and just found out in this thread that it's Warp that doesn't support it as it is supposed :( Pretty please, add this feature πŸ™

β€” Reply to this email directly, view it on GitHub https://github.com/warpdotdev/Warp/issues/852#issuecomment-1430955818, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAK37GDGBQFNR5L7IEBIZG3WXSJ7TANCNFSM5SC2UPFQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>

nathanielmom commented 1 year ago

This is a deal-breaker for me, as I use abbreviations regularly. Please address this. πŸ™πŸΎ

dannyneira commented 1 year ago

Hey Folks! this is being worked on and can be tracked on this feature request here: https://github.com/warpdotdev/Warp/issues/1895

Keeping the FR as it has more πŸ‘ 's. Closing as duplicate.

ElijahLynn commented 8 months ago

fwiw, abbreviations have been working for me out of the box. I first installed warp about a month ago, I think.

shrugalic commented 8 months ago

Yes, that issue has been solved for over 10 months now https://github.com/warpdotdev/Warp/issues/1895