Commit graph

5505 commits

Author SHA1 Message Date
David Adam
e99c6104fe Bump version for 2.3.1 2016-07-03 19:38:28 +08:00
David Adam
d68c37b726 CHANGELOG: update introduction for 2.3.1
I can write good!
2016-07-03 19:35:55 +08:00
David Adam
e3ac6d3fe2 CHANGELOG: update for 2.3.1 2016-07-03 19:30:21 +08:00
Aaron Gyes
0fb434d372 fkr manual improvments. 2016-07-03 03:44:34 -07:00
Aaron Gyes
67f6a48a78 -D is only an option on master. 2016-07-03 03:04:50 -07:00
Aaron Gyes
52d8fdccff Fix docs 2016-07-03 02:03:35 -07:00
Aaron Gyes
de076f00f8 doc grammar: s/learning/learn 2016-07-03 02:03:19 -07:00
Aaron Gyes
30065d101b Update fish_key_reader docs
* Document all options
 * Document bind command output
 * Remove session output - it's enough to explain how one exits.
2016-07-03 02:03:15 -07:00
Aaron Gyes
f966248f16 string.fish: use if/else. Reindent. 2016-07-02 11:40:22 -07:00
Aaron Gyes
e597df70d7 Check if fish -c string will work first. 2016-07-02 11:05:04 -07:00
Aaron Gyes
c79e9c7d4e Lossless recompress of images with pngcrush+zopfli
And tweak RTF.
2016-07-01 14:58:56 -07:00
Aaron Gyes
75e7784f18 Fix env_universal_common.cpp filesize comparisons.
* use off_t instead of size_t for file size where it can mismatch
  st_size's type in stat.h (cherry-pick merge omitted this)
2016-07-01 14:16:42 -07:00
Aaron Gyes
8e7f0e781d Completion for string match --invert
Also adds descriptions for some other options which were absent.
2016-07-01 13:44:14 -07:00
Aaron Gyes
528b9fdcf2 Fix env_universal_common.cpp filesize comparisons.
* if (result == ULLONG_MAX) is always false, likely a typo as
  result is unsigned long, and the comment says ULONG_MAX.

* use off_t instead of size_t for file size where it can mismatch
  st_size's type in stat.h
2016-07-01 13:43:52 -07:00
Aaron Gyes
edee3e5eb2 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-07-01 13:41:06 -07:00
Aaron Gyes
c9caee37b4 Fix fish_indent leaving colors set/messing up type
After the colorized syntax output in type -a foo, "foo is /usr/..."
would also be colored. (or 'test' in fish_indent foo.fish; echo test).

Make fish_indent reset the color when it's done.
2016-07-01 06:45:16 -07:00
Aaron Gyes
bc693bd4e0 fish_indent type -a's function output and colorize
Doesn't colorize if output is redirected.
This is "fun" and indenting happens to make most of the included
functions display more narrow and fit better into a terminal window.
2016-07-01 06:45:03 -07:00
Aaron Gyes
ca6cda20a3 Fix fish_config in .app
* Export $__fish_bin_dir
* Fix incorrect bundle path in fish.cpp - fish is not in MacOS/ (it should be!)
2016-07-01 04:43:57 -07:00
Aaron Gyes
1fb4cc0e76 Fix history.cpp merge 2016-07-01 03:26:22 -07:00
Aaron Gyes
6a36144587 Rename things to avoid conflicts with headers
Was breaking builds

 * ncurses.h: can declare `char *const key_name'.
 * netbsd term.h: has `newline', `lines' macros.
2016-07-01 03:11:31 -07:00
Aaron Gyes
7e58a3982a string escape some eval calls 2016-07-01 00:08:46 -07:00
Aaron Gyes
431589a16a Use fish -c string ... as the string fallback.
We can again drop the prompt_pwd check.
2016-07-01 00:00:53 -07:00
Aaron Gyes
84b08a4fe3 Merge branch 'Integration_2.3.1' of https://github.com/fish-shell/fish-shell into Integration_2.3.1 2016-06-30 21:30:46 -07:00
Kurtis Rader
c429a585e4 backport the latest fish_key_reader from master
This includes the improvements to `fish_key_reader` as of commit
68e167d576 on the master branch. This makes
the program much friendlier to users.
2016-06-30 21:21:10 -07:00
Aaron Gyes
d69a68e265 Comment fixes. 2016-06-26 21:14:45 -07:00
Aaron Gyes
534c1287ca Add back prompt_pwd to solve empty output problem
..by not manipulating path at all if we do not have
the tools to do so.

Tag changes with better comments.
2016-06-26 20:54:04 -07:00
Aaron Gyes
81dee16d69 Add back prompt_pwd to solve empty output problem
..by not manipulating path at all if we do not have
the tools to do so.

Tag changes with better comments.
2016-06-26 20:25:11 -07:00
David Adam
a47b4b0e95 Rewrite error messages for incorrect TERM
(cherry picked from commit 0f3b4d2bd8)
2016-06-27 07:42:57 +08:00
Aaron Gyes
02f578a82d echo the no-string errors to stderr and return 1.
Fix output on launch

Drop __fish_urlencode.fish

Drop prompt_pwd.fish
2016-06-26 16:25:41 -07:00
Aaron Gyes
dfb4998778 Work around absent `string' in old fishies upgrading.
Improves experience during upgrades, accidentally running
an old fish with a new environment. No errors just from
printing a prompt. Fixes #3057.

Print helpful notice also when launching mismatched fish.

Autoloadable string.fish -- only create function if not builtin.
2016-06-26 16:25:41 -07:00
Aaron Gyes
ecf4517ffe Fix crash with empty $TERM
```
~ $ set -e TERM; fish
Assertion failed: (!is_missing), function c_str, file src/env.cpp, line 690.
fish: 'fish' terminated by signal SIGABRT (Abort)
```
2016-06-21 16:21:15 -07:00
Kurtis Rader
eb834f47ef put curses/terminfo vars into the environment
We need to actually export the curses/terminfo env vars in order for
`setupterm()` to be able to use them. While fixing this I reworked the
fallback logic implemented by @zanchey in response to issue #1060 in
order to simplify the logic and clarify the error messages.

This does not allow someone to change the curses/terminfo env vars after
the first prompt is displayed (you can but it won't affect the current
fish process). It only makes it possible to set `TERM`, `TERMINFO`, and
`TERMINFO_DIRS` in *config.fish* or similar config file and have them be
honored by fish.
2016-06-21 16:18:45 -07:00
Fabian Homborg
e0a627f99d Revert "Document clipboard bindings."
This was added by accident - the actual clipboard change is not included in 2.3.1, so this has no place there.

This reverts commit 00291c1c5a.
2016-06-21 17:45:38 +02:00
Fabian Homborg
8070cd81d6 npm completions: Check command npm existence
Really fixes #3158 and #3152.

(cherry picked from commit 10661bb024)
2016-06-21 17:43:55 +02:00
Fabian Homborg
00291c1c5a Document clipboard bindings.
(cherry picked from commit f9edcbbbe2)
2016-06-21 17:43:55 +02:00
Fabian Homborg
bc8ec46ef9 npm completions: Call command npm
npm is often wrapped by a function.

Fixes #3158.

(cherry picked from commit 3a0d417b9e)
2016-06-21 12:40:23 +02:00
Fabian Homborg
7e56d6385e History docs: Move descriptions to the corresponding options
This should clarify `--delete`s behavior without `--prefix` or
`--contains` a bit.

Fixes #3054.
2016-06-20 18:24:56 -07:00
Fahri Cihan Demirci
db0176b884 Add Purge Subcommand Completion for Apt (#3097) 2016-06-20 18:23:12 -07:00
Fabian Homborg
f63f6e54fa Make string match -rnv work
Fixes #3098.
2016-06-20 18:21:45 -07:00
Jens Fredskov
7cf6ef675a correct __fish_contains_opts to __fish_contains_opt (#3102)
Completion throws and error about the command `__fish_contains_opts` beings unknown. It seems to be a simple typo, as all other completions use `__fish_contains_opt`
2016-06-20 18:16:10 -07:00
Fabian Homborg
29664c42a0 git completions: Ignore stderr everywhere
This allows us to run git commands outside of a git repo.

Fixes #3114.
2016-06-20 18:11:26 -07:00
Fabian Homborg
8dc4b0d4b2 Merge pull request #3123 from moverest/completion
Extend autocompletion support
2016-06-20 18:05:01 -07:00
Boris Aranovich
cb74f0f60e Refine reading ssh_config (#3146)
https://www.freebsd.org/cgi/man.cgi?query=ssh_config&sektion=5
1. It is possible to add multiple whitespace characters between the keyword (i.e. Host) and the argument(s).
2. It is allowed to have a single = and whitespace between the keyword and the argument(s).
3. It is possible to add multiple host names under a single Host directive by spacing the names apart.

1. and 3. are actual conventions that we use in our team, and I couldn't get auto-complete working for fish without this modification.

Modification explained:
a. The space between Host(?:name)? and the \w.* was replaced by (?:\s+|\s*=\s*) to match any sequence of whitespace characters, or optional whitespaces with a single =, per spec.
b. Result of first replacement is piped through another string replace to switch duplicate whitespace characters to a single space, and then piped to be split by that space. This allows specifying several aliases or host names in a single Host/Hostname definition, also per spec.
2016-06-20 17:06:45 -07:00
Kurtis Rader
d8dd718695 remove unset vars from the environment
Remove vars from the environment that are no longer set. Simplify the code by
removing an unnecessary loop. Add some tests.

Fixes #3124
2016-06-20 17:00:36 -07:00
Kurtis Rader
4424909801 simplify, and fix, setting the current locale
Fix test setup bogosities. Specifically, they weren't hermetic with respect to
locale env vars.

Rewrite the handling of locale vars to simplify the code and make it more like
the pattern most programs employ.

Fixes #3110
2016-06-20 16:54:34 -07:00
Kurtis Rader
a243580cfa tty driver ignore lnext (\cV) and werase (\cW)
Configure the tty driver to ignore the lnext (\cV) and werase (\cW) characters
so they can be bound to fish functions.

Correct the `fish_key_bindings` program to initialize the tty in the same
manner as the `fish` program.

Fixes #3064
2016-06-20 14:28:14 -07:00
Aaron Gyes
693d6879d3 Travis: restore clang with trusty & included clang
Upgraded to using Tavis trusty dist (from precise)

Ubuntu's clang is only 3.4 though.

For fancy address, thread-sanitizer stuff, easier to do on OS X.
We can use the clang that comes with xcode 8 beta.
2016-06-20 03:27:32 -07:00
Aaron Gyes
ad7e9a8d56 Travis: clang 3.5.0 on Linux
https://docs.travis-ci.com/user/trusty-ci-environment

all trusty images have sudo, and actually it is required
to use this new Travis environment per docs. This makes
it actually do it. Clang is 3.5 now.
2016-06-20 03:24:23 -07:00
Fabian Homborg
d0fdc82fdf Tests: Add fish_mode_prompt to except_prompt
Without this, the interactive tests fail when they receive a mode_prompt
in vi-mode.
2016-06-20 11:30:10 +02:00
Kurtis Rader
82c56bc64b deal with broken ttys on MS Windows
The tty device timestamps on MS Windows aren't usable because they're always
the current time. So fish can't use them to decide if the entire prompt needs
to be repainted.

Fixes #2859
2016-06-19 22:05:01 -07:00