Commit Graph

14925 Commits

Author SHA1 Message Date
ridiculousfish
1c5208cf5c Migrate a function's description into its immutable properties
No functional change here.
2021-10-23 10:12:52 -07:00
ridiculousfish
17d9ae16be Migrate the function's is_autoload field into its immutable properties
Continuing to simplify functions. No functional change here.
2021-10-23 10:12:52 -07:00
ridiculousfish
12134c19d9 Migrate the function's definition file into its immutable properties
This never changes once initialized, so we can make it immutable. No
functional change here.
2021-10-23 10:12:52 -07:00
ridiculousfish
d904cc4964 Stop passing null function properties in testing
This allows us to assert that our functions are not null.
2021-10-23 10:12:52 -07:00
ridiculousfish
59b63f3aab Use vec_append when expanding a command into arguments
This saves some lines and some allocations.
2021-10-23 10:10:26 -07:00
ridiculousfish
a634e78633 Remove an extra use of process_type_for_command
This just duplicated a previous call above.
2021-10-23 10:07:24 -07:00
Johannes Altmanninger
ece89f43aa tests/test_env.sh: fix copy paste error so we export XDG_RUNTIME_DIR
fish might use XDG_RUNTIME_DIR for the uvar notifier fifo, so this
makes sure that tests are isolated.

Also set permissions to comply with the XDG basedir spec.
2021-10-23 18:59:15 +02:00
Fabian Homborg
4b46717a91 docs: Move configuration section to language
Instead leave a simple "use config.fish" bit in-place.

Also some minor rewording.
2021-10-23 17:13:36 +02:00
Fabian Homborg
aef6cc1538 docs: Hand-write a list of short descriptions in commands
This is more readable than the full list, especially for the important
things.
2021-10-23 16:46:15 +02:00
Fabian Homborg
763c5deb39 Teach help about commands.html 2021-10-23 13:47:01 +02:00
Fabian Homborg
c7475202ae Move wslpath changelog entry to 3.4 2021-10-22 23:39:12 +02:00
take
3ae1842fbe
Add clasp completion (#8373)
* Add clasp completion

* Update CHANGELOG.rst
2021-10-22 23:23:22 +02:00
Jason Nader
95dbef1432 Update dmesg completions 2021-10-22 23:22:26 +02:00
百地 希留耶
be9b8829d0
Add completions for wslpath (#8364)
* add completions for `wslpath`

* add changelog entry for `wslpath` completion
2021-10-22 23:22:02 +02:00
LetMeByte
af7704ef06
Fix st issue with shift+tab (#8354) 2021-10-22 23:21:25 +02:00
Aaron Gyes
f817dc7a76 fixup or/and typo 2021-10-22 12:55:43 -07:00
Aaron Gyes
374d580474 Combine 3 git config forks into one
fish_git_prompt duration improved from 76ms to 45ms here.
2021-10-22 12:45:39 -07:00
Aaron Gyes
46278d7137 remove for loops from git prompt event handlers 2021-10-22 09:05:18 -07:00
Aaron Gyes
901dbd71b0 fix build when path has spaces in it.
Now it works.
2021-10-22 02:27:19 -07:00
Aaron Gyes
f4377e1a26 necro working tests from 11a373f121 2021-10-21 23:50:42 -07:00
Fabian Homborg
db5e7734a6 Some small changes to the docs
Reorder the variables, make more cd-related stuff subsections, a
slight rewording.
2021-10-20 21:28:14 +02:00
Fabian Homborg
144778dc28 Complete: Fix long-form of "-r" in complete output
This was never `--requires-param`, AFAICT.
2021-10-20 21:05:17 +02:00
Fabian Homborg
6e491ad457 abbr: add missing options
Fixes #8367.
2021-10-19 17:45:18 +02:00
Fabian Homborg
b15dc2b2e8 argparse: Prevent duplicate error trailer
This was already printed by builtin_missing_argument/unknown_option.

Since we need more control (because we add our own errors in other
places), teach builtin_unknown_option to suppress the trailer, like
missing_argument already could.

And then use it.

Fixes #8368.
2021-10-19 17:43:54 +02:00
Fabian Homborg
21ddffb9e0 CHANGELOG 8292 2021-10-19 17:35:32 +02:00
Fabian Homborg
43c58df873 Test option highlighting in command substitutions 2021-10-19 17:30:45 +02:00
Fabian Homborg
9700a75f38 fish_tests: Make a fancy caret for highlighting errors
Now looks like

```
Error: Wrong color in test at index 8-11 in text (expected 0x6, actual 0x2):
command echo abc foo &
        ^^^^
```

instead of repeating the error for every character that is wrong.
2021-10-19 17:27:35 +02:00
Fabian Homborg
711796ad13 Highlight options differently
This introduces a new variable, $fish_color_option, that can be used
to highlight options differently.

Options are tokens starting with `-`, but only up to (and including!)
the first `--`.

Fixes #8292.
2021-10-19 17:20:21 +02:00
Fabian Homborg
1888bda3e6 Do some german translations
Gosh I hate doing translations.
2021-10-18 18:47:38 +02:00
Fabian Homborg
eba5352576 Also remove the languages from cmake
I'm not sure why this list is hardcoded?
2021-10-18 18:39:07 +02:00
Fabian Homborg
4cf067deb3 Remove norwegian translations
These were functionally dead.
2021-10-18 18:08:52 +02:00
Fabian Homborg
1be8f8dd82 Fix broken translated format strings
As found by the new translation test, these are the broken format
strings. Using these might cause a crash or garbage read, so it's
reasonably important.

Note that my french is quite rusty and I don't actually speak
swedish (but the related german),
but these seem sensible to me, as there's no real *grammar* as such
involved.

So I feel comfortable enough to fix it instead of removing these
translations entirely.

Fixes #8358
2021-10-18 17:04:45 +02:00
Fabian Homborg
e6b75e5947 Add a test to check format strings in translations
This should prevent #8358 from happening again.

Note that, because it's not fixed yet, this test *will* fail.
2021-10-18 17:02:17 +02:00
Fabian Homborg
5e3c40207d cmake: Pass the source directory to the tests
Our tests typically run in their own environment, which is great for
normal tests.

However for the coming translation test, we don't want to copy the .po
files into the test environment, so it's nice to have a way out.
2021-10-18 17:02:17 +02:00
Erik Serrander
049104e8df Adds sub-command clear-session to history command.
Issue #5791
This clears all history for the current session. Documentation and
autocompletion for the new subcommand is added.
2021-10-17 19:27:46 -07:00
Aaron Gyes
87b2c2fdec install the fish.png file itself 2021-10-17 09:20:06 -07:00
Aaron Gyes
4cfe095367 update angular-route and angular-sanitize to 1.8.2 as well
URLs for source and SHAsums because the minified js is inscrutible:

https://ajax.googleapis.com/ajax/libs/angularjs/1.8.2/angular-sanitize.min.js
https://ajax.googleapis.com/ajax/libs/angularjs/1.8.2/angular-route.min.js

32197fa25de2415816c22fd4d512fef407e2df33  angular-route.min.js
8a6e6f02cc69e8c5bfface0d935dc6f65c9d8a05  angular-sanitize.min.js
2021-10-16 22:53:19 -07:00
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