Commit graph

5443 commits

Author SHA1 Message Date
Kurtis Rader
b8817215dc trivial fixes to make doxygen happy 2016-04-23 12:26:57 -07:00
David Adam
f28a1c58f3 build_tools/make_pkg: fixups for versioning and Xcode preferences
[ci skip]
2016-04-20 14:54:49 +08:00
Kurtis Rader
2f8d0e9aba add way to comment/uncomment a command
Fixes #2375
2016-04-19 18:38:58 -07:00
Kurtis Rader
bd4622a0d0 make comments Xcode friendly
The OS X Xcode IDE has a weird requirement that block comments preceding a
function or class definition must begin with three slashes rather than two if
you want the comment displayed in the "Quick Help" window.
2016-04-19 18:22:44 -07:00
David Adam
9aeed0dc06 Merge branch 'Integration_2.3.0'
Merge the pcre2 10.20 to 10.21 update.

Closes #2943.
2016-04-19 16:28:03 +08:00
David Adam
bf0e91cc97 pcre2: add maintainer mode and disable by default 2016-04-19 15:13:15 +08:00
Aaron Gyes
fc78e70d08 Apply pcre2 svn rev 489 patch to fix CVE-2016-3191 2016-04-19 15:13:14 +08:00
David Adam
aefcf544ca Update Xcode build for new pcre2 version 2016-04-19 15:13:14 +08:00
Kurtis Rader
c93e38380a restyle autoload module to match project style
Reduces lint errors from 38 to 19 (-50%). Line count from 506 to 426 (-16%).

Another step in resolving issue #2902.
2016-04-18 22:06:31 -07:00
Kurtis Rader
a10a79c6d0 restyle builtin module to match project style
Reduces lint errors from 271 to 215 (-21%). Line count from 4304 to 3242 (-25%).

Another step in resolving issue #2902.
2016-04-18 21:06:10 -07:00
Aaron Gyes
0fd3f5c0dd Update to pcre2 10.21
Point build tools at 10.21
2016-04-19 11:49:12 +08:00
Kurtis Rader
61c0ca9dd9 restyle history code to match project style
Make the history code conform to the new style guide. Every change was
produced by clang-format (e.g., `make style`) with the exception of
comments which were manually reformatted.  That has to be done by hand
since clang-format leaves comments alone other than to reflow comment
lines to get them below the allowed line length.

The total number of lines is reduced by 313 lines (13%) in the two
affected files. Line count is generally a poor metric but in this
case it reflects an increase in information density without a loss in
readability. Furthermore, the standardization of braces, whitespace,
and comment style will make it easier for people to read the code.

This reduces the number of warnings by `make lint` from 168 to 87 (a 48%
decrease). Making it much easier to focus on the substantive lint issues.

Further improvements are possible. For example, many comments are not
very helpful (e.g., they point out the obvious) or provide insufficient
detail. But those are beyond the scope of this change.

This is the first step in resolving issue #2902.
2016-04-18 17:20:19 -07:00
Fabian Homborg
e7599fd18c Allow overriding fish_term24bit on launch
(cherry picked from commit ba1008b750)
2016-04-18 14:20:42 +02:00
Fabian Homborg
8d3eae0d76 Move 24bit setup into config.fish
Fixes #2941.

(cherry picked from commit 8558561650)
2016-04-18 14:20:42 +02:00
Fabian Homborg
ba1008b750 Allow overriding fish_term24bit on launch 2016-04-18 14:19:34 +02:00
Fabian Homborg
8558561650 Move 24bit setup into config.fish
Fixes #2941.
2016-04-18 14:19:34 +02:00
Kurtis Rader
f034d8ba3a number dirh output to make prevd/nextd easier
Fixes #2786
2016-04-16 18:40:16 -07:00
Kurtis Rader
8eb342ad3c Merge branch 'Integration_2.3.0' of https://github.com/fish-shell/fish-shell 2016-04-15 21:49:55 -07:00
Kurtis Rader
d7fd0427f3 fix off by one error
(cherry picked from commit ea3d9c36a5)
2016-04-15 15:17:57 -07:00
Kurtis Rader
baee807837 fish handling of readlink()
The readlink() function does not null terminate the path it returns.

Remove the OS X code that deals with a path buffer that is too short. For
one thing a loop isn't needed since we're told how big of a buffer
is required if the first _NSGetExecutablePath() call fails. But more
important it is so unlikely that the path will be longer than PATH_MAX
that if it is we should just give up.

Fixes 2931.

(cherry picked from commit 8e103c231e)
2016-04-15 15:17:57 -07:00
Yauhen Kirylau
c2e9cda7b3 Add completions for 'pacaur' (#2934) 2016-04-15 15:10:21 +02:00
Laurence McGlashan
4aa8fc753f Correct typo in valgrind completions 2016-04-15 15:10:21 +02:00
Fabian Homborg
635a1e9dd2 Remove the default self-insert binding in vi-default mode
Fixes #2832.
2016-04-15 15:10:21 +02:00
Yauhen Kirylau
21e927d24e Add completions for 'pacaur' (#2934) 2016-04-15 13:45:48 +02:00
Kurtis Rader
5f849d0264 provide a better experience when user presses \cC
Fixes #2904
2016-04-14 20:57:04 -07:00
Kurtis Rader
671c0515d4 tell git to ignore test failure artifacts 2016-04-14 19:05:31 -07:00
Laurence McGlashan
b5b8d9010e Correct typo in valgrind completions 2016-04-13 14:54:33 -07:00
Kurtis Rader
ea3d9c36a5 fix off by one error 2016-04-13 09:00:07 -07:00
Kurtis Rader
706bfa70c1 improve the style.fish script
If there are uncommitted changes use `git-clang-format` to limit the style
fixups to the lines being modified.

Refuse to do a `make style-all` if there are uncommitted changes.

Include a fix for the parsing of `git status` output that was recently
incorporated into the lint.fish script.
2016-04-12 19:57:07 -07:00
Kurtis Rader
8e103c231e fish handling of readlink()
The readlink() function does not null terminate the path it returns.

Remove the OS X code that deals with a path buffer that is too short. For
one thing a loop isn't needed since we're told how big of a buffer
is required if the first _NSGetExecutablePath() call fails. But more
important it is so unlikely that the path will be longer than PATH_MAX
that if it is we should just give up.

Fixes 2931.
2016-04-12 19:03:07 -07:00
Kurtis Rader
9569f51e83 revert inadvertent file inclusion in prior commit
Commit 6431c0de16 was not meant to include
changes to fish.cpp.
2016-04-12 19:01:28 -07:00
Kurtis Rader
6431c0de16 fix bug in lint.fish helper script
I just noticed that depending on the state of your working tree there can be
one or more spaces after the modification token and the file name. If there is
more than one space that causes the `string split` to produce unexpected
output.
2016-04-12 18:32:20 -07:00
Fabian Homborg
85799ee86e Remove the default self-insert binding in vi-default mode
Fixes #2832.
2016-04-12 21:40:14 +02:00
Kurtis Rader
0993141334 retry flakey tests on failure
Fixes #2926
2016-04-11 16:47:46 -07:00
Kurtis Rader
46840ae375 another wcstring to wchar_t * change
In keeping with the change made by @ridiculousfish earlier today modify
the `keyword_description()` function to return a const wchar_t pointer.

Also, simplify the `token_type_description()` function to use the recently
introduced mapping array. This changes the wording of many of the token
type descriptions. However, I can't see this as being a problem since
the original descriptions (e.g., "token_redirection") are no clearer to
someone not acquainted with the implementation.
2016-04-10 19:29:23 -07:00
Kurtis Rader
59f0261dba enhance fish_indent to normalize keywords
Fish keywords can be quoted and split across lines. Prior to this change
`fish_indent` would retain such odd, obfuscated, formatting. This change
results in all keywords being converted to their canonical form.

This required fixing a bug: the keyword member of parse_node_t wasn't being
populated. This hadn't been noticed prior to now because it wasn't used.

Fixes #2921
2016-04-10 18:40:11 -07:00
ridiculousfish
7ad6a90ea2 Change parser_token_types from wcstring to const wchar_t *
Reduces allocations and startup time
2016-04-10 01:11:09 -07:00
Aaron Gyes
574851f092 Fix #2919 by removing the entire block.
This code represents only risk and does nothing useful for anything
that can compile fish.

In C++ situations where __STDC_VERSION__ is unset (as it should be),
fish was assuming we are on < C99 and setting it to __FUNCTION__.

Basically always, __PRETTY_FUNCTION__ ends up reaplaced by __FUNCTION__, this hurt
error message usefulness and richness.

__PRETTY_FUNCTION__: const thing::sub(int)
__FUNCTION__: sub
2016-04-09 12:40:04 -07:00
Jak Wings
2d5eaed745 fix handling of line continuation in keywords
This behavior is more consistent with line continuation in strings other
than keywords.

Fixes #2897
2016-04-08 21:05:46 -07:00
Kurtis Rader
6adc35c636 add missing special-case for ../
When I reviewed the fix for #952 I noted that "../" wasn't handled but in my
haste to merge it forgot to augment the pull-request.
2016-04-08 15:52:10 -07:00
Fabian Homborg
6c5f923a47 Remove non-existing functions in bind docs
At least delete-line was previously a thing, but none of these are still available.

First part of #2914
2016-04-08 16:35:12 +02:00
Fabian Homborg
d7c690b416 Fix "." and ".." paths in cd completions
Previously if a directory called "a" was in $CDPATH, `cd ./a<TAB>` would
complete from there even if it was invalid.
2016-04-08 15:03:49 +02:00
David Adam
8eb9dac4bc CHANGELOG: include release notes for previous releases
[ci skip]
2016-04-08 12:45:43 +08:00
David Adam
2ff3a36675 CHANGELOG: move release_notes.html to a markdown document
[ci skip]
2016-04-08 12:39:15 +08:00
ridiculousfish
e395a0eb69 Migrate PATH-completion logic from complete.cpp to expand.cpp
Prior to this fix, when completing a command that doesn't have a /, we
would prepend each component of PATH and then expand the whole thing. So
any special characters in the PATH would be interpreted when performing
tab completion.

With this fix, we pull the PATH resolution out of complete.cpp and
migrate it to expand.cpp. This unifies nicely with the CDPATH resolution
already in that file. This requires introducing a new expand flag
EXPAND_SPECIAL_FOR_COMMAND, which is analogous to EXPAND_SPECIAL_CD
(which is renamed to EXPAND_SPECIAL_FOR_CD). This flag tells expand to
resolve paths against PATH instead of the working directory.

Fixes #952
2016-04-07 20:15:32 -07:00
Aaron Gyes
36691df6fe Stringify many completions and functions, with --invert stringification.
I believe apm must have been buggy - example output that I found online
showed `tr` was mangling paths with spaces in it. Should be fixed.

Also, use dscl on OS X in __fish_complete_users.fish like
__fish_print_users.fish already does.
2016-04-08 10:49:29 +08:00
Aaron Gyes
790c7f80c7 Implement an --invert/-v for string match, like grep -v.
Only lines that do not match the pattern are shown.
2016-04-08 10:49:29 +08:00
ridiculousfish
155befe90e Complain less about "bogus" PATH entries
When determining the old path, get the existing value in any scope,
not just the set scope. Also only complain about absolute paths:
relative paths are expected to be invalid sometimes.
2016-04-07 15:44:56 -07:00
ridiculousfish
9347630d1e Update Xcode project for latest Xcode 2016-04-07 15:26:39 -07:00
Kurtis Rader
784b438d4a fix git command in lint.fish script 2016-04-07 13:47:51 -07:00