Commit Graph

7002 Commits

Author SHA1 Message Date
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
Kurtis Rader
6fd8dc44fb support test -k to test the sticky bit
Fixes #733
2017-03-14 21:43:15 -07:00
Kurtis Rader
6123d3cb50 document trap ... EXIT
Fixes #1180
2017-03-14 21:02:02 -07:00
Kurtis Rader
516e989464 mention string repeat in the change log 2017-03-14 19:44:07 -07:00
Kurtis Rader
085a9b9267 fix stupid typo introduced by d9b30ab09 2017-03-14 13:17:53 -07:00
Kurtis Rader
d9b30ab090 setenv should behave like export
Fixes #3897
2017-03-14 12:14:22 -07:00
Kurtis Rader
7ab1c6c7ad update CHANGES.md 2017-03-13 21:44:05 -07:00
Kurtis Rader
1afea1b650 add description to functions -m -v output
Fixes #597
2017-03-13 20:52:31 -07:00
Kurtis Rader
8efe88201e correct escape_string corner case
Fixes #3892
2017-03-13 20:38:57 -07:00
mus0u
b4f70cb98b include exit status indicator in robbyrussell sample prompt 2017-03-13 18:05:49 -07:00
Greynad
98f4e49669 Add string 'repeat' subcommand
This feature add the ability to repeat a string a given number of times.
For example: string repeat -n 3 foo
2017-03-12 20:30:36 -07:00
Kurtis Rader
e0f62c178f make not blocking signals the default
This is the next step in determining whether we can disable blocking
signals without a good reason to do so. This makes not blocking signals
the default behavior. If someone finds a problem they can add this to
their ~/config/fish/config.fish file:

set FISH_NO_SIGNAL_BLOCK 0

Alternatively set that env var before starting fish. I won't be surprised
if people report problems. Till now we have relied on people opting in
to this behavior to tell us whether it causes problems. This makes the
experimental behavior the default that has to be opted out of. This will
give us a lot more confidence this change doesn't cause problems before
the next minor release.

Note that there are still a few places where we force blocking of
signals. Primarily to keep SIGTSTP from interfering with the shell in
response to manipulating the controlling tty. Bash is more selective
in the signals it blocks around the problematic syscalls (c.f., its
`git_terminal_to()` function). However, I don't see any value in that
refinement.
2017-03-10 21:34:24 -08:00