Commit Graph

6863 Commits

Author SHA1 Message Date
Kurtis Rader
89efa9a8b1 update changelog to reflect prior two commits 2017-04-11 19:33:31 -07:00
Kurtis Rader
fae1a398bd document new read --silent flag 2017-04-11 19:30:12 -07:00
Marc Garcia Sastre
8213885491 Capture read command contents without displaying it via a silent flag.
Implement a `read --silent` flag. This echos the input using an
obfuscation character.
2017-04-11 19:06:48 -07:00
Kurtis Rader
da09a915f2 improve __fish_complete_directories function
Reviewing a PR for a completion script caused me to look at the
implementation for the `__fish_complete_directories` function. Which in
turn lead me to create this change to improve its implementation and add
unit tests for the function.
2017-04-11 13:45:53 -07:00
Fabian Homborg
2a2ccea24e Document special-paste 2017-04-11 14:42:36 +02:00
Alan Somers
ed6298ad17 Fix portmaster completions when there are no matches
Don't spew warnings when there are no matches.  Also, use the string
builtin instead of calling sed.

Fixes #3949
2017-04-10 21:37:54 -07:00
Kurtis Rader
252c821cb3 contributing doc cleanup 2017-04-09 20:52:50 -07:00
Kurtis Rader
8440308470 two more /tmp references that aren't necessary
Eliminate two more references to /tmp as part of removing our dependency
on /tmp being a valid directory.
2017-04-08 21:47:05 -07:00
Kurtis Rader
49518b71ab low level tests should not depend on /tmp
The low level tests should not depend on /tmp being a valid directory.
2017-04-08 21:13:34 -07:00
Fabian Homborg
702de29549 fish.spec.in: Remove which dependency
Also changelog
2017-04-08 13:25:26 +02:00
Fabian Homborg
757a95123d configure.ac: Replace which with command -v
This allows us to drop `which` as a makedependency.
2017-04-08 13:21:04 +02:00
Fabian Homborg
6ab46bb8db Reword which changelog entry
It's still used by configure, so it is still a compile-time dependency.
2017-04-08 13:21:04 +02:00
Fabian Homborg
ddb9350ea9 Replace use of which with command -sq 2017-04-08 13:21:04 +02:00
Kurtis Rader
03571b82be cleanup env code and contains()
Switch from null terminated arrays to `wcstring_list_t` for lists of
special env var names. Rename `list_contains_string` to `contains` and
modify the latter interface to not rely on a `#define`.

Rename `list_contains_string()` to `contains()` and eliminate the
current variadic implementation. Update all callers of the removed
version to use the string list version.
2017-04-05 17:09:12 -07:00
Kurtis Rader
75600b6b53 fix setenv and add unit tests
Fixes #3937
2017-04-05 15:31:13 -07:00
Rory O’Kane
35e1d1e2d8 Fix deprecated flags in history example in docs
Update the Example section in the documentation for the `history` command so that it uses the subcommands instead of the deprecated long options.
2017-04-05 19:55:58 +02:00
Kurtis Rader
a4f925d822 empty path components are equivalent to "."
There are at least three env vars describing a sequence of paths to be
searched where an empty path element is implicitly equivalent to ".".
This change converts the implicit "." to explicit whenever the variable
is imported or set. This makes the variable much easier to use in fish
scripts.

Fixes #3914
2017-04-04 17:32:45 -07:00
Fabian Homborg
3edb7d538f Improve bg argument handling
- Error out if anything that is not a PID is given

- Otherwise background all matching existing jobs, even if not all
  PIDs exist (but print a message for the non-existing ones)

Fixes #3909.
2017-04-04 14:59:43 +02:00
Fabian Homborg
b5a38ca96b Changelog #3922/#1362 2017-04-01 22:44:12 +02:00
Fabian Homborg
cd16676911 Make "trying to match mapping" debug priority 4
Instantly makes debug output _much_ more usable.
2017-04-01 10:43:01 +02:00
Fabian Homborg
d7ef7eb484 Also give subshells the terminal
Fixes #1362.
2017-03-31 19:34:42 -07:00
SanskritFritz
2105bae1fc Completions for ipset 2017-04-01 01:52:05 +02:00
SanskritFritz
0c265c0f52 Obnam completions updated 2017-04-01 01:52:05 +02:00
SanskritFritz
cd8982b645 Obsolete completions removed 2017-04-01 01:52:05 +02:00
Kurtis Rader
c0de8afaf3 untokenize string before printing it
Fixes #3915
2017-03-28 19:15:08 -07:00
Kurtis Rader
62244f01c2 fix umask handling of symbolic modes
This fixes the handling of symbolic umask values. It also removes two
invocations of `perl` and all but two `math` commands.

Fixes #738
2017-03-28 16:28:24 -07:00
Fabian Homborg
2b4ab19d47 CHANGELOG: which dep removal 2017-03-28 15:57:13 +02:00
Fabian Homborg
4b9424eb20 type: Minor reformatting
Empty lines after `if` and `if begin`.
2017-03-28 15:55:10 +02:00
Fabian Homborg
c4d69ea8a1 type: Rewrite option parsing
Removes a call to `seq` and makes it a bit more readable.
2017-03-28 15:55:10 +02:00
Fabian Homborg
a3f28e221f type: Remove need for which
This should be completely equivalent without needing an external command.
2017-03-28 15:55:02 +02:00
Kurtis Rader
765891cc4e clarify where to post questions
We've gotten feedback from the Stackexchange team that too many fish
questions asked on stackoverflow don't really belong there. So clarify
the README to also point users at superuser for questions not related to
fish script.
2017-03-27 17:53:47 -07:00
ridiculousfish
dec0f7aa84 Make s_generation_count a std::atomic
This should improve safety and satisfy tsan
2017-03-26 13:44:27 -07:00
ridiculousfish
44b3554a11 Reorder a lock to prevent a potential deadlock in uvars
A call to default_vars_path() takes the environment variable
lock while the uvars lock is held. Ensure that doesn't happen by
deferring the uvars lock to later in the function.
2017-03-26 13:22:23 -07:00
ridiculousfish
9f13edbe4a Fix a buffer overflow in cached_esc_sequences_t::find_entry
cached_esc_sequences_t::find_entry was constructing a wcstring
from a c string, using lengths longer than the length of the cstring.

Detected with asan.
2017-03-26 12:55:15 -07:00
Fabian Homborg
3d6c4adda9 Fix unescaped ' literals in bracketed-paste
This was a case of a missing \\.

Fixes #3913.
2017-03-26 09:33:11 +02:00
Kurtis Rader
38c851f4cf let read take a simple string for the prompt
Fixes #802
2017-03-25 20:24:43 -07:00
Fabian Homborg
e1c3ec25ab Document snippet sourcing order
Fixes #3099.
2017-03-23 17:46:11 +01:00
Kurtis Rader
542962bc69 document events are per fish process
Fixes #2954
2017-03-22 20:53:39 -07:00
Kurtis Rader
ae0321778f empty CDPATH elements are equivalent to "."
In the process of fixing the issue I decided it didn't make sense to
have two, incompatible, ways of converting variable strings to arrays.
Especially since the one I'm removing does not return empty array elements.

Fixes #2106
2017-03-22 19:30:42 -07:00
Fabian Homborg
570a6430ad Update changelog
- Mention setenv

- Don't mention bracketed paste twice, group paste-related changes together
2017-03-22 14:41:09 +01:00
Fabian Homborg
83791a26c3 Stringify mkinitcpio completions
Also fixes an issue with the -k completions.
2017-03-21 01:31:26 +01:00
Fabian Homborg
2118973251 Document \cn/\cp bindings
We want to downplay this in favor of the arrow keys, but mentioning it
is still the right thing to do.

Supersedes #3879.
2017-03-20 16:49:29 +01:00
Fabian Homborg
70354f9f5e Add bind --list-modes option
Fixes #3872.
2017-03-20 16:42:53 +01:00
Kurtis Rader
536b1220fd cleanup __fish_complete_man.fish
I looked at this and noted some problems fixed by this change in
response to exploring if issue #726 was still unresolved.
2017-03-18 21:55:02 -07:00
Fabian Homborg
b6517250c7 vi-mode: \cd should do delete-or-exit
This just removes the special vi binding and hence falls back upon the
shared one.

Fixes #2219.
2017-03-17 12:07:10 +01:00
Kurtis Rader
a811ae25dc don't preemptively send SIGPIPE
Fixes #1926
2017-03-16 18:59:34 -07:00
Fabian Homborg
29429874b3 Update changelog with the paste changes 2017-03-16 16:13:19 +01:00
Fabian Homborg
99e87dded3 Auto-escape pastes inside single-quotes
This is to make pasting literals easier.

When a user pastes something, we normally take it as-is.

The exception is when a single-quote is open, e.g. the current token
is

    foo'bar

When something is pasted here, we escape single-quotes (`'`) and
backslashes (`\\`), so typing a `'` after it will turn it into a
literal token.

Fixes #967.
2017-03-16 16:08:13 +01:00
Kurtis Rader
84cf391faa style cleanups 2017-03-15 14:06:58 -07:00
Kurtis Rader
f0469d829a string repeat of an empty string is an error
Fixes #3898
2017-03-15 13:55:53 -07:00