Commit graph

5426 commits

Author SHA1 Message Date
Michael Steed
5f4a77a324 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

(cherry picked from commit c2f9d60eb1)
2016-04-27 21:50:18 +08:00
Michael Steed
8a940a2ee7 configure: require at least pcre2-10.21
(cherry picked from commit c4c7983497)
2016-04-27 21:50:18 +08:00
David Adam
d5797c5439 env_universal_common.cpp: pass correct flag to fcntl
Closes #2955.
2016-04-27 20:34:14 +08:00
Fabian Homborg
d0fdc80725 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:17:29 +02:00
David Adam
375bef4443 configure: enable GNU/POSIX extensions by default
Reenable mkostemp on Cygwin. Work on #2952.
2016-04-21 22:34:37 +08:00
David Adam
0e7ab7a7d0 configure: work harder to ensure mkostemp usability
Closes #2952.
2016-04-21 22:33:32 +08:00
ridiculousfish
413ac86da2 Don't ship libpcre2.a in the OS X installer package
This fix prevents the copy-to-install-path phase for this target
in Xcode by setting the SKIP_INSTALL flag.
2016-04-21 01:17:50 -07:00
David Adam
0f888ad4e6 CHANGELOG: flesh out some of the bigger changes in 2.3
[ci skip]
2016-04-19 22:16:02 +08:00
David Adam
43535cf5a5 Bump version for 2.3b1 2016-04-19 15:55:30 +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
Aaron Gyes
0fd3f5c0dd Update to pcre2 10.21
Point build tools at 10.21
2016-04-19 11:49:12 +08: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
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
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
ridiculousfish
d2ae00ca44 Remove a dead function bool_from_env_var 2016-04-07 13:29:50 -07:00
Fabian Homborg
8477126ae4 Correct true-color statement in set_color docs
- OSX Terminal does not support it

- We do some detection
2016-04-07 18:27:34 +02:00
David Adam
9c75546724 Update osx/config.h for removed ifdefs 2016-04-07 11:13:38 +08:00
David Adam
e1e1e558ce pcre2: add maintainer mode and disable by default 2016-04-07 11:07:44 +08:00
David Adam
c37c93fcf6 configure: remove tiny leftover from xsel build 2016-04-07 08:21:13 +08:00
Kurtis Rader
35e282928a clarify documentation for the source command
Make it clear that fish 2.3.0 changed how `$argv` is initialized.
2016-04-06 17:18:06 -07:00
Kurtis Rader
02f18cae0a fix setting of $argv for source w/no args
Fixes #139
2016-04-06 13:04:44 -07:00
Kurtis Rader
4ff8e6e781 change how redirections are formatted
Modify `fish_indent` to emit redirections without a space before the target of
the redirection; e.g., "2>&1" rather than "2>& 1" as the former is clearer to
humans.

Fixes #2899
2016-04-05 19:29:23 -07:00
Kurtis Rader
8e8b5a6481 augment the guide for contributing
Include information about how to deal with lint warnings and suppress
`clang-format` reformatting of blocks of code.

Move information only relevant to developers from the README.md to the
CONTRIBUTING.md document.

Closes #2901
2016-04-05 19:19:57 -07:00
David Adam
200a10e78d Rename "snippets" to "conf" internally, and document them as snippets
Discussed in #2896.
2016-04-06 09:33:09 +08:00
Mark Griffiths
9e93ddc097 Fix a couple of minor issues in string examples
Print correct return code in 2nd example
Remove syntax colouring in \cg

Signed-off-by: Mark Griffiths <mark@thebespokepixel.com>
2016-04-05 10:57:32 -07:00
Kurtis Rader
3435e94994 make the string man page more readable
I didn't notice when I merged commit cb6d5d76c8
by thebespokepixel.com that it removed the explicit wrapping in the `string`
man page. That makes `man string` harder to read so reinstate the explicit
wrapping.
2016-04-04 21:32:03 -07:00
Kurtis Rader
fd1b7ba529 support making fish code match the style guide
This changes implements two new make targets: `style` and `style-all`. These
make it easy to ensure that a change conforms to the project style guides for
C++ and fish code.

Fixes #571
2016-04-04 21:00:43 -07:00
Aaron Gyes
a4642f141f don't try to use st_gen (inode generation) number
Per discussion in pull-request #2891, it's not available on Linux (we just
fill it with zero), and unless run as root on OS X (or other BSD system) it
will be zero. Remove it from file_id_t. Also fix the initialization of the
file_id_t structure.

Fixes #2891
2016-04-04 20:17:05 -07:00
Kurtis Rader
8f33b55ccc remove unused special color "ignore"
Resolve lint warning about unused method "rgb_color_t::ignore()".

Fixes #2893
2016-04-04 16:55:40 -07:00
David Adam
484c1484c9 Customisable extra configuration, completion and function directories
- Add options to the autotools build to set the path for the "vendor"
   or "extra" configuration snippets, functions and completions
   directories.

 - Remove the vendor_completions directory from the Xcode build, as
   these are relocatable and compiling the paths in does not make sense.

This allows packaging tools like Homebrew and Nix to use a common
directory outside of the main prefix for third-party completions, and
to make these available for programmatic discovery through `pkg-config`.

Closes #2113
2016-04-04 15:58:13 -07:00
Mark Griffiths
cb6d5d76c8 update lexicon for latest docs
Closes #2699

Fixes issues with:
* 'string' function synopsis
* Redirection display issues
* Better file & path detection
* Rendering of % & @ chars in both html and man
* @ symbol in tutorial

Improves robustness by implementing an @EOL marker to prevent hold buffer dumping extra chars after the end of an expression.

Added new '{{' and '}}' meta-chars for when you want curly braces in a regexp that was previously tripping up the lexicon.

Improve man/html presentation consistency for
* string
* printf
* prompt_pwd
* type

Use cli-styling for 'practical' examples.

Add <bs> tag for presenting content with preceding backslash.

Signed-off-by: Mark Griffiths <mark@thebespokepixel.com>
2016-04-04 15:23:56 -07:00