Commit Graph

5714 Commits

Author SHA1 Message Date
Fabian Homborg
5accc7c6c5 Fix funced's tmpfile generation on OSX
OSX mktemp... isn't great, so work around that fact.
2016-05-23 00:49:09 +02:00
Fabian Homborg
60317190bd Check validity of fish_key_bindings
This potentially leads to an unusable session (when fish_key_bindings is
set in config.fish to a value without corresponding function), so we
should take care.
2016-05-22 19:56:47 +02:00
David Adam
6594c061be Merge branch 'Integration_2.3.0' 2016-05-20 23:48:12 +00:00
David Adam
216a45edee Bump version for VERSION 2016-05-20 22:48:00 +00:00
David Adam
7828f2303a osx/config.h: update to match current configure output 2016-05-20 22:44:47 +00:00
David Adam
245be2c2e4 CHANGELOG: update for 2.3.0 2016-05-20 22:37:30 +00:00
Jorge Bucaran
14b953e414 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.

(cherry picked from commit 08c29727e0)
2016-05-20 21:02:56 +00:00
James Campos
432c0058a9 [doc] move regex example (#3045)
this example uses regex, so it should not be in the glob examples
2016-05-20 15:57:29 +02:00
Kurtis Rader
7c24369454 fix building on Cygwin
Cygwin still doesn't support any of the backtrace functions. Also, remove a
spurious newline from a debug message.

Fixes #2993
2016-05-19 19:27:22 -07:00
Kurtis Rader
46be5ac468 make fish buildable on OS X Snow Leopard
I noticed that the `test_convert()` function was randomly failing when
run on OS X Snow Leopard. I tracked it down to the `mbrtowc()` function on
that OS being broken. Explicitly testing for UTF-8 prefixes that identify
a sequence longer than four bytes (which the Unicode standard made illegal
long ago) keeps us from having encoding errors on those OS's.

This also makes the errors reported by the `test_convert()` function actually
useful and readable.

Lastly, it makes it possible to build fish on OS X Snow Leopard.
2016-05-19 18:42:34 -07:00
ridiculousfish
ade6ebf522 Update docs to reflect new if/while condtion chaining
Documents new behavior in #1428

Cherry picked from 30ea7cc3f8
2016-05-19 13:03:06 -07:00
ridiculousfish
30ea7cc3f8 Update docs to reflect new if/while condtion chaining
Documents new behavior in #1428
2016-05-19 13:01:12 -07:00
Fabian Homborg
573b3797a5 Improve asp's package completion 2016-05-19 14:52:38 +02:00
Fabian Homborg
a0b3b8ac4c Add networkctl completion
Very simple, but effective.
2016-05-19 14:50:25 +02:00
Fabian Homborg
4d63ebde15 Remove stray "=" from completions. 2016-05-19 14:29:04 +02:00
Fabian Homborg
9cee3f13a1 Implement src:dest for git push completion
This allows specifying a local branch to push to a certain remote
branch.

Fixes #3035.
2016-05-19 14:11:27 +02:00
Fabian Homborg
8dc74de92e Add completion for ip
This is quite ugly because the syntax is ugly, the documentation both
under- and overspecified at the same time (a BNF that isn't...) and it
has a lot of functionality.

But the completion works half-decent for `ip address`, so let's ship it.
2016-05-19 13:23:00 +02:00
David Adam
21fc2decd7 lint, style: use git plumbing commands
Rather than using porcelain commands, try using plumbing for a more
stable interface with less string munging.
2016-05-18 23:00:30 +00:00
David Adam
9192bf1db5 configure: fix _nl_msg_cat_cntr check 2016-05-18 22:39:20 +00:00
David Adam
7c2c516353 move convert_digit from fallback to common
It's not required as part of fallback functions any more.
2016-05-18 22:39:20 +00:00
David Adam
db18449f4c fallback: drop fallbacks for C99/C++0x wide character functions
Drops configure check for wcsdup, wcslen, wcscasecmp, wcsncasecmp,
wcwidth, wcswidth, wcstok, fputwc, fgetwc, and wcstol. Drop the fallback
implementations of these on non-Snow Leopard platforms.

Work on #2999.
2016-05-18 22:39:20 +00:00
David Adam
44757c81af fallback: remove fwprintf and friends fallbacks
All modern operating systems implement fwprintf, including NetBSD (which
introduced them in 2005).

Work on #2999.
2016-05-18 22:39:20 +00:00
David Adam
d0aa461587 fallback: remove sysconf fallback
sysconf was introduced in IEEE Std 1003.1-1988 (POSIX.1) and exists
on every system I can find.

Work on #2999.
2016-05-18 22:39:20 +00:00
David Adam
504b32f61b configure: drop fwprintf test
fwprintf would segfault on DragonFly BSD 1.4.0, released in January
2006. This was fixed by DragonFly BSD 1.4.4, released in April 2006. It
seems unlikely that anyone is still running a ten-year-old, unsupported
version, and hoping that fish will continue to build.

I've checked this in virtual machines.

Work on #2999.
2016-05-18 22:39:20 +00:00
David Adam
6a5d89669e configure: drop tests for ancient platforms
Work on #2999.
2016-05-18 22:39:20 +00:00
David Adam
e39628bbe9 configure: drop unnecessary feature flag checks
Work on #2999.
2016-05-18 22:39:20 +00:00
David Adam
f5dcb6a0cb configure: Use standard macro to enable Large File Support
Work on #2999.
2016-05-18 22:39:20 +00:00
David Adam
14187f9e3f configure: drop manual checks for __EXTENSIONS__
375bef4443 includes the appropriate
autoconf method of checking for this feature flag.

Work on #2999.
2016-05-18 22:39:20 +00:00
David Adam
9225b16d12 add (or restore) config.h to all files
The autoconf-generated config.h contains a number of directives which
may alter the behaviour of system headers on certain platforms. Always
include it in every C++ file as the first include.

Closes #2993.
2016-05-18 22:30:21 +00:00
Aaron Gyes
00e32a0909 Use fonts found on terminals for the web config.
Instead of just using Courier New across the board, have the
browser try several likely available fonts before defaulting
to the system's "monospace".

Thanks @MarkGriffiths
Fixes #2924
2016-05-18 11:21:14 -07:00
Kurtis Rader
73f2992a2e make debug() output more useful
This change does several things. First, and most important, it allows
dumping the "n" most recent stack frames on each debug() call. Second,
it demangles the C++ symbols. Third, it prepends each debug() message
with the debug level.

Unrelated to the above I've replaced all `assert(!is_forked_child());`
statements with `ASSERT_IS_NOT_FORKED_CHILD()` for consistency.
2016-05-17 14:52:55 -07:00
Kurtis Rader
d55113b5b5 trivial fix to fish_tests.cpp
Fix a minor bogosity I noticed while building fish on OS X Snow
Leopard. It's technically not a bug because only old compilers complain
about the original statement but this change makes the one line this
changes consistent with the rest of the fish code.
2016-05-16 21:06:29 -07:00
Kurtis Rader
51468b7646 add function --shadow-builtin flag
It's currently too easy for someone to bork their shell by doing something
like `function test; return 0; end`. That's obviously a silly, contrived,
example but the point is that novice users who learn about functions are
prone to do something like that without realizing it will bork the shell. Even
expert users who know about the `test` builtin might forget that, say, `pwd`
is a builtin.

This change adds a `--shadow-builtin` flag that must be specified to
indicate you know what you're doing.

Fixes #3000
2016-05-14 20:38:32 -07:00
Kurtis Rader
ff1d651415 rename get_is_interactive and remove stupid test
I'm doing this as part of fixing issue #2980. The code for managing tty modes
and job control is a horrible mess. This is a very tiny step towards improving
the situation.
2016-05-14 20:35:54 -07:00
ridiculousfish
768277a312 Remove the errant newline in __fish_cancel_commandline again
(cherry picked from commit 149e601743)
2016-05-13 23:19:53 +01:00
ridiculousfish
149e601743 Remove the errant newline in __fish_cancel_commandline again 2016-05-13 12:10:17 -07:00
Fabian Homborg
a998921f39 git: Complete reflog for reset 2016-05-13 16:18:29 +02:00
CoolOppo
3daccf3c22 fix typo in webconfig.py comment 2016-05-11 19:51:08 -07:00
Fabian Homborg
c63c88262b Indent git completion
It's about time I finally fixed my emacs config.
2016-05-11 15:06:10 +02:00
Fabian Homborg
fbe2cdc3c7 git completion: Complete commits for cherry-pick if at least three
characters are given
2016-05-11 15:05:56 +02:00
Fabian Homborg
b60ef72c3d git completion: Fix option-before-command for stash
Because it allows sub-subcommands, it has functions to determine which,
if any, is used. These were too simplistic.
2016-05-11 15:03:05 +02:00
Fabian Homborg
d2e79cf6f6 git completion: More stringification 2016-05-11 15:03:05 +02:00
Fabian Homborg
a38d5504ac git completion: Allow --pretty for more commands
This _should_ be all of them.
2016-05-11 15:03:04 +02:00
Fabian Homborg
76d24aa1bc git completion: Allow more than one arg to using_command
Now we can easily add an option to multiple commmands.

This should also fix some edgecases.
2016-05-11 15:03:04 +02:00
Fabian Homborg
a7605d584b git completion: Show commits for revert and tag --contains 2016-05-11 14:51:54 +02:00
Terje Larsen
4244a6e6fe Add git commit --fixup completions (#3021) 2016-05-11 13:33:22 +02:00
Kurtis Rader
b055b8440c enhance the key_reader program
The original `key_reader` program was useful but didn't do much that `xxd`
or `od -tx1z` didn't do. Furthermore, it wasn't built and installed by
default. This change adds features that make it superior to those programs
for decoding interactive key presses and makes it a first-class citizen
like the `fish_indent` program that is always available.

Fixes #2991
2016-05-10 14:11:30 -07:00
Kurtis Rader
14d7b1a0fa restyle the key_reader source 2016-05-10 14:11:30 -07:00
Kurtis Rader
3626c39398 fix the style of several functions
I'm going to modify these functions as part of dealing with issue #3000
and don't want those changes to be masked by running the files through
`make style`.
2016-05-08 16:27:15 -07:00
Kurtis Rader
0d1d324e9f only deal with files that exist
I noticed while working on an unrelated change that deleting a file caused
`make lint` to behave in an unexpected manner.
2016-05-08 12:08:23 -07:00