fish-shell/share/tools/web_config/sample_prompts
Johannes Altmanninger 5d135d5556 prompts: fix pipestatus for jobs prefixed with "not"
6902459566 was an attempt to not print
$status twice in the prompt. As a result we print $pipestatus but
not $status, which /usually/ is the same as $pipestatus[-1] --- unless
the builtin "not" is used, which inverts the $status of a job (it does
not alter $pipestatus).

As a result, the default prompt prints unexpected status codes:

	~ > not false
	~ [1]> not true
	~ > not true | true
	~ > not false | false
	~ [1|1]>

This commit reintroduces printing of $status after $pipestatus, but only
if it is different from $pipestatus[-1].
Additionally, we only print anything at all if the $status is nonzero,
to avoid confusing output on `not false | false`

	~ > not false
	~ > not true
	~ [0] 1> not true | true
	~ [0|0] 1> not false | false
	~ >

I think this is closer to users' expectations for those cases; they should
not have to think about this implementation detail of the not-statement.
2020-02-06 01:43:17 +01:00
..
acidhub.fish sample_prompts/acidhub: Use prompt_pwd 2020-01-06 18:41:50 +01:00
classic.fish Quote $USER when used with switch or test 2017-07-20 19:45:32 +02:00
classic_status.fish prompts: fix pipestatus for jobs prefixed with "not" 2020-02-06 01:43:17 +01:00
classic_vcs.fish prompts: fix pipestatus for jobs prefixed with "not" 2020-02-06 01:43:17 +01:00
debian_chroot.fish Reformat all files 2019-05-05 12:09:25 +02:00
informative.fish prompts: fix pipestatus for jobs prefixed with "not" 2020-02-06 01:43:17 +01:00
informative_vcs.fish prompts: fix pipestatus for jobs prefixed with "not" 2020-02-06 01:43:17 +01:00
justadollar.fish lint: fish_indent all sample prompts 2016-11-01 19:19:45 -07:00
lonetwin.fish Stop caching set_color output in rest of prompts 2019-04-09 03:40:09 -07:00
minimalist.fish lint: fish_indent all sample prompts 2016-11-01 19:19:45 -07:00
nim.fish disable virtualenv prompt update in nim prompt 2020-01-06 17:06:24 +01:00
pythonista.fish sample prompts: use $USER instead of (whoami) 2019-09-18 23:35:16 -07:00
robbyrussell.fish Don't test with one argument 2019-01-27 15:38:03 +01:00
screen_savvy.fish sample prompts: use $USER instead of (whoami) 2019-09-18 23:35:16 -07:00
sorin.fish Improved performance of the sorin theme 2019-02-06 12:29:52 +01:00
terlar.fish sample prompts: use $USER instead of (whoami) 2019-09-18 23:35:16 -07:00