Cleaner fish prompt-switching behavior #353

Merged
merged 1 commit into from Nov 18, 2013

Projects

None yet

4 participants

@ryanartecona
Contributor

Fixed an issue that flattened a multi-line custom prompt into a single line, and cleaned up the prompt prefixing behavior.

The fish_prompt function is now copied via functions -c instead of by replacing the function name of the functions string output. (see here: http://ridiculousfish.com/shell/user_doc/html/commands.html#functions)

Also, _old_fish_prompt is called directly after the (virtualenv) prefix is printed, instead of being shoved into a %s with a printf. This does not change the behavior for the default prompt, but preserves the newlines of any user-defined custom prompt (e.g. mine). This also avoids some other weird behavior caused by the printf.

Contributor
pnasrat commented Nov 6, 2012

Looks fine but I'm not a fish user so will have to test in a bit

@dalanmiller

@ryanartecona, what a baller. :shipit:

xfix commented Nov 15, 2013

The issue was re-reported on fish-shell issue tracker - fish-shell/fish-shell#1118. The fix looks fine in my opinion (actually, I planned to upload my own fix, but I noticed this issue just before I tried to).

@xfix xfix referenced this pull request in fish-shell/fish-shell Nov 15, 2013
Closed

Virtualenv activation breaks the prompt #1118

@pnasrat pnasrat merged commit 2e5c64d into pypa:develop Nov 18, 2013

1 check passed

default The Travis build passed
Details
@xfix xfix referenced this pull request in fish-shell/fish-shell Nov 21, 2013
Closed

Activating Virtualenv breaks the prompt #1120

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment