Commit Graph

324 Commits

Author SHA1 Message Date
Lior Stern
5b2250883a Add termux support for fish_config. 2019-10-26 18:16:54 +02:00
Gabriel Medeiros Coelho
af48fa5d91 change href attribute to ng-href
Since the url is inside a AngularJS markup {{url}}, it's better to use **ng-href**.

From  [AngularJS Documentation](https://docs.angularjs.org/api/ng/directive/ngHref):
<br>
"Using AngularJS markup like {{hash}} in an href attribute will make the link go to the wrong URL if the user clicks it before AngularJS has a chance to replace the {{hash}} markup with its value. Until AngularJS replaces the markup the link will be broken and will most likely return a 404 error. The ngHref directive solves this problem."
2019-10-26 18:12:44 +02:00
Lior Stern
2810ba0014 Check that /proc/version is readable before reading it in web_config.
/proc/version may be unreadable in Android.
2019-10-26 18:12:10 +02:00
ARifleman
876176fc94 Added 'Nord' color scheme to sample color schemes (#6201) 2019-10-15 23:18:18 -07:00
Fabian Homborg
70fc2611bd webconfig: Escape abbrs properly
Fixes #6120
2019-10-02 20:37:24 +02:00
Aaron Gyes
b7dd060dec sample prompts: use $USER instead of (whoami) 2019-09-18 23:35:16 -07:00
tomKPZ
42f38bb806 Fix status code coloring for nim prompt 2019-07-07 19:36:17 +02:00
Fabian Homborg
c2970f9618 Reformat all files
This runs build_tools/style.fish, which runs clang-format on C++, fish_indent on fish and (new) black on python.

If anything is wrong with the formatting, we should fix the tools, but automated formatting is worth it.
2019-05-05 12:09:25 +02:00
Aaron Gyes
b5865d2cba Spruce up fish_config output, show transcript of commands run
run_fish_cmd() now prints every command we run in a subshell

Fixes #5584
2019-04-30 14:08:11 -07:00
Aaron Gyes
3b97e2d7ec Stop caching set_color output in rest of prompts
No more __fish_prompt_* variables.
2019-04-09 03:40:09 -07:00
Aaron Gyes
5f7f4c638f informative.fish: stop caching_set_color, use br* directly
No longer uses global vars to cache set_color output, this was
from before set_color was a builtin, it is pointless now.

This is also a prompt from before we had bright named colors,
and it appears it was relying on -o red to get bright red.
so use brred, etc.
2019-04-09 03:13:45 -07:00
zabereer
da2925bad7 add $pipestatus to classic_vcs.fish prompt 2019-03-04 18:25:18 +00:00
zabereer
0923712e3e add $pipestatus to informative_vcs.fish prompt 2019-03-04 18:15:04 +00:00
zabereer
e157ba131b add $pipestatus to informative.fish prompt 2019-02-28 06:37:56 +00:00
zabereer
ead26881f0 create __fish_print_pipestatus function to reduce code duplication in other prompts when adding $pipestatus 2019-02-28 06:19:28 +00:00
zabereer
8ebbe67ff1 Use string match instead of for loop to simplify classic_status.fish 2019-02-27 06:11:03 +00:00
zabereer
378b5d7295 update classic_status.fish prompt to include $pipestatus 2019-02-26 18:27:59 +00:00
Fabian Homborg
b999ba7b47 Update fish_hg_prompt reference in terlar prompt 2019-02-10 14:44:50 +01:00
Fabian Homborg
3a320d7584 Update fish_vcs_prompt reference in sampleprompts 2019-02-10 14:44:50 +01:00
Fabian Homborg
cb7762b7c0 Move __fish_git_prompt -> fish_git_prompt
This exposes it more, since it's quite an important function.

We should do the same with the other vcs functions.

We leave a compatibility shim in place for now.
2019-02-10 14:44:50 +01:00
Leonard Hecker
988283c717 Improved performance of the sorin theme
This improves performance of the sorin theme tremendously
for repositories with a large number of changes.
2019-02-06 12:29:52 +01:00
Fabian Homborg
7eee158292 Don't test with one argument
[ci skip]
2019-01-27 15:38:03 +01:00
Aaron Gyes
8743961301 Fix fish_config rendering brights as normal on prompt previews
I noticed our default brgreen for fish_color_user was rendering
as just unstyled white.
2019-01-21 13:59:36 -08:00
Fabian Homborg
c9fe59237b webconfig: Allow \co sgr0 in one more place
Some $TERMs like tmux and linux use an sgr0 ("reset") value that ends
in \co instead of "m". We need to adjust our regex here to catch that,
or we'd miscount lines with it.
2019-01-16 10:23:53 +01:00
Fabian Homborg
d7dac4d077 webconfig: Use history -z
This did some weird stuff with \x1e.

[ci skip]
2019-01-16 09:32:26 +01:00
Fabian Homborg
2b426c1047 webconfig: Fix binding tab
This broke when --preset was introduced.

We allow a "--preset" or "--user" to appear right after the "bind",
and save the value, but don't use it yet.

Fixes #5534.

[ci skip]
2019-01-16 09:32:26 +01:00
Fabian Homborg
d4be5f08f3 Fix nim prompt (via web_config)
This had a helper function defined outside of the fish_prompt
function, so `funcsave` missed it (see #736).

Fixes #5490.

[ci skip]
2019-01-07 17:25:58 +01:00
Benjamin Nied
e7bfd1d71c Remove shebangs from py scripts
Starting with Fedora 30 and RHEL 8, ambiguous python shebangs will now
throw errors during the RPM build process instead of just warnings,
since these systems have moved to Python 3 by default, and Python 2 may
not be available in the future.

See [this
page](https://fedoraproject.org/wiki/Changes/Make_ambiguous_python_shebangs_error)
for more details.

Drop these shebangs as the scripts are only ever called from fish
wrappers.
2019-01-06 20:39:04 +08:00
Fabian Homborg
50fbc36b73 sample_prompts/sorin: Correct git_action function name
We renamed this, and apparently missed it.

[ci skip]
2018-12-19 09:35:26 +01:00
Leonard Hecker
082450b1e7 Severely extended the sorin theme (#5411)
* Severely extended the sorin theme

This theme should now mostly match the original.

* Removed superfluous whitespace

* Inlined external links as ASCII art

* Made myself the author of the sorin theme

* Removed superfluous read delemiter

* Renamed __fish_git_action to fish_print_git_action

* Adde a minor comment
2018-12-18 15:01:38 +01:00
Fabian Homborg
9cfb1394bf sample_prompts/sorin: Add a safe way to determine merge status
Based on what __fish_git_prompt is doing.

See #5388.

[ci skip]
2018-12-06 16:15:11 +01:00
Leonard Hecker
0b63c1f46d Don't run git merge quietly
This can and will mess up git rebases and force pushes.
2018-12-06 15:53:34 +01:00
Aaron Gyes
04795eb8ea webconfig: should know about italics, reverse, dim. 2018-12-05 01:05:33 -08:00
Fabian Homborg
03bca5f7dd webconfig: Fall back onto the default colorscheme
The solarized themes now define pager colors, while other schemes
don't.

So if a user picks one of them, and then another, they'd keep the
pager colors.

Instead, since the default theme is now complete, any theme that does
not define its own pager colors will always get the default ones.

[ci skip]
2018-12-05 09:54:31 +01:00
Fabian Homborg
fa5f3fe9a0 webconfig: Update default colorscheme
This was missing a bunch of variables from __fish_config_interactive.

Ideally we wouldn't have to duplicate this info, but I don't have a
great solution either.
2018-12-05 09:54:31 +01:00
Fabian Homborg
c242d923c9 sample_prompts/robbyrussell: Use fish_print_hg_root
This removes ~140ms from every single prompt.

When not in a git repo, this prompt now takes ~9ms, as opposed to
~150ms before.

Fixes #5266 harder.

[ci skip]
2018-11-30 20:59:53 +01:00
Fabian Homborg
60f8eda5c4 webconfig: Hack tmux's reset sequence
This is quite ugly, but in lieu of putting in a proper ansi
parser (i.e. the output part of a terminal), since this is the only
such sequence we have seen until now, let's just match it.

Fixes #5312.

[ci skip]
2018-11-30 20:21:36 +01:00
Fabian Homborg
91a664b9fa webconfig: Use html.escape if available
Just try to import it, on error import the old thing.

Tested with python 3.7.1 and 2.7.15.

Fixes #5125.

[ci skip]
2018-11-30 19:46:00 +01:00
crocket
35db0fb5df Improve the contrast of the pager for solarized dark theme.
By setting fish_pager_color_completion to B3A06D,
the pager gets more visual contrast.
2018-11-30 19:39:45 +01:00
Fabian Homborg
eb0dd1ea78 sample_prompts/robbyrussell: Clean
- Remove use of `eval`
- Use `git rev-parse` instead of `git status` as its faster,
- especially in large repos. (in qt5: 600ms vs 1ms)

- Use return status instead of test -n

This should change nothing about the output.
2018-11-29 19:35:13 +01:00
Fabian Homborg
8ee2e54c9b sample_prompts/acidhub: Improve git parsing
Same as the sorin changes - don't parse "git branch" output.
2018-11-29 19:21:07 +01:00
Fabian Homborg
b18693f3c1 sample_prompts/sorin: Improve git parsing
This uses some more string, but the main improvement is using "git
rev-list" instead of parsing "git branch" output that happens to be localized.

[ci skip]
2018-11-29 17:38:18 +01:00
Fabian Homborg
bd1ceefb17 sample_prompts/user_host_path: Remove
I can't see the value in this, given that we have a bunch of minimalist ones.
The "escaping" here is gnarly enough that I don't want to attempt to clean it up.
2018-11-29 16:35:52 +01:00
Fabian Homborg
b794a5e476 sample_prompts/debian_chroot: Clean
- Remove begin/end in if-conditions - this used to be necessary in
  fish < 2.3.0

- Quote a `test`
2018-11-29 16:35:52 +01:00
Fabian Homborg
bcfef9268d sample_prompts/classic_status: Clean
- Remove unused variable
- Use `test` instead of `[ ]`
2018-11-29 16:35:52 +01:00
Fabian Homborg
19bcf9fc36 sample_prompts/acidhub: Clean
- Remove useless helper functions
- Remove `sed` call
- Cut down on `git` calls

The status display still needs a bit of work.
2018-11-29 16:35:52 +01:00
Fabian Homborg
ad5d400319 fixup! Fix variable names
Missed an underscore, sorry!
2018-11-29 15:36:13 +01:00
Fabian Homborg
2713265b01 webconfig: Improve Solarized schemes
Fixes #5315.
2018-11-29 15:18:13 +01:00
Fabian Homborg
be1c022861 webconfig: Allow setting pager colors 2018-11-29 15:18:00 +01:00
Fabian Homborg
a02eac5a7a webconfig: Update color lists
This adds the color variables from the docs to both the python script
and the js controller.

Among others, this includes "search_match", i.e.
"fish_color_search_match".

It still does not include the pager colors because the variable names
wouldn't match.
2018-11-29 15:17:44 +01:00