Commit Graph

14688 Commits

Author SHA1 Message Date
Aaron Gyes
901d1f1556 fixup last commit 2021-10-16 22:44:08 -07:00
Aaron Gyes
2a0747b9f1 Update AngularJS to 1.8.2 and use Google's minified version
(it's like 170KB instead of 1.3MB)

https://ajax.googleapis.com/ajax/libs/angularjs/1.8.2/angular.min.js
32e24fc5f40120fe30ca097235d6c5988f84c927  angular.min.js
2021-10-16 22:41:19 -07:00
Aaron Gyes
ec855c75c0 run fish.png through imageoptim
14KB -> 7KB
2021-10-16 14:33:12 -07:00
Aaron Gyes
5accc67f1a don't install .desktop file and icon on macOS 2021-10-16 14:20:47 -07:00
Aaron Gyes
ff24d571ef fish.png: use the same thing we ship with the docs 2021-10-16 14:12:44 -07:00
ridiculousfish
d6d0723e0d cmake: Disable -Wunused-macros for bundled PCRE2
This is a noisy warning when building PCRE2
2021-10-16 13:50:33 -07:00
ridiculousfish
f0d4fd85b1 Use __GLIBC_PREREQ instead of parsing gnu_get_libc_version
__GLIBC_PREREQ is the preferred way to conditionally enable features
based on glibc versions. Use it to avoid expensive parsing and
locale sensitivity. See #8204
2021-10-15 21:12:26 -07:00
Johannes Altmanninger
7ccf001bc3 completions/git: simplify description of "git diff -R"
This is simpler, plus the old description is invalid when multiple
revisions are given.
2021-10-14 20:10:12 +02:00
Fabian
3c941d907b
Fix ant completion when $XDG_CACHE_HOME is empty (#8344)
If $xdg_chache_home is empty, this is not a valid fish expression:

    [ \( -z \) -o \( ! -d \) ]

and results into an error.

While at it, also use $XDG_CACHE_HOME if that directory does not exist.
This seems better than falling back to $HOME/.cache, which the user has
explicitly overridden via $XDG_CACHE_HOME.
2021-10-14 19:38:32 +02:00
zeertzjq
a4a48b38f7
Display local branches before unique remote branches in git completion (#8338)
Usually local branches have remote branches with the same name, and in
completion they are currently overshadowed by unique remote branches, making
local branches hard to find. Define local branch completion after unique
remote branch completion to show local branches before unique remote branches.
2021-10-14 19:36:14 +02:00
Fabian
72f55ab206
Fix ant completion (#8344)
If $xdg_chache_home is empty, this is not a valid fish expression:

    [ \( -z \) -o \( ! -d \) ]

and results into an error.

While at it, also use $XDG_CACHE_HOME if that directory does not exist.
This seems better than falling back to $HOME/.cache, which the user has
explicitly overridden via $XDG_CACHE_HOME.
2021-10-14 19:25:23 +02:00
Fabian Homborg
ec8844d834 Drop tests with resetting match start inside lookaround
This seems to be of little use

Fixes #8353
2021-10-14 18:18:51 +02:00
Fabian Homborg
7ecb0b78e9 Tix fypo 2021-10-14 17:02:50 +02:00
Fabian Homborg
c54b8dca33 Read glibc's version in a locale-independent way
We want to enable posix_spawn only for glibc >= 2.24, so we check
gnu_get_libc_version() at runtime. This returns a string with the
version number.

Because it's a version number it's spelt with a "." and never a ",",
but we interpret it as a float. This is iffy to begin with, but simple
enough. Only when the locale uses a ",", things break - it'll read it
as "2" and fail the check, which absolutely *tanks* performance on WSL1.

I'm unsure if this gives the proper runtime glibc version - it might,
whereas __GLIBC_MINOR__ and such definitely would not.

So fix the immediate problem by at least using a c locale - this is
already masked by 8dc3982408, but better
safe than sorry.
2021-10-14 17:02:50 +02:00
Fabian Homborg
7850a10c45 Stop some wcs2stringing
These are paths that barely change, narrowing them *twice* per file
load makes absolutely no sense.
2021-10-14 17:02:50 +02:00
LetMeByte
6606dfbeb5 Fix issue with delete-key in st
In 'simple terminal' the delete key prints \e[P by default, which is
related to the different approach the authors of st are taking on the
matter of shell configuration. The main problem is the malfunction of
the delete key, so we have to use a workaround like this.
2021-10-14 22:14:39 +08:00
Fabian Homborg
8dc3982408
Always use LC_NUMERIC=C internally (#8204)
In most cases, like math, we want C-semantics for floating point
numbers. In particular "." needs to be the decimal separator.

Instead, we pay the price in printf, which is currently the sole place
to output in locale-specific numbers and attempt to read them and
C-style ones.
2021-10-13 21:09:40 +02:00
Aaron Gyes
172601299f builtin _ is now a reserved keyword
Similar to `test`, `_` is so likely to at least slow down if not
break all things catastrophically that it ought not be allowed as a
function name. Fixes #8342
2021-10-11 00:27:44 -07:00
Fabian Homborg
8784253282 Ye olde changelogge 2021-10-07 20:46:59 +02:00
Fabian Homborg
6af3896217 wcsfilecmp: Stop actually computing the numbers
This just compares two longs as strings on the go.

We can simply

1. ignore leading zeroes - they have no influence on the value
2. compare the digits char-by-char
3. keep the comparison for the first differing digit
4. if one number is longer than the other, that is larger
5. if the numbers have the same length, the one larger in the first
differing digit is larger

This makes this comparison quite a bit faster, which makes globs in
directories with numbered files up to 20% faster.

Note that, for historical reasons, this still ignores whitespace right
after the numbers!
2021-10-07 17:57:52 +02:00
Aaron Gyes
01919f1785 Update Mac.cmake 2021-10-06 19:42:25 -07:00
Aaron Gyes
8259bf7c7e Remove hack for Terminal.app that did not support 256 colors
We didn't support that version of macOS even before we bumped to
10.10.
2021-10-06 19:36:18 -07:00
Aaron Gyes
7122209f25 Remove old OS X stuff from keybindings
We don't support older than 10.10 anymore.

fish_key_reader reports the hardcoded bind we had for Mavericks
is just -k sdc.
2021-10-06 19:29:13 -07:00
Aaron Gyes
6fde56ff2d Mac.cmake: set deployment target to 10.10 per new min requirement 2021-10-06 16:51:11 -07:00
takeokunn
4a3b954a48 Update CHANGELOG 2021-10-06 14:51:26 -07:00
takeokunn
d557445875 Add roswell completion 2021-10-06 14:51:26 -07:00
takeokunn
08b75d2358 Add sbcl completion 2021-10-06 14:51:26 -07:00
ridiculousfish
83799228fe Relnote ending support for Mac OS 10.9
Mac OS 10.9 does not have the fstatat function which fish started
calling in commit 71a0d839a7. Let's end support for 10.9, which was
released in 2013.
2021-10-06 14:37:26 -07:00
Johannes Altmanninger
cb5a3fd9a1 completions/man: offer file completions when appropriate
Suggest files to "man -l", but only if the "-l" option is supported
(so not on BSD). Technically we should accept multiple files but this
seems good enough.

Also suggest files when the token-at-cursor contains a slash, because
man will treat arguments as file paths if they contain a /.
2021-10-05 21:53:17 +02:00
Anselm Schüler
475a2afc40
fish_prompt: clarify comment about carried-over status (#8335) 2021-10-05 21:01:13 +02:00
zaleoth
df9f01dd50
completions/ip: Use command (#8334)
Add "command" directive in front of ip commands to prevent bug from a buggy aliased "ip"
2021-10-05 20:47:49 +02:00
Mahmoud Al-Qudsi
86a442fb62 Make find_weak_odrs work with Python 3.6
`text` is an alias for `universal_newlines` but wasn't introduced until
Python 3.7
2021-10-04 19:45:36 -05:00
Mahmoud Al-Qudsi
fe63c8ad32 Shadow/override iswdigit instead of changing it at individual call sites
1ab81ab90d removed one usage of iswdigit()
but there are others; more importantly, the knowledge that iswdigit() is
slow isn't preserved anywhere apart from the git history, so there's
nothing to prevent its use from creeping back into the codebase.

Another alternative is to blacklist iswdigit() (shadow it with a
function of the same name that throws a static_assert) but if we're
going to shadow it anyway, might as well make it useful.
2021-10-04 18:44:16 -05:00
Mahmoud Al-Qudsi
72e50d1ab2 Revert "wcsfilecmp: Don't use iswdigit"
This reverts commit 1ab81ab90d.
2021-10-04 18:08:18 -05:00
Johannes Altmanninger
f674c4b010 completions/git: treat more T files as modified
git-status --porcelain prints status letter T when a file changed type
between either regular file, symlink or submodule.  It can occur in
exactly the same cases as M (modified), so extend the fix for #8311
accordingly.

For submodules, our completions are probably not always correct,
hopefully those cases are rare.
2021-10-04 21:45:14 +02:00
Aaron Gyes
f9def20180 Update ConfigureChecks, only do the mtime hack for Linux.. on Linux
- Only check for HAVE_CLOCK_GETTIME and HAVE_FUTIMENS on Linux, since
they are only used to implement a Linux-specific workaround related
to mtime precision.
- Make sure that hack is limited to Linux builds
- HAVE_SYS_SYSCTL_H was unused, but we should have been using it
- HAVE_TERMIOS_H was unused, remove it

The only functional change is that unix machines with clock_gettime
and futimens will not bother with a Linux-specific hack, and won't
waste time checking for either during cmake configuration either.
2021-10-02 17:02:53 -07:00
Fabian Homborg
1ab81ab90d wcsfilecmp: Don't use iswdigit
For some godforsaken reason it's slow on glibc

Like, actually, this manages to somehow make "echo **" 10% faster now?

The spec says this matches 0 through 9 always, so this is safe. We
also use this logic in a variety of other places already.
2021-10-01 19:14:27 +02:00
Fabian Homborg
71a0d839a7 wildcard: Use fstatat
This allows us to skip re-wcs2stringing the base_dir again and again
by simply using the fd. It's about 10% faster in my testing.

fstatat is defined by POSIX, so it should be available everywhere.
2021-10-01 19:14:27 +02:00
Aaron Gyes
54369ba61b use add_compile_options() instead of manipulating CMAKE_CXX_FLAGS 2021-10-01 09:10:32 -07:00
Aaron Gyes
2f29bb5b51 remove unused macros 2021-10-01 09:07:08 -07:00
Aaron Gyes
39bdabcd29 Don't add these warnings on GCC. 2021-10-01 05:09:04 -07:00
Aaron Gyes
dcaa9c7959 fix incorrect error message for 'end --foo' 2021-10-01 04:54:02 -07:00
Aaron Gyes
55ab2f6e6d Remove some unsued macros and a template 2021-10-01 04:50:19 -07:00
Aaron Gyes
d0f697be64 Update CMakeLists.txt
Revert the change getting rid of the -UNDEBUG, add some unused-blah
warnings.

We are often using the system assert() because we include other
headers that include assert.h.

I noticed that assert() was being compiled out because I started
getting new warnings printed about unusued variables (that were only
used in the assert()s. Add these warnings to the build.
2021-10-01 04:46:32 -07:00
Aaron Gyes
d2f47e0523 add missing header 2021-10-01 03:40:32 -07:00
Aaron Gyes
831e9082d7 enum_map stuff to enum_map.h 2021-10-01 03:39:43 -07:00
Noorhteen Raja NJ
3e345dccb9 Update ldapsearch.fish 2021-09-30 12:23:39 -07:00
Noorhteen Raja NJ
9b9a637e5c Update duply.fish 2021-09-30 12:21:20 -07:00
Jony
7df5efe317 completions/xbps-query: add missing -p completions 2021-09-30 12:13:42 -07:00
ridiculousfish
15cee66df1 Wrap even more stuff in anonymous namespaces 2021-09-30 11:33:03 -07:00