Commit Graph

5680 Commits

Author SHA1 Message Date
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
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