Commit Graph

6724 Commits

Author SHA1 Message Date
Kurtis Rader
ce2d1c4e83 fix IWYU on FreeBSD 2017-02-12 20:36:37 -08:00
Alan Somers
ad6ea1691e Fix "mount -t" completions on non-Linux OSes
AFAICT Linux alone uses the "mount.XXX" convention for mount helpers.
Illumos, Irix, HPUX, OSX, and the BSDs all use "mount_XXX".

Fixes issue #3841
2017-02-12 18:05:37 -08:00
ridiculousfish
2ea2a4c831 Make error color in tutorial a more pastel red 2017-02-12 15:41:31 -08:00
ridiculousfish
67c18c77d0 'Correct' error to eror in lexicon_filter
This changes the error examples in the tutorial to properly show in
red
2017-02-12 15:39:22 -08:00
Kurtis Rader
813415302a fix clear screen invocation
It's necessary to use a subcommand to eat the newline that `string
replace` appends to the string.
2017-02-12 14:12:12 -08:00
Clément Martinez
cbea0b9378 mount & udisksctl: improve -o completions` (#3764)
* mount & udisksctl: improve `-o` completions`

* Update __fish_complete_mount_opts
2017-02-12 15:23:41 +01:00
Markus Reiter
d93e57a3f9 Add export PATH entry to changlog. 2017-02-12 15:20:07 +01:00
Markus Reiter
f38646593c Allow export to set colon-separated PATH, CDPATH and MANPATH. 2017-02-12 15:20:07 +01:00
Fabian Homborg
9598218a94 Don't call fish in the background to generate completions
Fixes #3803 even harder.
2017-02-12 14:56:36 +01:00
Fabian Homborg
afdd1a98c1 Don't clear scrollback with the \cl binding
ncurses since 6.0 sends the "E3" sequence along with "clear", even for
just `clear` or `tput clear`. This deletes the scrollback buffer which
is usually not what you want.

Fixes #2855.
2017-02-12 12:01:28 +01:00
Kurtis Rader
9cae25d1eb correct test for IWYU command
I noticed this when testing what `make lint-all` would output on FreeBSD
12 which does not have a symlink from `iwyu` to `include-what-you-use`.
2017-02-11 21:30:38 -08:00
Kurtis Rader
4ffb0adb78 lint cleanups 2017-02-11 21:30:38 -08:00
Fabian Homborg
52648acdc8 Check python version at runtime for completions
Some things like pyenv can change what `python` refers to, so what we
detect when we load the completions can become invalid later.

Also mentioned in #3840.
2017-02-11 16:07:06 +01:00
Fabian Homborg
f9664f224d Don't wrap pythonX completions
The issue here was that the `python` completion did a version check on
the `python` binary, so it would complete python2 stuff if system
python was py2, even if the user tried to complete `python3`.

This isn't beautiful, but it's more resilient than e.g. doing magic
with `commandline`.

Fixes #3840.
2017-02-11 16:07:06 +01:00
Kurtis Rader
0a929f7a0b don't export COLUMNS/LINES unless already exported
Fixes #3839
2017-02-10 15:20:09 -08:00
Markus Reiter
3e35e6e488 Use string split in alias. 2017-02-10 14:09:41 +01:00
Kurtis Rader
af7f5f42b6 put upper bound on data read will consume
This puts a hard upper bound of 10 MiB on the amount of data that read
will consume. This is to avoid having the shell consume an unreasonable
amount of memory, possibly causing the system to enter a OOM condition,
if the user does something non-sensical.

Fixes #3712
2017-02-09 21:04:46 -08:00
Kurtis Rader
f27407bbf9 correct German translation strings
Fixes #3834
2017-02-09 13:32:30 -08:00
Fabian Homborg
214c677032 Remove outdated completions
These are dead projects with completions that didn't provide much
value.

Fixes #3662.
2017-02-09 18:42:55 +01:00
Cristian Prieto
2bbecf4292 Yarn completion (#3816)
* Add main yarn commands and subcommands

* Add more short/long options

* Add subcommands for most main commands

* Add suboptions for mutext and access
2017-02-09 17:24:38 +01:00
Kurtis Rader
0541a34201 improve bash command history importing
Fixes #2091
2017-02-08 20:50:57 -08:00
Jeff Dickey
cf63d1b2a7 added mocha.fish 2017-02-08 14:22:30 -08:00
Andrei Dziahel
85ba4e0142 Fix colors table (#3826)
* color: make brgrey really grey

The 0055 value is actually 0x2d which isn't 0x55 mentioned further and is probably a typo

* color.cpp: reformat color table

Tidy color table up and also fix hex number case for grey color. This should ease spotting errors like one from previous commit.
2017-02-08 13:49:19 -08:00
Kurtis Rader
9b24d26972 document creating - abbreviation in FAQ 2017-02-08 13:22:47 -08:00
Kurtis Rader
0970cc8736 time for another make style-all 2017-02-07 21:52:35 -08:00
Kurtis Rader
616d301083 set stdout to unbuffered if attached to a tty
Fixes #3748
2017-02-07 21:01:22 -08:00
ridiculousfish
162053ed8d Make history file rewriting be more lock savvy
We now are stingier with taking history file locks - if the lock
is held too long we may just break it. But the current file save
architecture holds the lock for the duration of the save. It also
has some not-quite-right checks that can cause spurious failures in
the history stress test.

Reimplement the history save to retry. Rather than holding the lock,
rewrite the file to a temporary location and then take the lock. If
the history file has changed, start all over.

This is going to be slower under contention, but the advantage is that
the lock is only held for a brief period (stat + rename) rather than
across calls to write().

Some updated logic also fixes spurious failures that were easy to observe
when tsan was enabled. These failures were due to failing to check if the
file at the path was the same file we opened.

The next step is to move the history file saving to a background thread
to reduce the chances of it impacting user's typing.
2017-02-06 11:04:07 -08:00
ridiculousfish
f9371899a1 Including missing atomic header in history.cpp 2017-02-06 10:51:27 -08:00
ridiculousfish
56b60fab4b Improve history's save_internal_via_appending
Allow retrying, fix an issue where we trip over our own changes
by thinking the file has changed when we are responsible for changing
it, and improve some commenting
2017-02-06 10:39:07 -08:00
ridiculousfish
b91a2dd0bb Factor map_fd out of map_file
Will enable us to map an already-opened file
2017-02-06 10:09:31 -08:00
ridiculousfish
83f386347f Make file_id_for_fd return kInvalidFiledID when passed a negative fd
Rather than making fstat do this, make it explicit.
2017-02-06 10:01:33 -08:00
ridiculousfish
6eb1e31070 Add some safety to history_file_lock
Use an atomic to avoid TSAN complaints, and ensure that we don't
leave the file locked if we've decided to give up on locking.
2017-02-06 10:00:34 -08:00
ridiculousfish
e3c538a991 Simplify history_output_buffer_t
This class is used to accumulate data to be written to the history
file. It has some dubious optimizations around trying to track an
offset separately from the size of the buffer. After some investigation
these aren't helping, vector behaves fine on its own. So just make
this a simple wrapper around vector.
2017-02-06 10:00:01 -08:00
René Schwaiger
908ed493cc Fix wildcard bug in __fish_print_filesystems
Before this change the function `__fish_print_filesystems` would print
an error message about an empty wildcard match for the pattern
`$PATH/mount.*`, if the current operating system does not include any
helper binaries for the command `mount`. An example for such an OS is
the current version of macOS (version 10.12).
2017-02-06 08:08:54 -08:00
Rabah Meradi
a5e8b81ee3 Add completion for climate 2017-02-05 19:22:35 -08:00
Kurtis Rader
c4f2210cc5 cache prompts and escape sequences we've seen
Cache the escape sequences we've seen when checking for those which
don't take any visual space when writing the prompt or similar strings.
This reduces the cost of determining the true cost of such strings by a
full order of magnitude if they include lots of such escape sequences.

Periodically sort the cached escape sequence lengths based on feedback
from cache hits so that we're always checking for the most likely
sequence lengths first.

Also cache the prompt layouts to avoid doing the calculations if the
prompt doesn't change.

Fixes #3793
2017-02-05 18:31:14 -08:00
Kurtis Rader
6d72d538a6 refactor escape_code_length()
Step one in addressing issue #3793
2017-02-05 18:31:14 -08:00
Aaron Gyes
279ec88351 Fix PR template typo
Thanks @sanssecours for noticing.
2017-02-05 10:39:51 -08:00
ridiculousfish
8a09c99f36 Escape in vi mode to end paging, but stay in insert mode
Change the escape key binding in insert mode (in vi key bindings)
to check if we are in paging mode. If so, emit cancel and stay in
insert mode. Otherwise perform the current behavior of switching
back to default mode and adjusting the cursor.

Fixes #2871
2017-02-05 02:49:52 -08:00
ridiculousfish
56161250de Make a missing --sets-mode property for a key binding do nothing
Currently, if bind is run with --mode but not --sets-mode, the
binding gets an implicit --sets-mode equivalent to the mode. This
is usually unobservable but it may matter if the mode is changed
by some internal part of the binding (e.g. set fish_bind_mode...)
then that setting will be lost after the binding is complete.
2017-02-05 02:49:45 -08:00
David Adam
41a49b014a Makefile: use recursively expanded variable for the list of manpages
Restores the installation of manual pages when running `make install`
without running `make` first, a bug introduced with 417255fc.

Closes #3813.
2017-02-05 14:22:16 +08:00
David Adam
8339e28cfe build_tools/list_committers_since.fish: tool for showing new & returning committers 2017-02-04 21:04:03 +08:00
Fabian Homborg
b3d5fb71f4 completion generator: Protect against undefined variable
Proc wasn't defined if $MANPATH was used.

Fixes #3808.
2017-02-03 18:32:14 +01:00
Fabian Homborg
94b71353ef completion generator: Define parent_paths directly if MANPATH is set 2017-02-03 18:32:14 +01:00
David Adam
3e17b8fccc add CHANGELOG note to pull request template
[ci skip]
2017-02-03 21:17:25 +08:00
David Adam
40428f592d bump metadata following 2.5.0 release
[ci skip]
2017-02-03 21:17:17 +08:00
David Adam
49e98cde4c Merge branch 'Integration_2.5.0' 2017-02-03 21:14:40 +08:00
David Adam
708d6b6911 Bump version for 2.5.0 2017-02-03 09:46:58 +08:00
David Adam
c3dddee804 CHANGELOG: updates for 2.5.0 2017-02-03 09:44:59 +08:00
Clément Martinez
47ad707bba Add jq completions 2017-02-02 23:07:54 +01:00