Ticket #3232 (closed enhancement: fixed)

Opened 10 years ago

Last modified 10 years ago

Add support for fish subshell prompt (with patch)

Reported by: chown Owned by: andrew_b
Priority: major Milestone: 4.8.13
Component: mc-core Version: master
Keywords: fish subshell prompt Cc:
Blocked By: Blocking:
Branch state: merged Votes for changeset: committed-master


Current support for fish subshell doesn't show a prompt, because fish_prompt function is overridden to pass current path to mc.

Attached is a patch containing a change to allow a prompt function to be used.

The user can specify a fish_prompt_mc function to use a mc specific prompt, if none is specified fish_prompt is copied to fish_prompt_mc to use the default prompt. The new implementation of fish_prompt calls fish_prompt_mc to display a prompt before exit. Cwd is passed to mc as before.

The length of the command string is now over the limit of BUF_SMALL size, so I also increased it to BUF_MEDIUM.

GNU Midnight Commander 4.8.12-12-g4253f59
Built with GLib 2.40.0
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
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;


fish_prompt.diff (1.0 KB) - added by chown 10 years ago.
diff file

Change History

Changed 10 years ago by chown

diff file

comment:1 Changed 10 years ago by chown

Forgot to mention, tested on Ubuntu 14.04 with fish 2.0.0

comment:2 Changed 10 years ago by andrew_b

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

Patch applied. Thanks!

Branch: 3232_fish_prompt

comment:3 Changed 10 years ago by andrew_b

  • Votes for changeset set to andrew_b
  • Branch state changed from no branch to approved

comment:4 Changed 10 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 10 years ago by andrew_b

  • Status changed from testing to closed
Note: See TracTickets for help on using tickets.