Commit graph

5498 commits

Author SHA1 Message Date
Kurtis Rader
ea945cc437 restyle parse_execution module to match project style
Reduces lint errors from 184 to 84 (-54%). Line count from 2139 to 1943 (-9%).

Another step in resolving issue #2902.
2016-05-02 13:00:03 -07:00
Kurtis Rader
13d7432368 restyle pager & lru module to match project style
Reduces lint errors from 65 to 25 (-63%). Line count from 1439 to 1218 (-15%).

Another step in resolving issue #2902.
2016-05-02 12:11:57 -07:00
Kurtis Rader
ed8d1040ba restyle output module to match project style
Reduces lint errors from 34 to 31 (-9%). Line count from 712 to 535 (-25%).

Another step in resolving issue #2902.
2016-05-01 22:36:29 -07:00
Kurtis Rader
4f619c966b restyle kill module to match project style
Reduces lint errors from 10 to 9 (-10%). Line count from 242 to 175 (-28%).

Another step in resolving issue #2902.
2016-05-01 22:18:59 -07:00
Kurtis Rader
483b798863 restyle iothread module to match project style
Reduces lint errors from 41 to 26 (-37%). Line count from 444 to 423 (-5%).

Another step in resolving issue #2902.
2016-05-01 21:54:54 -07:00
Kurtis Rader
b19bfc0dd3 restyle io module to match project style
Reduces lint errors from 15 to 10 (-33%). Line count from 637 to 489 (-23%).

Another step in resolving issue #2902.
2016-05-01 20:38:19 -07:00
Kurtis Rader
8b2cf81f17 restyle intern module to match project style
Reduces lint errors from 8 to 6 (-25%). Line count from 112 to 83 (-26%).

Another step in resolving issue #2902.
2016-05-01 20:28:46 -07:00
Kurtis Rader
da17420cdf restyle input_common module to match project style
Reduces lint errors from 27 to 24 (-11%). Line count from 466 to 378 (-19%).

Another step in resolving issue #2902.
2016-05-01 20:02:16 -07:00
Jorge Bucaran
08c29727e0 Add missing color definitions to __fish_init_1_50_0 reset. (#2987)
* Add missing color definitions to __fish_init_1_50_0 reset.

The values where determined by inspecting the values of:

* fish_color_end
* fish_color_user
* fish_color_host

after resetting the color theme via fish_config.

* Add documentation for fish_color_user and fish_color_host.
2016-05-01 11:58:43 +02:00
Kurtis Rader
45c6ac0208 restyle input module to match project style
Reduces lint errors from 69 to 48 (-30%). Line count from 1270 to 1044 (-18%).

Another step in resolving issue #2902.
2016-04-30 21:46:56 -07:00
Kurtis Rader
7378871768 restyle highlight module to match project style
Reduces lint errors from 176 to 69 (-61%). Line count from 1627 to 1426 (-12%).

Another step in resolving issue #2902.
2016-04-30 21:10:23 -07:00
Kurtis Rader
d3f155d895 restyle function module to match project style
Reduces lint errors from 39 to 27 (-31%). Line count from 619 to 498 (-20%).

Another step in resolving issue #2902.
2016-04-30 20:37:46 -07:00
Kurtis Rader
075811e588 restyle fish modules to match project style
Reduces lint errors from 60 to 60 (-0%). Line count from 5599 to 4925 (-12%).

Another step in resolving issue #2902.
2016-04-30 19:52:13 -07:00
Kurtis Rader
aa8840b423 restyle fallback module to match project style
Reduces lint errors from 36 to 33 (-8%). Line count from 1910 to 1476 (-23%).

Another step in resolving issue #2902.

This also fixes a stupid mistake from an earlier commit where I didn't realize
that osx/config.h was meant to be included as a semi-static file in the
repository.
2016-04-30 18:20:18 -07:00
ridiculousfish
58d7c4b388 Remove use of __environ
It has apparently never worked. Fixes #2988
2016-04-30 17:46:14 -07:00
Kurtis Rader
a897ef0025 don't use colors when writing the ^C indicator
There was an extended discussion in https://github.com/fish-shell/fish-shell/issues/2904 about using a bright yellow background to make the cancelled command indicator, ^C, standout. The upshot was that standout (i.e., reversing fg/bg colors) mode should be used until themes are agumented with proper support for background colors and special characters.
2016-04-30 12:25:15 -07:00
Fabian Homborg
fb1443a885 Remove using_command from netctl completions
This allows `; and netctl` to work.

First step towards #2705.
2016-04-30 16:53:20 +02:00
Fabian Homborg
fde26d4049 git completion: Allow optional "+" for push
This signifies a force-push.

To avoid cluttering, only complete branches if a + is already given.

Fixes #2879.
2016-04-30 16:30:02 +02:00
Fabian Homborg
b32bf22616 Add repository/refspec completion to git
A few commands (fetch, pull and push at least) take a "repository" (aka
"remote") and then a "refspec" (we currently do branches here).

Fixes #2525 (seems that man is still alive)
2016-04-30 16:21:41 +02:00
ridiculousfish
b064da8d38 Erase the autosuggestion in fish_cancel_commandline by clearing to EOL 2016-04-29 15:33:46 -07:00
ridiculousfish
ba5a55b754 Remove an errant newline in the fish_cancel_commandline output
Now the next line appears immediately after the cancelled line,
without an intervening newline
2016-04-29 14:55:23 -07:00
ridiculousfish
bd2b107d37 Remove some unused macros from builtin_set_color.cpp 2016-04-29 14:54:21 -07:00
ridiculousfish
4c84224d06 Add some more files missing from Xcode compile step
Previously the .cpp files were #included by common.cpp
Now they get compiled separately
2016-04-29 13:59:03 -07:00
ridiculousfish
74d3aa582b Issue a \r in fish_title, except when executing it for the prompt
fish_title currently outputs some escaped text, which can confuse
the line driver (#2453). Issue a carriage return so the line driver
knows we are at the beginning of the line, unless we are writing
the title as part of the prompt. In that case, we may have text from
the previous command still on the line and we don't want to move the
cursor.

Fixes #2453
2016-04-29 12:14:10 -07:00
ridiculousfish
85b136314b Fix the Xcode build
Add missing files to link phase
2016-04-29 11:13:26 -07:00
Sanne Wouda
8fc6011741 git takes --help even when it needs a command (#2984)
`git --help` is a valid command and fish should complete it as such
2016-04-29 12:42:15 +02:00
Kurtis Rader
5092904ea3 fix bind unit tests
In my rush to get the fix for the wrong default Vi mode escape delay merged
(commit 3e24ae80b3) I neglected to update the
unit test. This change corrects that oversight.
2016-04-28 21:12:58 -07:00
Kurtis Rader
3e24ae80b3 clarify fish_vi_mode deprecation warning
Also, correct the Vi mode default escape timeout. I intended it to be 100 ms
in my previous change but it ended up 10 ms which is far too short. A 10 ms
delay will continue to cause problems for people running fish inside `screen`,
`tmux`, or over high latency connections.
2016-04-28 20:53:09 -07:00
Kurtis Rader
ffad7b0b29 restyle expand module to match project style
Reduces lint errors from 183 to 126 (-31%). Line count from 2231 to 1787 (-20%).

Another step in resolving issue #2902.
2016-04-28 20:33:27 -07:00
Kurtis Rader
d93bbfd486 restyle exec module to match project style
Reduces lint errors from 121 to 59 (-51%). Line count from 1578 to 1290 (-18%).

Another step in resolving issue #2902.
2016-04-28 20:07:00 -07:00
Kurtis Rader
32c241f51b retyle event module to match project style
Reduces lint errors from 39 to 30 (-23%). Line count from 915 to 670 (-27%).

Another step in resolving issue #2902.
2016-04-28 19:39:41 -07:00
Kurtis Rader
690ceeeaa7 restyle env_universal module to match project style
Reduces lint errors from 121 to 52 (-57%). Line count from 1916 to 1671 (-13%).

Another step in resolving issue #2902.
2016-04-28 19:17:28 -07:00
Kurtis Rader
ea02da35d4 restyle env module to match project style
Reduces lint errors from 90 to 72 (-20%). Line count from 1719 to 1298 (-24%).

Another step in resolving issue #2902.
2016-04-28 18:48:01 -07:00
Kurtis Rader
cea65599e6 document how to config editors for this project 2016-04-28 16:39:05 -07:00
Kurtis Rader
6c329e8a83 provide a realpath implementation
Not all distros have a `realpath` command. Provide a function that uses the
real command if available else use the fish builtin.

Fixes #2932
2016-04-28 16:03:27 -07:00
Fabian Homborg
5fa8370c13 git completion: Only show unmerged branches for cherry-pick 2016-04-28 21:30:26 +02:00
Cody Scott
96a28df018 switch to newer flag --set-upstream-to for git (#2982)
set-upstream was deprecated in git 1.8.0 as stated in [1] in favor
of set-upstream-to. this patch replaces the old flag in fish
completions

[1]: https://raw.githubusercontent.com/git/git/master/Documentation/RelNotes/1.8.0.txt
2016-04-28 21:26:45 +02:00
Kurtis Rader
e08039a2bd restyle common module to match project style
Reduces lint errors from 194 to 142 (-27%). Line count from 3352 to 2645 (-21%).

Another step in resolving issue #2902.
2016-04-27 17:08:25 -07:00
Kurtis Rader
108d66211f restyle color module to match project style
Reduces lint errors from 16 to 14 (-13%). Line count from 558 to 463 (-17%).

Another step in resolving issue #2902.
2016-04-27 16:06:03 -07:00
Kurtis Rader
87d5fa054d compile fallback.cpp and util.cpp seperately
Don't `#include "*.cpp"` modules in other cpp modules. I already took care
of all the builtin_*.cpp modules in my previous change where I restyled
the builtin code. This change fixes the two remaining instances of this
anti-pattern.
2016-04-27 14:56:46 -07:00
David Adam
ac68c0c878 env_universal_common.cpp: pass correct flag to fcntl
Closes #2955.

(cherry picked from commit d5797c5439)
2016-04-27 20:46:12 +08:00
Fabian Homborg
bc35ca6366 Make busctl completions useful
- More accurate

- Fast enough to be usable (previously, this would sometimes take a few
  seconds)

- A bit smaller
2016-04-27 14:22:16 +02:00
Kurtis Rader
df10b53c0c restyle builtin modules to match project style
Now that the IWYU cleanup has been merged compile all, not just a couple, of
the builtin modules independent of builtin.cpp. That is, no longer `#include
builtin_NAME.cpp` in builtin.cpp. This is more consistent, more in line with
what developers expect, and is likely to reduce mistakes.

Reduces lint errors from 384 to 336 (-13%). Line count from 6307 to 4988 (-21%).

Another step in resolving issue #2902.
2016-04-26 21:58:59 -07:00
Michael Steed
c2f9d60eb1 Update usage of pcre2_substitute() for pcre2-10.21
- Set PCRE2_SUBSTITUTE_OVERFLOW_LENGTH to get the required buffer length
  from pcre2 instead of guessing
- Set PCRE2_SUBSTITUTE_EXTENDED to enable extra goodies in the
  replacement string
2016-04-27 12:14:53 +08:00
Michael Steed
c4c7983497 configure: require at least pcre2-10.21 2016-04-27 12:14:53 +08:00
Kurtis Rader
1f06e5f0b9 add better support for IWYU and fix things
Remove the "make iwyu" build target. Move the functionality into the
recently introduced lint.fish script. Fix a lot, but not all, of the
include-what-you-use errors. Specifically, it fixes all of the IWYU errors
on my OS X server but only removes some of them on my Ubuntu 14.04 server.

Fixes #2957
2016-04-26 15:02:22 -07:00
Fabian Homborg
daa217f533 Allow setting key bindings universally
As always, we default to setting globally.
2016-04-26 15:21:15 +02:00
Fabian Homborg
e67505bead Remove named arg in fish_default_key_bindings
This wasn't actually used anywhere.
2016-04-26 15:21:15 +02:00
Fabian Homborg
7ebafa53f6 Tests: Add fish_mode_prompt to except_prompt
Without this, the interactive tests fail when they receive a mode_prompt
in vi-mode.
2016-04-26 15:21:15 +02:00
Fabian Homborg
e6ad48ea1b Set fish_key_bindings globally in binding functions
This should fix the tests.
2016-04-26 15:21:15 +02:00