Commit Graph

11870 Commits

Author SHA1 Message Date
Rosen Penev
aff6a74770 [clang-tidy] use emplace_back
Found with hicpp-use-emplace

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-02-22 09:33:17 +01:00
Rosen Penev
1f01423f46 [clang-tidy] use dynamic_cast for unrelated types
Found with cppcoreguidelines-pro-type-static-cast-downcast

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-02-22 09:33:17 +01:00
Rosen Penev
aae9ebfbd4 [clang-tidy] use using instead of typedef
Found with modernize-use-using

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-02-22 09:33:16 +01:00
Rosen Penev
dd704ae30c [clang-tidy] pass-by-value
Found with modernize-pass-by-value

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-02-22 09:33:16 +01:00
Rosen Penev
b266370428 [clang-tidy] convert to range for loops
Found with modernize-loop-convert

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-02-22 09:33:16 +01:00
Fabian Homborg
4f4c9aac34 FAQ: Reword history substitution entry
[ci skip]
2020-02-21 19:52:42 +01:00
Fabian Homborg
fdfb8f67d9 FAQ: Remove non-frequently asked questions
I don't think I've ever had anyone ask about our usage of unicode
private use characters.
2020-02-21 19:48:20 +01:00
Fabian Homborg
415cbb9e0b FAQ: Add question about mode prompt
This is actually a frequently asked question.
2020-02-21 19:45:14 +01:00
Fabian Homborg
1106706927 cmake: Remove commented autotools code 2020-02-21 19:33:06 +01:00
Fabian Homborg
e5d50db215 Add missing include to fish_test_helper
This broke the build on new-ish gcc

Fixes #6632.
2020-02-20 21:53:45 +01:00
ridiculousfish
9538b8bf73 Give fish_test_helper slightly better argument parsing and help 2020-02-20 11:51:02 -07:00
Fabian Homborg
fb7af4eff2
Merge pull request #6581 from brunelli/master
Fix flatpak completion
2020-02-20 19:15:48 +01:00
Fabian Homborg
8195889dba completions/mvn: Shorten descriptions
Bleedin' heck these were long and useless!

[ci skip]
2020-02-20 19:13:16 +01:00
Maya Rashish
934f708ef6 cmake: adjust logic for TPARM_VARARGS
- Define it before the headers so they can pick the variadic tparm
prototype.
- We need a TPARM_VARARGS define, add it to config_cmake.h.
- Move & adjust comment - put it near the code, and mentiont that
NetBSD curses doesn't need the kludge.

Now variadic tparm is used on NetBSD instead of the Solaris kludge.
2020-02-20 18:14:54 +01:00
Fabian Homborg
ee943a0821 Make unusable path warnings their own FLOG category
Fixes #6630.
2020-02-20 17:30:14 +01:00
ridiculousfish
05b8d4de97 Make hup_background_jobs accept the job list directly 2020-02-19 20:35:04 -07:00
ridiculousfish
59c6663a16 Migrate the "are you sure you want to exit" logic from parse_execution to exec
This feels more like the sort of logic that should live in the point where
jobs are executed, instead of where jobs are created from parse trees.
2020-02-19 18:25:36 -07:00
ridiculousfish
1c8093fc50 Bravely remove the "temporary backgrounding" code
Prior to this commit, when executing a builtin, we mark the job as not
foreground. After this commit we no longer modify the foreground state
of the job just for the builtin.

There was the following comment:

    // Since this may be the foreground job, and since a builtin may execute another
    // foreground job, we need to pretend to suspend this job while running the
    // builtin, in order to avoid a situation where two jobs are running at once.

The concern seemed to be in the `bg` and `fg` builtins, which might attempt
to foreground or background the jobs associated with `bg` and `fg` themselves.
But the builtins run before the job is marked constructed, so it cannot
actually happen.

Bravely remove this code.
2020-02-19 18:25:36 -07:00
Aaron Gyes
85a0ca66e0 We no longer have two doc systems, move sphinx_doc_src back to doc_src 2020-02-19 17:00:35 -08:00
Aaron Gyes
4e883aa045 Tell github about sphinx documentation for the language stats 2020-02-19 16:52:42 -08:00
Aaron Gyes
cc5550c458 Move pcre2-10.34 to pcre2/ 2020-02-19 16:42:08 -08:00
Alexandre Badez
7172bd38b3 Correction link in doc. 2020-02-19 15:22:37 +01:00
ridiculousfish
900fcd9a23 Merge branch 'MacBundledPCRE+Notarization'
This merges a set of changes to improve macOS compatibility, with code
signing and notarization.
2020-02-18 14:58:52 -07:00
ridiculousfish
21af36d5a7 Add an entitlements file to MacApp
Allows our notarized app to send AppleEvents
2020-02-18 12:56:54 -07:00
ridiculousfish
fbb0f79992 Set the minimum Mac deployment version
Use 10.9, the first with libc++.
2020-02-18 12:55:11 -07:00
ridiculousfish
f6fc5afc59 Add a script to help notarize Mac build artifacts
This makes the Mac release process less painful.
2020-02-18 12:55:11 -07:00
ridiculousfish
d989ce72d0 Teach make_pkg.sh to codesign
It respects MAC_CODESIGN_ID and MAC_PRODUCTSIGN_ID variables.
2020-02-18 12:55:11 -07:00
ridiculousfish
ba0c2d48d1 Teach CMake to code sign Mac executables
Perform an ad-hoc code signing with the hardened runtime.
This ensures that these executables can pass notarization.

The code signing ID is controlled by the MAC_CODESIGN_ID CMake
cache variable.
2020-02-18 12:55:11 -07:00
ridiculousfish
952d9eecf7 Always use bundled PCRE on Mac
A code-signed fish cannot load a PCRE that is not codesigned, which can
easily come about through Homebrew.
2020-02-18 12:55:11 -07:00
Aaron Gyes
b418e36f22 Take an axe to vendored PCRE2 bits & update it to 10.34
This commit updates PCRE2 to 10.34, and we no longer include what's in their
tarball as-is. I've yanked out a lot of uneccessary stuff for the sake of the
size of our codebase.

original pcre2-10.34 dir: 11.5MB
pcre2 dir in this commit:  1.6MB

 * Remove documentation, makefiles, test suites, etc. LICENSE remains.
 * Disable building tests when configuring PCRE2
 * Yard out JIT support: delete src/jit, src/pcre2_jit_*.c, and code doing
   stuff to code->executable_jit that needs a jit header (it was already NULL
   because we've always built with JIT disabled).
 * Remove most .c and .h files not needed to compile: pcre2grep code,
   pcre2test code, dftables.c, pcre2_printint.c, pcre2_fuzzsupport.c ...
 * Remove FindBZip2, FindZLIB, FindReadline, FindEditline. These were used
   only by pcre2grep and made CMake's report misleading with regard to
   optional packages being used.
 * Remove configure.ac except for version number and date which CMake checks

Next time we update PCRE2, refer to this commit message as well as a diff
between pcre2-10.34.tar.gz and ./pcre2-10.34/. Or better yet, cease including
pcre2.
2020-02-18 08:16:15 -08:00
David Adam
2f8c6f35b9 fish.spec: tidy up documentation entries 2020-02-18 22:02:13 +08:00
David Adam
45fb2024f8 completions: drop shebang from non-executable files
These completion files do not get marked as executable, so they don't
need a shebang.
2020-02-18 21:34:19 +08:00
Mahmoud Al-Qudsi
535845861a __fish_describe_command: print only exact match and exit
Mimic the behavior of Linux's `apropos -e` and ~BSD's `apropos -f` with
the awk script by disallowing trailing characters in the name of the
manpage as compared to the original input string. Apart from being
faster (by aborting earlier and stopping `apropos` by breaking the pipe
after the first match), it's also more correct.
2020-02-17 20:22:39 -06:00
Mahmoud Al-Qudsi
3c7019b335 __fish_describe_command: check for apropos only at startup 2020-02-17 20:13:39 -06:00
Mahmoud Al-Qudsi
5510443f48 __fish_describe_command: Remove regex escape hack 2020-02-17 20:13:30 -06:00
Fabian Homborg
fba4363c1d Stop fish --no-execute harder from executing stuff
I'm not quite sure what it executed - I think it's just constructing jobs and
stuff, but it did show up in the profile - 21% spent on "job_reap".
2020-02-17 14:26:30 +01:00
Fabian Homborg
65883e0e40 Restyle
Mostly line breaks, one instance of tabs!

For some reason clang-format insists on two spaces before a same-line comment?

(I continue to be unimpressed with super-strict line length limits,
but I continue to believe in automatic styling, so it is what it is)

[ci skip]
2020-02-17 14:14:05 +01:00
Fabian Homborg
4cefcd4327 CHANGELOG --no-execute fix 2020-02-17 11:40:56 +01:00
Fabian Homborg
5f9c33b50a Don't time --no-execute
This made some output for non-execution.

See #977.
2020-02-17 11:39:53 +01:00
Fabian Homborg
3f5c60e634 Silence some errors for fish --no-execute
It used to error out when a command wasn't known, even when it was a
function that would only be discovered via autoloading.

Now we just accept that a command doesn't exist when no-execute is
given - we're not gonna execute it anyway.

Also, in the same breath stop counting empty commands after expansion
and empty wildcard expansions as errors - these depend on runtime
values, so we can't verify them without executing.

Fixes #977.

(note that it still executes "time", but that's another commit)
2020-02-17 11:39:53 +01:00
Jason Nader
a619f69b15 Rename functions to match others 2020-02-17 09:55:05 +01:00
Jason Nader
c79c860b14 grammar nit 2020-02-17 09:52:10 +01:00
Fabian Homborg
63b4a891ff completions/optipng: Add missing quote
Oops!

This should be in 3.1.1!

cc @zanchey
2020-02-17 08:57:41 +01:00
Fabian Homborg
aba900a71f Reallow "2>>&1" as a redirection
Appending to an fd doesn't really make sense, but we allowed the
syntax previously and it was actually used.

It's not too harmful to allow it, so let's just do that again.

For the record: Zsh also allows it, bash doesn't.

Fixes #6614
2020-02-17 08:57:41 +01:00
Fabian Homborg
96587d26f5 completions/rbenv: Fix error spew
Fixes #6617
2020-02-17 08:57:41 +01:00
Johannes Altmanninger
7517128b68 Update exports when an exported universal variable changes
Fixes #6612
2020-02-16 18:51:19 +01:00
David Adam
7e6baab153 debian packaging: explain need for buildsystem argument to dh 2020-02-16 20:58:27 +08:00
David Adam
a85ffb40f9 debian packaging: drop some obsolete requirements 2020-02-16 20:57:30 +08:00
Lily Ballard
47aeaa1535 Work around compilation failure with old Apple SDKs
When building fish-shell with the macOS 10.12 SDK, <sys/proc.h> does not
include <sys/time.h> but references `struct itimerval`. This causes a
compilation failure if we don't import <sys/time.h> ourselves.

This was previously masked by an import of <sys/sysctl.h>, which was
removed in fc0c39b6fd.
2020-02-15 10:58:22 +01:00
Fabian Homborg
399a71645e Fix build on 32-bit systems
This was a weird case of the integer converseys.

Fixes #6609.
2020-02-15 10:13:56 +01:00