Ticket #3944 (closed enhancement: fixed)

Opened 6 years ago

Last modified 6 years ago

Add support for current version of Fish subshell with any prompt

Reported by: pronobis Owned by: andrew_b
Priority: major Milestone: 4.8.22
Component: mc-core Version: master
Keywords: Cc:
Blocked By: Blocking:
Branch state: merged Votes for changeset: committed-master

Description

The ticket https://midnight-commander.org/ticket/3232 introduced a way to show the prompt with the fish subshell. However, it does include its own version of the prompt, which causes two prompts to be printed for the current version of Fish. Additionally, Fish supports right-justified prompt as well, which conflicts with mc causing the prompt to completely disappear when panels are shown.

This change removes the additional prompt introduced by https://midnight-commander.org/ticket/3232. As a workaround, it also clears any right-justified portion of the prompt in case it is present. This obviously might remove a portion of the prompt, but at least it makes the left-justified part visible.

GNU Midnight Commander 4.8.21
Built with GLib 2.48.2
Using the S-Lang library with terminfo database
With builtin Editor
With subshell support as default
With support for background operations
With mouse support on xterm and Linux console
With support for X11 events
With internationalization support
With multiple codepages support
Virtual File Systems: cpiofs, tarfs, sfs, extfs, ftpfs, sftpfs, fish
Data types: char: 8; int: 32; long: 64; void *: 64; size_t: 64; off_t: 64;

Attachments

fish_prompt.diff (759 bytes) - added by pronobis 6 years ago.

Change History

Changed 6 years ago by pronobis

comment:1 Changed 6 years ago by andrew_b

  • Owner set to andrew_b
  • Status changed from new to accepted
  • Milestone changed from Future Releases to 4.8.22

comment:2 Changed 6 years ago by andrew_b

  • Branch state changed from no branch to on review

Thanks!

Branch: 3944_fish_prompt
changeset:c5aaeda39c2ffe5cf99bcb859b154edf1fa4b033

comment:3 Changed 6 years ago by andrew_b

  • Votes for changeset set to andrew_b
  • Branch state changed from on review to approved

comment:4 Changed 6 years ago by andrew_b

  • Status changed from accepted to testing
  • Votes for changeset changed from andrew_b to committed-master
  • Resolution set to fixed
  • Branch state changed from approved to merged

comment:5 Changed 6 years ago by andrew_b

  • Status changed from testing to closed

comment:6 Changed 6 years ago by teresaejunior

I was going to write a patch for this now, cloned the repo, run `git log', and found out it was already fixed for the next release! Good work!

BTW, the comments below "case SHELL_FISH:" about a fancy prompt and a TODO are irrelevant now, according to my tests, and should be removed too!

comment:7 Changed 6 years ago by zaytsev

Please feel free to submit a cleanup patch in #3955, thank you!

comment:8 Changed 6 years ago by andrew_b

Currently the fix is committed as [6ffd978fe486b907418b3a7d9e8af2ca9a86be3f].

Note: See TracTickets for help on using tickets.