David Adam
5c56765d12
hg prompt: fix infinite loop due to incorrect scoping
...
4b079e16e5
fixed some unintended behaviour
which the hg prompt was apparently relying upon, producing an infinite
loop whenever called.
2018-04-02 21:24:52 +08:00
Peter Ammon
7659554dea
Remove use of caret redirection from share/*
...
This removes the use of caret redirections from share/completions
and share/functions, in preparation for dropping support in fish.
2018-04-01 13:42:38 -07:00
Kurtis Rader
8b79f4e5c9
use the new set -a
and set -p
in our scripts
2017-08-04 18:02:24 -07:00
Fabian Homborg
0a8c922d92
Use command -sq instead of redirection
...
This option has been available for a while now and it's a bit shorter.
2017-02-18 22:16:55 +01:00
Kurtis Rader
11a60c8374
reformat all fish scripts
...
I hate doing this but I am tired of touching a fish script as part of
some change and having `make style` radically change it. Which makes
editing fish scripts more painful than it needs to be. It is time to do
a wholesale reformatting of these scripts to conform to the documented
style as implemented by the `fish_indent` program.
2016-11-27 21:27:22 -08:00
Fabian Homborg
8cc213ed4f
hg_prompt: Use string match -q instead of redirection
2016-01-08 14:10:03 +01:00
Fabian Homborg
8eca775977
hg prompt: Throw away string match
input
...
This would print redundant characters
2015-12-31 14:21:37 +01:00
Fabian Homborg
c3971957ac
hg prompt: Fix indentation
2015-12-31 14:21:37 +01:00
Fabian Homborg
9a7b2b190b
hg prompt: Make display slightly nicer
...
The "/" between branch and bookmark might be mistaken for a path.
Parens (like the git prompt) make it look a bit more like a unit.
2015-12-31 14:21:37 +01:00
Fabian Homborg
6f2f0cfce2
Optimize hg prompt
...
Mainly replace hg calls since python is slow to start.
2015-12-31 14:21:37 +01:00
Fabian Homborg
aa37b40d93
__fish_hg_prompt: Clean up a bit
...
`sort -u | uniq` is completely redundant, calling grep for every
status-pair is unnecessary, `contains` doesn't take the word "in" as
special.
None of these are critical and there's basically no performance benefit
since this function is utterly dominated by hg calls.
2015-09-27 16:30:37 +02:00
Fabian Homborg
8eccf8a6f7
__fish_hg_prompt: Remove explicit root check again
...
This doesn't add anything except slowing the function down by about
33%. Checking for a branch is just as good and that is displayed in the
prompt anyway.
2015-09-27 16:23:11 +02:00
Fabian Homborg
95908aa2bc
__fish_hg_prompt: Only show current bookmark
2015-09-26 21:52:20 +02:00
Fabian Homborg
a19f4dd4c8
__fish_hg_prompt: Add bookmark support
2015-09-26 20:41:18 +02:00
Fabian Homborg
eadd4d9b71
__fish_hg_prompt: Bail early if not in a hg repo
2015-09-26 20:40:48 +02:00
Fabian Homborg
cb5511c8db
Vcs prompt: Break if vcs isn't installed
...
Prevents an annoying error message.
Fixes #2363 .
2015-09-06 14:58:09 +02:00
LoveIsGrief
facfe33218
Add function to ouput hg branch and status for a prompt
...
This is an adaptation of terlar's git prompt output
2015-01-30 23:07:40 +08:00