Compare commits

..

1 Commits

Author SHA1 Message Date
Johannes Altmanninger
a590e1ee1b Turn off release-mode overflow checks again
Not sure about this but "no overflow checks" is the status quo, so
if we want to keep the checks beyond the port, this should be stated
explicitly, as implied by e616de544 (Enable rust overflow checks in
release mode, at least for now, 2023-02-20).
2024-10-23 14:13:10 +02:00
238 changed files with 1860 additions and 4598 deletions

8
.cargo/config.toml Normal file
View File

@@ -0,0 +1,8 @@
# For macOS, support 10.9 on x86-64, and 11.0 on aarch64, which
# is the minimum supported version for Apple Silicon.
[target.x86_64-apple-darwin]
rustflags = ["-C", "link-arg=-mmacosx-version-min=10.9"]
[target.aarch64-apple-darwin]
rustflags = ["-C", "link-arg=-mmacosx-version-min=11.0"]

View File

@@ -13,8 +13,8 @@ jobs:
uses: dtolnay/rust-toolchain@1.73.0
with:
targets: x86_64-apple-darwin
- name: Install Rust Stable
uses: dtolnay/rust-toolchain@stable
- name: Install Rust 1.79
uses: dtolnay/rust-toolchain@1.79
with:
targets: aarch64-apple-darwin
- name: build-and-codesign

View File

@@ -1,4 +1,4 @@
name: make fish_run_tests
name: make test
on: [push, pull_request]
@@ -28,10 +28,10 @@ jobs:
cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo
- name: make
run: |
make -C build VERBOSE=1
- name: make fish_run_tests
make VERBOSE=1
- name: make test
run: |
make -C build VERBOSE=1 fish_run_tests
make VERBOSE=1 test
ubuntu-32bit-static-pcre2:
@@ -54,10 +54,10 @@ jobs:
cmake -DFISH_USE_SYSTEM_PCRE2=OFF -DRust_CARGO_TARGET=i586-unknown-linux-gnu ..
- name: make
run: |
make -C build VERBOSE=1
- name: make fish_run_tests
make VERBOSE=1
- name: make test
run: |
make -C build VERBOSE=1 fish_run_tests
make VERBOSE=1 test
ubuntu-asan:
@@ -92,8 +92,8 @@ jobs:
cmake .. -DASAN=1 -DRust_CARGO_TARGET=x86_64-unknown-linux-gnu -DCMAKE_BUILD_TYPE=Debug
- name: make
run: |
make -C build VERBOSE=1
- name: make fish_run_tests
make VERBOSE=1
- name: make test
env:
FISH_CI_SAN: 1
ASAN_OPTIONS: check_initialization_order=1:detect_stack_use_after_return=1:detect_leaks=1:fast_unwind_on_malloc=0
@@ -107,7 +107,7 @@ jobs:
llvm_version=$(clang --version | awk 'NR==1 { split($NF, version, "."); print version[1] }')
export ASAN_SYMBOLIZER_PATH=/usr/bin/llvm-symbolizer-$llvm_version
export LSAN_OPTIONS="$LSAN_OPTIONS:suppressions=$PWD/build_tools/lsan_suppressions.txt"
make -C build VERBOSE=1 fish_run_tests
make VERBOSE=1 test
# Our clang++ tsan builds are not recognizing safe rust patterns (such as the fact that Drop
# cannot be called while a thread is using the object in question). Rust has its own way of
@@ -133,9 +133,9 @@ jobs:
# - name: make
# run: |
# make
# - name: make fish_run_tests
# - name: make test
# run: |
# make -C build fish_run_tests
# make test
macos:
@@ -160,7 +160,7 @@ jobs:
cmake -DWITH_GETTEXT=NO -DCMAKE_BUILD_TYPE=Debug ..
- name: make
run: |
make -C build VERBOSE=1
- name: make fish_run_tests
make VERBOSE=1
- name: make test
run: |
make -C build VERBOSE=1 fish_run_tests
make VERBOSE=1 test

View File

@@ -31,11 +31,3 @@ jobs:
# This used to have --deny=warnings, but that turns rust release day
# into automatic CI failure day, so we don't do that.
run: cargo clippy --workspace --all-targets
# Disabling for now because it also checks "advisories",
# making CI fail for reasons unrelated to the patch
# cargo-deny:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
# - uses: EmbarkStudios/cargo-deny-action@v1

View File

@@ -1,47 +0,0 @@
name: staticbuilds
on:
# release:
# types: [published]
# schedule:
# - cron: "14 13 * * *"
workflow_dispatch:
env:
CTEST_PARALLEL_LEVEL: "1"
CMAKE_BUILD_PARALLEL_LEVEL: "4"
jobs:
staticbuilds:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: dtolnay/rust-toolchain@1.70
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Prepare
run: |
sudo apt install python3-sphinx
rustup target add x86_64-unknown-linux-musl
rustup target add aarch64-unknown-linux-musl
sudo apt install musl-tools crossbuild-essential-arm64 -y
- name: Build
run: |
CFLAGS="$CFLAGS -D_FORTIFY_SOURCE=2" CMAKE_WITH_GETTEXT=0 CC=aarch64-linux-gnu-gcc RUSTFLAGS="-C linker=aarch64-linux-gnu-gcc -C link-arg=-lgcc -C link-arg=-D_FORTIFY_SOURCE=0" cargo build --release --target aarch64-unknown-linux-musl
cargo build --release --target x86_64-unknown-linux-musl
- name: Compress
run: |
tar -cazf fish-amd64.tar.xz -C target/x86_64-unknown-linux-musl/release/ fish{,_indent,_key_reader}
tar -cazf fish-aarch64.tar.xz -C target/aarch64-unknown-linux-musl/release/ fish{,_indent,_key_reader}
- uses: actions/upload-artifact@v4
with:
name: fish
path: |
fish-amd64.tar.xz
fish-aarch64.tar.xz
retention-days: 14

View File

@@ -31,7 +31,7 @@ PREFIX?=/usr/local
build/fish: build/$(BUILDFILE)
$(CMAKE) --build build
# Don't split the mkdir into its own rule because that would cause CMake to regenerate the build
# Don't split the mkdir into its own rule because that would cause CMake to regenerate the build
# files after each build (because it adds the mdate of the build directory into the out-of-date
# calculation tree). GNUmake supports order-only dependencies, BSDmake does not seem to.
build/$(BUILDFILE):
@@ -48,11 +48,7 @@ clean:
.PHONY: test
test: build/fish
$(CMAKE) --build build --target fish_run_tests
.PHONY: fish_run_tests
fish_run_tests: build/fish
$(CMAKE) --build build --target fish_run_tests
$(CMAKE) --build build --target test
.PHONY: run
run: build/fish

View File

@@ -1,36 +1,27 @@
fish 4.0.1 (released March 12, 2025)
====================================
fish 3.8.0 (released ???)
===================================
This release of fish includes the following improvements compared to fish 4.0.0:
.. ignore: 9439 9440 9442 9452 9469 9480 9482 9520 9536 9541 9544 9559 9561 9576 9575
9568 9588 9556 9563 9567 9585 9591 9593 9594 9603 9600 9599 9592 9612 9613 9619 9630 9638 9625 9654 9637 9673 9666 9626 9688 9725 9636 9735
9542 9332 9566 9573 9579 9586 9589 9607 9608 9615 9616 9621 9641 9642 9643 9653 9658 9661
9671 9726 9729 9739 9745 9746 9754 9765 9767 9768 9771 9777 9778 9786 9816 9818 9821 9839
9845 9864 9916 9923 9962 9963 9990 9991 10121 10179 9856 9859 9861 9863 9867 9869 9874 9879
9881 9894 9896 9902 9873 10228 9925 9928 10145 10146 10161 10173 10195 10220 10222 10288
10342 10358 9927 9930 9947 9948 9950 9952 9966 9968 9980 9981 9984 10040 10061 10101 10090
10102 10108 10114 10115 10128 10129 10143 10174 10175 10180 10182 10184 10185 10186 10188
10198 10200 10201 10204 10210 10214 10219 10223 10227 10232 10235 10237 10243 10244 10245
10246 10251 10260 10267 10281 10347 10366 10368 10370 10371 10263 10270 10272 10276 10277
10278 10279 10291 10293 10305 10306 10309 10316 10317 10327 10328 10329 10330 10336 10340
10345 10346 10353 10354 10356 10372 10373 3299 10360 10359
2037 2037 3017 3018 3162 4865 5284 5991 6981 6996 7172 9751 9893 10241 10254 10268 10290 10307
10308 10321 10338 10348 10349 10355 10357 10379 10381 10388 10389 10390 10395 10398 10400 10403
10404 10407 10408 10409 10411 10412 10417 10418 10427 10429 10438 10439 10440 10441 10442 10443
10445 10448 10450 10451 10456 10457 10462 10463 10464 10466 10467 10474 10481 10490 10492 10494
10499 10503 10505 10508 10509 10510 10511 10512 10513 10518 10547 10719
- Key combinations using the super (Windows/command) key can be bound using the :kbd:`super-` prefix (:issue:`11217`).
- Konsole's menu shows the "Open folder with" option again (:issue:`11198`).
- ``$fish_color_search_match`` will now only be applied to the foreground color if it has an explicit foreground. For example, this allows setting::
set -g fish_color_search_match --reverse
- Cursor shape commands (``\e[2 q``) are no longer sent in non-interactive shells or in redirections (:issue:`11255`).
- :doc:`status <cmds/status>` gained a ``is-interactive-read`` subcommand, to check whether the script is being called from an interactive :doc:`read <cmds/read>` invocation.
- fish's background tasks are now started in a way that avoids an error on macOS Terminal.app (:issue:`11181`).
- Using key combinations within qemu should work correctly.
- Prompts containing control characters no longer cause incorrect display of command lines (:issue:`11252`).
- Cancelling the command-line in Vi mode displays correctly again (:issue:`11261`).
- The acidhub prompt properly displays the git branch again (:issue:`11179`).
- Completions for ``wine`` correctly include files again (:issue:`11202`).
- On macOS, paths from ``/etc/paths`` and ``/etc/manpaths`` containing colons are handled correctly (:issue:`10684`). This functionality was included in the 4.0.0 release notes but was missing from the source code.
- The XTerm ``modifyOtherKeys`` keyboard encoding is no longer used under WezTerm, as it does not work correctly in all layouts (:issue:`11204`).
- kbd:`option-left` and other similar keys should now work in iTerm versions before 3.5.12; the kitty keyboard protocol is now disabled on these versions (:issue:`11192`).
- The kitty keyboard protocol is no longer used under Midnight Commander, as it does not work correctly (:issue:`10640`).
- fish now sends the commandline along with the OSC 133 semantic prompt command start sequence. This fixes a test in the kitty terminal (:issue:`11203`).
- Git completions for third-party commands like "git-absorb" are completed correctly again (:issue:`11205`).
- Completions for ``diskutil`` no longer produce an error (:issue:`11201`).
- The output of certain error messages no longer prints newlines to standard output (:issue:`11248`).
- A number of crashes have been fixed, including file names longer than 255 bytes (:issue:`11221`), using fish on a btrfs filesystem (:issue:`11219`), history files that do not have the expected format (:issue:`11236`), and pasting into an empty command line (:issue:`11256`).
--------------
fish 4.0.0 (released February 27, 2025)
=======================================
fish's core code has been ported from C++ to Rust (:issue:`9512`). This means a large change in dependencies and how to build fish. However, there should be no direct impact on users. Packagers should see the :ref:`For Distributors <rust-packaging>` section at the end.
The entirety of fish's C++ code has been ported to Rust (:issue:`9512`).
This means a large change in dependencies and how to build fish.
Packagers should see the :ref:`For Distributors <rust-packaging>` section at the end.
Notable backwards-incompatible changes
--------------------------------------
@@ -38,33 +29,36 @@ Notable backwards-incompatible changes
- As part of a larger binding rework, ``bind`` gained a new key notation.
In most cases the old notation should keep working, but in rare cases you may have to change a ``bind`` invocation to use the new notation.
See :ref:`below <changelog-new-bindings>` for details.
- :kbd:`ctrl-c` now calls a new bind function called ``clear-commandline``. The old behavior, which leaves a "^C" marker, is available as ``cancel-commandline`` (:issue:`10935`)
- ``random`` will produce different values from previous versions of fish when used with the same seed, and will work more sensibly with small seed numbers.
- Fish no longer supports terminals that fail to ignore OSC or CSI sequences they don't recognize.
The typical problem is that terminals echo the raw sequences sent by fish instead of silently ignoring them.
- :kbd:`alt-left` and :kbd:`alt-right` will now move by one argument (which may contain quoted spaces), not just one word like :kbd:`ctrl-left` and :kbd:`ctrl-right` do.
- :kbd:`alt-backspace` will delete an entire argument, not just one word (which is :kbd:`ctrl-backspace` now).
- ``random`` now uses a different random number generator and so the values you get even with the same seed have changed.
Notably, it will now work much more sensibly with very small seeds.
The seed was never guaranteed to give the same result across systems,
so we do not expect this to have a large impact (:issue:`9593`).
- Variables in command position that expand to a subcommand keyword are now forbidden to fix a likely user error.
For example, ``set editor command emacs; $editor`` is no longer allowed (:issue:`10249`).
- ``functions --handlers`` will now list handlers in a different order.
Now it is definition order, first to last, where before it was last to first.
This was never specifically defined, and we recommend not relying on a specific order (:issue:`9944`).
- The ``qmark-noglob`` feature, introduced in fish 3.0, is enabled by default. That means ``?`` will no longer act as a single-character glob.
- The ``qmark-noglob`` feature flag, introduced in fish 3.0, is now turned on by default. That means ``?`` will no longer act as a single-character glob.
You can, for the time being, turn it back on by adding ``no-qmark-noglob`` to :envvar:`fish_features` and restarting fish::
set -Ua fish_features no-qmark-noglob
The flag will eventually be made read-only, making it impossible to turn off.
- Terminals that fail to ignore unrecognized OSC or CSI sequences may display garbage. We know cool-retro-term and emacs' ansi-term are affected, but most mainstream terminals are not.
- fish no longer searches directories from the Windows system/user ``$PATH`` environment variable for Linux executables. To execute Linux binaries by name (i.e. not with a relative or absolute path) from a Windows folder, make sure the ``/mnt/c/...`` path is explicitly added to ``$fish_user_paths`` and not just automatically appended to ``$PATH`` by ``wsl.exe`` (:issue:`10506`).
- Under Microsoft Windows Subsystem for Linux 1 (not WSL 2), backgrounded jobs that have not been disowned and do not terminate on their own after a ``SIGHUP`` + ``SIGCONT`` sequence will be explicitly killed by fish on exit (after the usual prompt to close or disown them) to work around a WSL 1 deficiency that sees backgrounded processes that run into ``SIGTTOU`` remain in a suspended state indefinitely (:issue:`5263`). The workaround is to explicitly ``disown`` processes you wish to outlive the shell session.
- Fish no longer searches directories from the Windows system/user ``$PATH`` environment variable for Linux executables. To execute Linux binaries by name (i.e. not with a relative or absolute path) from a Windows folder, make sure the ``/mnt/c/...`` path is explicitly added to ``$fish_user_paths`` and not just automatically appended to ``$PATH`` by ``wsl.exe`` (:issue:`10506`).
- Under WSLv1, backgrounded jobs that have not been disowned and do not terminate on their own after a ``SIGHUP`` + ``SIGCONT`` sequence will be explicitly killed by fish on exit/exec (after the usual prompt to close or disown them) to work around a WSL deficiency that sees backgrounded processes that run into ``SIGTTOU`` remain in a suspended state indefinitely (:issue:`5263`). The workaround is to explicitly ``disown`` processes you wish to outlive the shell session.
Notable improvements and fixes
------------------------------
.. _changelog-new-bindings:
- fish now requests XTerm's ``modifyOtherKeys`` keyboard encoding and `kitty keyboard protocol's <https://sw.kovidgoyal.net/kitty/keyboard-protocol/>`_ progressive enhancements (:issue:`10359`).
Depending on terminal support, this allows to binding more key combinations, including arbitrary combinations of modifiers :kbd:`ctrl`, :kbd:`alt` and :kbd:`shift`, and distinguishing (for example) :kbd:`ctrl-i` from :kbd:`tab`.
- fish now requests XTerm's ``modifyOtherKeys`` keyboard encoding and `kitty keyboard protocol's <https://sw.kovidgoyal.net/kitty/keyboard-protocol/>`_ progressive enhancements for a CSI u encoding.
Depending on terminal support, this allows to bind a lot more key combinations, including arbitrary combinations of modifiers :kbd:`ctrl`, :kbd:`alt` and :kbd:`shift`,
and to distinguish e.g. :kbd:`ctrl-i` from :kbd:`tab`.
Additionally, ``bind`` now supports a human-readable syntax in addition to byte sequences.
Additionally, builtin ``bind`` no longer requires specifying keys as byte sequences but learned a human-readable syntax.
This includes modifier names, and names for keys like :kbd:`enter` and :kbd:`backspace`.
For example
@@ -72,224 +66,181 @@ Notable improvements and fixes
- ``bind ctrl-x,alt-c 'do something'`` binds a sequence of two keys.
Any key argument that starts with an ASCII control character (like ``\e`` or ``\cX``) or is up to 3 characters long, not a named key, and does not contain ``,`` or ``-`` will be interpreted in the old syntax to keep compatibility for the majority of bindings.
Keyboard protocols can be turned off by disabling the "keyboard-protocols" feature flag::
set -Ua fish_features no-keyboard-protocols
This is a temporary measure to work around buggy terminals (:issue:`11056`), which appear to be relatively rare.
Use this if something like "=0" or "=5u" appears in your commandline mysteriously.
- fish can now be built as a self-installing binary (:issue:`10367`). That means it can be easily built on one system and copied to another, where it can extract supporting files.
To do this, run::
cargo install --path . # in a clone of the fish repository
# or `cargo build --release` and copy target/release/fish{,_indent,_key_reader} wherever you want
The first time it runs interactively, it will extract all the data files to ``~/.local/share/fish/install/``. A specific path can be used for the data files with ``fish --install=PATH`` To uninstall, remove the fish binaries and that directory.
This build system is experimental; the main build system, using ``cmake``, remains the recommended approach for packaging and installation to a prefix.
- A new function ``fish_should_add_to_history`` can be overridden to decide whether a command should be added to the history (:issue:`10302`).
- :kbd:`ctrl-c` during command input no longer prints ``^C`` and a new prompt but merely clears the command line. This restores the behavior from version 2.2. To revert to the old behavior use ``bind ctrl-c __fish_cancel_commandline`` (:issue:`10213`).
- Bindings can now mix special input functions and shell commands, so ``bind ctrl-g expand-abbr "commandline -i \n"`` works as expected (:issue:`8186`).
- Special input functions run from bindings via ``commandline -f`` are now applied immediately, instead of after the currently executing binding (:issue:`3031`, :issue:`10126`).
- Special input functions run from bindings via ``commandline -f`` are now applied immediately instead of after the currently executing binding.
For example, ``commandline -i foo; commandline | grep foo`` succeeds now.
- Undo history is no longer truncated after every command, but kept for the lifetime of the shell process.
- Undo history is no longer truncated after every command but kept for the lifetime of the shell process.
- The :kbd:`ctrl-r` history search now uses glob syntax (:issue:`10131`).
- The :kbd:`ctrl-r` history search now operates only on the line or command substitution at cursor, making it easier to combine commands from history (:issue:`9751`).
- The :kbd:`ctrl-r` history search now operates only on the line or command substitution at cursor, making it easier to combine commands from history.
- Abbreviations can now be restricted to specific commands. For instance::
abbr --add --command git back 'reset --hard HEAD^'
will expand "back" to ``reset --hard HEAD^``, but only when the command is ``git`` (:issue:`9411`).
will expand "back" to ``reset --hard HEAD^``, but only when the command is ``git`` (:issue:`9411`, :issue:`10452`).
Deprecations and removed features
---------------------------------
- ``commandline --tokenize`` (short option ``-o``) has been deprecated in favor of ``commandline --tokens-expanded`` (short option ``-x``) which expands variables and other shell syntax, removing the need to use :doc:`eval <cmds/eval>` in completion scripts (:issue:`10212`).
- ``commandline --tokenize`` (short option ``-o``) has been deprecated in favor of ``commandline --tokens-expanded`` (short option ``-x``) which expands variables and other shell syntax, removing the need to use "eval" in completion scripts (:issue:`10212`).
- Two new feature flags:
- ``remove-percent-self`` (see ``status features``) disables PID expansion of ``%self``, which has been supplanted by ``$fish_pid`` (:issue:`10262`).
- ``test-require-arg`` disables ``test``'s one-argument mode. That means ``test -n`` without an additional argument will return false, ``test -z`` will keep returning true. Any other option without an argument, anything that is not an option and no argument will be an error. This also goes for ``[``, test's alternate name.
- ``remove-percent-self`` (see ``status features``) disables PID expansion of ``%self`` which has been supplanted by ``$fish_pid`` (:issue:`10262`).
- ``test-require-arg``, will disable ``test``'s one-argument mode. That means ``test -n`` without an additional argument will return false, ``test -z`` will keep returning true. Any other option without an argument, anything that is not an option and no argument will be an error. This also goes for ``[``, test's alternate name.
This is a frequent source of confusion and so we are breaking with POSIX explicitly in this regard.
In addition to the feature flag, there is a debug category "deprecated-test". Running fish with ``fish -d deprecated-test`` will show warnings whenever a ``test`` invocation that would change is used. (:issue:`10365`).
These can be enabled with::
as always these can be enabled with::
set -Ua fish_features remove-percent-self test-require-arg
We intend to enable them by default in future, and after that eventually make them read-only.
- Specifying key names as terminfo names (using the ``bind -k`` syntax) is deprecated and may be removed in a future version.
They are available as a preview now, it is our intention to enable them by default in future, and after that eventually make them read-only.
- Specifying key names as terminfo name (``bind -k``) is deprecated and may be removed in a future version.
- When a terminal pastes text into fish using bracketed paste, fish used to switch to a special ``paste`` bind mode.
This bind mode has been removed. The behavior on paste is no longer configurable.
- When an interactive fish is stopped or terminated by a signal that cannot be caught (SIGSTOP or SIGKILL), it may leave the terminal in a state where keypresses with modifiers are sent as CSI u sequences, instead of traditional control characters or escape sequences that are recognized by Readline and compatible programs, such as bash and python.
This bind mode has been removed. The behavior on paste is currently not meant to be configurable.
- When an interactive fish is stopped or terminated by a signal that cannot be caught (SIGSTOP or SIGKILL), it may leave the terminal in a state where keypresses with modifiers are sent as CSI u sequences instead of traditional control characters or escape sequences (that are recognized by bash/readline).
If this happens, you can use the ``reset`` command from ``ncurses`` to restore the terminal state.
- ``fish_key_reader --verbose`` no longer shows timing information.
- Terminal information is no longer read from hashed terminfo databases, or termcap databases (:issue:`10269`). The vast majority of systems use a non-hashed terminfo database, which is still supported.
- ``source`` returns an error if used without a filename or pipe/redirection (:issue:`10774`).
Scripting improvements
----------------------
- ``for`` loops will no longer remember local variables from the previous iteration (:issue:`10525`).
- A new ``history append`` subcommand appends a command to the history, without executing it (:issue:`4506`).
- A new redirection: ``<? /path/to/file`` will try opening the file as input, and if it doesn't succeed silently uses ``/dev/null`` instead.
- for-loops will no longer remember local variables from the previous iteration (:issue:`10525`).
- Add ``history append`` subcommand to append a command to the history without executing it (:issue:`4506`).
- A new redirection: ``<? /path/to/file`` will try opening the file as input, and if it doesn't succeed silently use /dev/null instead.
This can help with checks like ``test -f /path/to/file; and string replace foo bar < /path/to/file``. (:issue:`10387`)
- A new option ``commandline --tokens-raw`` prints a list of tokens without any unescaping (:issue:`10212`).
- A new option ``commandline --showing-suggestion`` tests whether an autosuggestion is currently displayed (:issue:`10586`).
- ``functions`` and ``type`` now show that a function was copied and its source, rather than solely ``Defined interactively`` (:issue:`6575`).
- Stack trace now shows line numbers for copied functions (:issue:`6575`).
- New option ``commandline --tokens-raw`` prints a list of tokens without any unescaping (:issue:`10212`).
- New option ``commandline --showing-suggestion`` to check whether an autosuggestion is currently displayed (:issue:`10586`).
- ``functions`` and ``type`` now show where a function was copied and where it originally was instead of saying ``Defined interactively`` (:issue:`6575`).
- Stack trace now shows line numbers for copied functions.
- ``foo & && bar`` is now a syntax error, like in other shells (:issue:`9911`).
- ``if -e foo; end`` now prints a more accurate error (:issue:`10000`).
- Variables in command position that expand to a subcommand keyword are now forbidden to fix a likely user error.
For example ``set editor command emacs; $editor`` is no longer allowed (:issue:`10249`).
- ``cd`` into a directory that is not readable but accessible (permissions ``--x``) is now possible (:issue:`10432`).
- An integer overflow in ``string repeat`` leading to a near-infinite loop has been fixed (:issue:`9899`).
- ``string shorten`` behaves better in the presence of non-printable characters, including fixing an integer overflow that shortened strings more than intended (:issue:`9854`).
- ``string pad`` no longer allows non-printable characters as padding (:issue:`9854`).
- ``string repeat`` now allows omission of ``-n`` when the first argument is an integer (:issue:`10282`).
- ``string match`` and ``replace`` have a new ``--max-matches`` option to return as soon as the specified number of matches have been identified, which can improve performance in scripts (:issue:`10587`).
- ``string shorten`` behaves better in the presence of non-printable characters, including fixing an integer overflow that shortened strings more than intended. (:issue:`9854`)
- ``string pad`` no longer allows non-printable characters as padding. (:issue:`9854`)
- ``string repeat`` now allows omission of ``-n`` when the first argument is an integer. (:issue:`10282`)
- ``functions --handlers-type caller-exit`` once again lists functions defined as ``function --on-job-exit caller``, rather than them being listed by ``functions --handlers-type process-exit``.
- A new ``set --no-event`` option sets or erases variables without triggering a variable event. This can be useful to change a variable in an event handler (:issue:`10480`).
- Commas in command substitution output are no longer used as separators in brace expansion, preventing a surprising expansion in some cases (:issue:`5048`).
- Universal variables can now store strings containing invalid UTF-8 (:issue:`10313`).
- A new ``path basename -E`` option that causes it to return the basename ("filename" with the directory prefix removed) with the final extension (if any) also removed. This is a shorter version of ``path change-extension "" (path basename $foo)`` (:issue:`10521`).
- A new ``math --scale-mode`` option to select ``truncate``, ``round``, ``floor``, ``ceiling`` as you wish; the default value is ``truncate``. (:issue:`9117`).
- ``random`` is now less strict about its arguments, allowing a start larger or equal to the end. (:issue:`10879`)
- ``function --argument-names`` now produces an error if a read-only variable name is used, rather than simply ignoring it (:issue:`10842`).
- Tilde expansion in braces (that is, ``{~,}``) works correctly (:issue:`10610`).
- ``set`` has a new ``--no-event`` flag, to set or erase variables without triggering a variable event. This is useful e.g. to change a variable in an event handler. (:issue:`10480`)
- Commas in command substitution output are no longer used as separators in brace expansion, preventing a surprising expansion in rare cases (:issue:`5048`).
- Universal variables can now store strings containing invalid Unicode codepoints (:issue:`10313`).
- ``path basename`` now takes a ``-E`` option that causes it to return the basename (i.e. "filename" with the directory prefix removed) with the final extension (if any) also removed. This is a shorter version of ``path change-extension "" (path basename $foo)`` (:issue:`10521`).
- ``math`` now adds ``--scale-mode`` parameter. You can choose between ``truncate``, ``round``, ``floor``, ``ceiling`` as you wish (default value is ``truncate``). (:issue:`9117`).
Interactive improvements
------------------------
- When using :kbd:`ctrl-x` on Wayland in the VSCode terminal, the clipboard is no longer cleared on :kbd:`ctrl-c`.
- Command-specific tab completions may now offer results whose first character is a period. For example, it is now possible to tab-complete ``git add`` for files with leading periods. The default file completions hide these files, unless the token itself has a leading period (:issue:`3707`).
- Option completion now uses fuzzy subsequence filtering, just like non-option completion (:issue:`830`).
This means that ``--fb`` may be completed to ``--foobar`` if there is no better match.
- Completions that insert an entire token now use quotes instead of backslashes to escape special characters (:issue:`5433`).
- Historically, file name completions are provided after the last ``:`` or ``=`` within a token.
This helps commands like ``rsync --files-from=``.
If the ``=`` or ``:`` is actually part of the filename, it will be escaped as ``\:`` and ``\=``,
and no longer get this special treatment.
This matches Bash's behavior.
- Autosuggestions were sometimes not shown after recalling a line from history, which has been fixed (:issue:`10287`).
- Up-arrow search matches -- which are highlighted in reverse colors -- are no longer syntax-highlighted, to fix bad contrast with the search match highlighting.
- Up-arrow search matches -- which are highlighted in reverse video -- are no longer syntax-highlighted, to fix bad contrast with the search match highlighting.
- Command abbreviations (those with ``--position command`` or without a ``--position``) now also expand after decorators like ``command`` (:issue:`10396`).
- Abbreviations now expand after process separators like ``;`` and ``|``. This fixes a regression in version 3.6 (:issue:`9730`).
- When exporting interactively defined functions (using ``type``, ``functions`` or ``funcsave``) the function body is now indented, to match the interactive command line editor (:issue:`8603`).
- When exporting interactively defined functions (using ``type``, ``functions`` or ``funcsave``) the function body is now indented, same as in the interactive command line editor (:issue:`8603`).
- :kbd:`ctrl-x` (``fish_clipboard_copy``) on multiline commands now includes indentation (:issue:`10437`).
- :kbd:`ctrl-v` (``fish_clipboard_paste``) now strips ASCII control characters from the pasted text.
This is consistent with normal keyboard input (:issue:`5274`).
- When a command like ``fg %2`` fails to find the given job, it no longer behaves as if no job spec was given (:issue:`9835`).
- Redirection in command position like ``>echo`` is now highlighted as error (:issue:`8877`).
- ``fish_vi_cursor`` now works properly inside the prompt created by builtin ``read`` (:issue:`10088`).
- fish no longer fails to open a FIFO if interrupted by a terminal resize signal (:issue:`10250`).
- fish no longer fails to open a fifo if interrupted by a terminal resize signal (:issue:`10250`).
- ``read --help`` and friends no longer ignore redirections. This fixes a regression in version 3.1 (:issue:`10274`).
- Measuring a command with ``time`` now considers the time taken for command substitution (:issue:`9100`).
- ``fish_add_path`` now automatically enables verbose mode when used interactively (in the command line), in an effort to be clearer about what it does (:issue:`10532`).
- ``fish_add_path`` now automatically enables verbose mode when used interactively (in the commandline), in an effort to be clearer about what it does (:issue:`10532`).
- fish no longer adopts TTY modes of failed commands (:issue:`10603`).
- ``complete -e cmd`` now prevents autoloading completions for ``cmd`` (:issue:`6716`).
- fish's default color scheme no longer uses the color "blue", as it has bad contrast against the background in a few terminal's default palettes (:issue:`10758`, :issue:`10786`)
The color scheme will not be upgraded for existing installs. If you want, you should select it again via ``fish_config``.
- Command lines which are larger than the terminal are now displayed correctly, instead of multiple blank lines being displayed (:issue:`7296`).
- Prompts that use external commands will no longer produce an infinite loop if the command crashes (:issue:`9796`).
- Undo (:kbd:`ctrl-z`) restores the cursor position too (:issue:`10838`).
- The output of ``jobs`` shows "-" for jobs that have the same process group ID as the fish process, rather than "-2" (:issue:`10833`).
- Job expansion (``%1`` syntax) works properly for jobs that are a mixture of external commands and functions (:issue:`10832`).
- Command lines which have more lines than the terminal can be displayed and edited correctly (:issue:`10827`).
- Functions that have been erased are no longer highlighted as valid commands (:issue:`10866`).
- ``not``, ``time``, and variable assignments (that is ``not time a=b env``) is correctly recognized as valid syntax (:issue:`10890`).
- The Web-based configuration removes old right-hand-side prompts again, fixing a regression in fish 3.4.0 (:issue:`10675`).
- Further protection against programs which crash and leave the terminal in an inconsistent state (:issue:`10834`, :issue:`11038`).
- A workaround for git being very slow on macOS has been applied, improving performance after a fresh boot (:issue:`10535`).
- `complete -e cmd` now prevents autoloading completions for `cmd` (:issue:`6716`).
- fish's default colorscheme no longer uses the color "blue" as it has bad contrast against the background in a few terminal's default palettes (:issue:`10758`, :issue:`10786`)
The colorscheme will not be upgraded for existing installs. If you want, you should select it again via ``fish_config``.
New or improved bindings
^^^^^^^^^^^^^^^^^^^^^^^^
- When the cursor is on a command that resolves to an executable script, :kbd:`alt-o` will now open that script in your editor (:issue:`10266`).
- During up-arrow history search, :kbd:`shift-delete` will delete the current search item and move to the next older item. Previously this was only supported in the history pager.
- :kbd:`shift-delete` will also remove the currently-displayed autosuggestion from history, and remove it as a suggestion.
- During up-arrow history search, :kbd:`shift-delete` will delete the current search item and move to the next older item. Previously this was only supported in the history pager.
Same for autosuggestions.
- :kbd:`ctrl-Z` (also known as :kbd:`ctrl-shift-z`) is now bound to redo.
- Some improvements to the :kbd:`alt-e` binding which edits the command line in an external editor:
- :kbd:`alt-delete` now deletes the argument (which may contain quoted spaces) right of the cursor.
- Some improvements to the :kbd:`alt-e` binding which edits the commandline in an external editor:
- The editor's cursor position is copied back to fish. This is currently supported for Vim and Kakoune.
- Cursor position synchronization is only supported for a set of known editors, which are now also detected in aliases which use ``complete --wraps``. For example, use ``complete --wraps my-vim vim`` to synchronize cursors when ``EDITOR=my-vim``.
- Cursor position synchronization is only supported for a set of known editors. This has been extended by also resolving aliases. For example use ``complete --wraps my-vim vim`` to synchronize cursors when ``EDITOR=my-vim``.
- Multiline commands are indented before being sent to the editor, which matches how they are displayed in fish.
- The ``...-path-component`` bindings, like ``backward-kill-path-component``, now treat ``#`` as part of a path component (:issue:`10271`).
- The ``*-path-component`` bindings like ``backward-kill-path-component`` now treat ``#`` as part of a path component (:issue:`10271`).
- Bindings like :kbd:`alt-l` that print output in between prompts now work correctly with multiline commandlines.
- :kbd:`ctrl-c` no longer cancels builtin ``read``.
- :kbd:`alt-d` on an empty command line lists the directory history again. This restores the behavior of version 2.1.
- ``history-prefix-search-backward`` and ``-forward`` now maintain the cursor position, instead of moving the cursor to the end of the command line (:issue:`10430`).
- The following keys have refined behavior if the terminal supports :ref:`the new keyboard encodings <changelog-new-bindings>`:
- ``history-prefix-search-{backward,forward}`` now maintain the cursor position instead of moving the cursor to the end of the command line (:issue:`10430`).
- The :kbd:`E` binding in vi mode now correctly handles the last character of the word, by jumping to the next word (:issue:`9700`).
- The following keys have refined behavior if the terminal supports `disambiguating them <https://sw.kovidgoyal.net/kitty/keyboard-protocol/>`_:
- :kbd:`shift-enter` now inserts a newline instead of executing the command line.
- :kbd:`ctrl-backspace` now deletes the last word instead of only one character (:issue:`10741`).
- :kbd:`ctrl-backspace` now deletes the last word instead of only one character.
- :kbd:`ctrl-delete` deletes the next word (same as :kbd:`alt-d`).
- New special input functions:
- ``forward-char-passive`` and ``backward-char-passive`` are like their non-passive variants but do not accept autosuggestions or move focus in the completion pager (:issue:`10398`).
- ``forward-token``, ``backward-token``, ``kill-token``, and ``backward-kill-token`` are similar to the ``*-bigword`` variants but for the whole argument token (which includes escaped spaces) (:issue:`2014`).
- ``clear-commandline``, which merely clears the command line, as an alternative to ``cancel-commandline`` which prints ``^C`` and a new prompt (:issue:`10213`).
- The ``accept-autosuggestion`` special input function now returns false when there was nothing to accept (:issue:`10608`).
- ``forward-token``, ``backward-token``, ``kill-token``, and ``backward-kill-token`` are similar to the ``*-bigword`` variants but for the whole argument token which includes escaped spaces (:issue:`2014`).
- The ``accept-autosuggestion`` special input function now returns false when there was nothing to accept.
- Vi mode has seen some improvements but continues to suffer from the lack of people working on it.
- New default cursor shapes for insert and replace mode.
- :kbd:`ctrl-n` in insert mode accepts autosuggestions (:issue:`10339`).
- Insert-mode :kbd:`ctrl-n` accepts autosuggestions (:issue:`10339`).
- Outside insert mode, the cursor will no longer be placed beyond the last character on the commandline.
- When the cursor is at the end of the commandline, a single :kbd:`l` will accept an autosuggestion (:issue:`10286`).
- The cursor position after pasting (:kbd:`p`) has been corrected.
- Added an additional binding, :kbd:`_`, for moving to the beginning of the line (:issue:`10720`).
- When the cursor is at the start of a line, escaping from insert mode no longer moves the cursor to the previous line.
- Added bindings for clipboard interaction, like :kbd:`",+,p` and :kbd:`",+,y,y`.
- Deleting in visual mode now moves the cursor back, matching vi (:issue:`10394`).
- The :kbd:`;`, :kbd:`,`, :kbd:`v`, :kbd:`V`, :kbd:`I`, and :kbd:`gU` bindings work in visual mode (:issue:`10601`, :issue:`10648`).
- Support :kbd:`%` motion (:issue:`10593`).
- :kbd:`ctrl-k` to remove the contents of the line beyond the cursor in all modes (:issue:`10648`).
- Support `ab` and `ib` vi text objects. New input functions are introduced ``jump-{to,till}-matching-bracket`` (:issue:`1842`).
- The :kbd:`E` binding now correctly handles the last character of the word, by jumping to the next word (:issue:`9700`).
Completions
^^^^^^^^^^^
- Command-specific tab completions may now offer results whose first character is a period. For example, it is now possible to tab-complete ``git add`` for files with leading periods. The default file completions hide these files, unless the token itself has a leading period (:issue:`3707`).
- Option completion now uses fuzzy subsequence filtering, just like non-option completion (:issue:`830`).
This means that ``--fb`` may be completed to ``--foobar`` if there is no better match.
- Completions that insert an entire token now use quotes instead of backslashes to escape special characters (:issue:`5433`).
- Normally, file name completions start after the last ``:`` or ``=`` in a token.
This helps commands like ``rsync --files-from=``.
This special meaning can now disabled by escaping these separators as ``\:`` and ``\=``.
This matches Bash's behavior.
Note that this escaping is usually not necessary since the completion engine already tries
to guess whether the separator is actually part of a file name.
- Various new completion scripts and numerous updates to existing ones.
- Completions could hang if the ``PAGER`` environment variable was sent to certain editors on macOS, FreeBSD and some other platforms. This has been fixed (:issue:`10820`).
- Generated completions are now stored in ``$XDG_CACHE_HOME/fish`` or ``~/.cache/fish`` by default (:issue:`10369`)
- A regression in fish 3.1, where completing a command line could change it completely, has been fixed (:issue:`10904`).
Improved terminal support
^^^^^^^^^^^^^^^^^^^^^^^^^
- fish now marks the prompt and command-output regions (via OSC 133) to enable terminal shell integration (:issue:`10352`).
- Fish now marks the prompt and command-output regions (via OSC 133) to enable terminal shell integration (:issue:`10352`).
Shell integration shortcuts can scroll to the next/previous prompt or show the last command output in a pager.
- fish now reports the working directory (via OSC 7) unconditionally instead of only for some terminals (:issue:`9955`).
- fish now sets the terminal window title (via OSC 0) unconditionally instead of only for some terminals (:issue:`10037`).
- Fish now reports the working directory (via OSC 7) unconditionally instead of only for some terminals (:issue:`9955`).
- Fish now sets the terminal window title (via OSC 0) unconditionally instead of only for some terminals (:issue:`10037`).
- Focus reporting in tmux is no longer disabled on the first prompt.
- Focus reporting is now disabled during commands run inside key bindings (:issue:`6942`).
- Cursor changes are applied to all terminals that support them, and the list of specifically-supported terminals has been removed (:issue:`10693`).
- If it cannot find the terminfo entry given by :envvar:`TERM` environment variable, fish will now use an included ``xterm-256color`` definition to match the vast majority of current terminal emulators (:issue:`10905`). If you need to have a specific terminfo profile for your terminal's ``TERM`` variable, install it into the terminfo database.
- Further improvements to the correct display of prompts which fill the width of the terminal (:issue:`8164`).
- Focus reporting is now disabled during execution of bind commands (:issue:`6942`).
- ``fish_vi_cursor`` no longer attempts to detect if the terminal is capable, as we can no longer find terminals that aren't and the allowlist was hard to keep up-to-date. (:issue:`10693`)
Other improvements
------------------
- ``status`` gained a ``buildinfo`` subcommand, to print information on how fish was built, to help with debugging (:issue:`10896`).
- ``fish_indent`` will now collapse multiple empty lines into one (:issue:`10325`).
- ``fish_indent`` will now collapse multiple successive empty lines into one (:issue:`10325`).
- ``fish_indent`` now preserves the modification time of files if there were no changes (:issue:`10624`).
- Performance in launching external processes has been improved for many cases (:issue:`10869`).
- Performance and interactivity under Windows Subsystem for Linux has been improved, with a workaround for Windows-specific locations being appended to ``$PATH`` by default (:issue:`10506`).
- On macOS, paths from ``/etc/paths`` and ``/etc/manpaths`` containing colons are handled correctly (:issue:`10684`).
- Additional filesystems such as AFS are properly detected as remote, which avoids certain hangs due to expensive filesystem locks (:issue:`10818`).
- A spurious error when launching multiple instances of fish for the first time has been removed (:issue:`10813`).
- The HTML-based configuration UI (``fish_config``) now uses Alpine.js instead of AngularJS (:issue:`9554`).
- ``fish_config`` now also works in a Windows MSYS environment (:issue:`10111`).
- Performance and interactivity under WSLv1 and WSLv2 has been improved with a workaround for Windows-specific locations being appended to ``$PATH`` by default (:issue:`10506`).
.. _rust-packaging:
For distributors
----------------
fish has been ported to Rust. This means a significant change in dependencies, which are listed in the README. In short, Rust 1.70 or greater is required, and a C++ compiler is no longer needed (although a C compiler is still required, for some C glue code and the tests).
Fish has been ported to Rust. That means the dependencies have changed.
CMake remains the recommended build system, because of cargo's limited support for installing support files. Version 3.5 remains the minimum supported version. The Xcode generator for CMake is not supported any longer (:issue:`9924`). CMake builds default to optimized release builds (:issue:`10799`).
It now requires Rust 1.70 at least.
fish no longer depends on the ncurses library, but still uses a terminfo database. When packaging fish, please add a dependency on the package containing your terminfo database instead of curses.
CMake remains for now because cargo is unable to install the many asset files that fish needs. The minimum required CMake version has increased to 3.19.
The ``test`` target was removed as it can no longer be defined in new CMake versions. Use ``make fish_run_tests``. Any existing test target will not print output if it fails (:issue:`11116`).
Some smaller changes:
The Web-based configuration has been rewritten to use Alpine.js (:issue:`9554`).
--------------
fish 4.0b1 (released December 17, 2024)
=======================================
A number of improvements were included in fish 4.0.0 following the beta release of 4.0b1. These include fixes for regressions, improvements to completions and documentation, and the removal of a small number of problematic changes.
The full list of fixed issues can be found on the `GitHub milestone page for 4.0-final <https://github.com/fish-shell/fish-shell/milestone/43>`_.
- The default build configuration has changed to "Debug".
Please pass ``-DCMAKE_BUILD_TYPE=Release`` if you want to build a package.
- Xcode support has been removed (:issue:`9924`).
- fish no longer links against the (n)curses library, opting to read the terminfo database via the terminfo crate.
This means hashed terminfo databases are no longer supported (from our research, they are basically unmaintained and unused).
When packaging fish, please add a dependency on the package containing your terminfo database instead of curses,
if such a package is required.
If it cannot find a terminfo database, fish will now fall back on an included ``xterm-256color`` definition (:issue:`10269`).
--------------

View File

@@ -1,11 +1,11 @@
cmake_minimum_required(VERSION 3.15)
cmake_minimum_required(VERSION 3.5)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake")
project(fish LANGUAGES C)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
set(DEFAULT_BUILD_TYPE "RelWithDebInfo")
set(DEFAULT_BUILD_TYPE "Debug")
# Generate Xcode schemas (but not for tests).
set(CMAKE_XCODE_GENERATE_SCHEME 1)
@@ -56,9 +56,8 @@ function(CREATE_TARGET target)
${Rust_CARGO}
build --bin ${target}
$<$<CONFIG:Release>:--release>
$<$<CONFIG:RelWithDebInfo>:--profile=release-with-debug>
$<$<CONFIG:RelWithDebInfo>:--release>
--target ${Rust_CARGO_TARGET}
--no-default-features
${CARGO_FLAGS}
${FEATURES_ARG}
&&

View File

@@ -42,8 +42,8 @@ Guidelines
In short:
- Be conservative in what you need (keep to the agreed minimum supported Rust version, limit new dependencies)
- Use automated tools to help you (including ``make fish_run_tests`` and ``build_tools/style.fish``)
- Be conservative in what you need (``C++11``, few dependencies)
- Use automated tools to help you (including ``make test``, ``build_tools/style.fish`` and ``make lint``)
Contributing completions
========================
@@ -101,7 +101,7 @@ To ensure your changes conform to the style rules run
before committing your change. That will run our autoformatters:
- ``rustfmt`` for Rust
- ``git-clang-format`` for c++
- ``fish_indent`` (shipped with fish) for fish script
- ``black`` for python
@@ -207,7 +207,7 @@ The tests can be run on your local computer on all operating systems.
::
cmake path/to/fish-shell
make fish_run_tests
make test
Git hooks
---------
@@ -235,7 +235,7 @@ One possibility is a pre-push hook script like this one:
done
if [ "x$isprotected" = x1 ]; then
echo "Running tests before push to master"
make fish_run_tests
make test
RESULT=$?
if [ $RESULT -ne 0 ]; then
echo "Tests failed for a push to master, we can't let you do that" >&2
@@ -245,7 +245,7 @@ One possibility is a pre-push hook script like this one:
exit 0
This will check if the push is to the master branch and, if it is, only
allow the push if running ``make fish_run_tests`` succeeds. In some circumstances
allow the push if running ``make test`` succeeds. In some circumstances
it may be advisable to circumvent this check with
``git push --no-verify``, but usually that isnt necessary.
@@ -322,12 +322,12 @@ Setting Code Up For Translations
--------------------------------
All non-debug messages output for user consumption should be marked for
translation. In Rust, this requires the use of the ``wgettext!`` or ``wgettext_fmt!``
macros:
translation. In C++, this requires the use of the ``_`` (underscore)
macro:
::
streams.out.append(wgettext_fmt!("%ls: There are no jobs\n", argv[0]));
streams.out.append_format(_(L"%ls: There are no jobs\n"), argv[0]);
All messages in fish script must be enclosed in single or double quote
characters for our message extraction script to find them.

160
Cargo.lock generated
View File

@@ -20,15 +20,6 @@ version = "2.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de"
[[package]]
name = "block-buffer"
version = "0.10.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71"
dependencies = [
"generic-array",
]
[[package]]
name = "cc"
version = "1.1.30"
@@ -52,25 +43,6 @@ version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724"
[[package]]
name = "cpufeatures"
version = "0.2.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "608697df725056feaccfa42cffdaeeec3fccc4ffc38358ecd19b243e716a78e0"
dependencies = [
"libc",
]
[[package]]
name = "crypto-common"
version = "0.1.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3"
dependencies = [
"generic-array",
"typenum",
]
[[package]]
name = "dashmap"
version = "5.5.3"
@@ -84,16 +56,6 @@ dependencies = [
"parking_lot_core",
]
[[package]]
name = "digest"
version = "0.10.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292"
dependencies = [
"block-buffer",
"crypto-common",
]
[[package]]
name = "equivalent"
version = "1.0.1"
@@ -107,12 +69,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba"
dependencies = [
"libc",
"windows-sys 0.52.0",
"windows-sys",
]
[[package]]
name = "fish"
version = "4.0.1"
version = "0.1.0"
dependencies = [
"bitflags",
"cc",
@@ -128,7 +90,6 @@ dependencies = [
"portable-atomic",
"rand",
"rsconf",
"rust-embed",
"serial_test",
"terminfo",
"widestring",
@@ -154,16 +115,6 @@ version = "0.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f81ec6369c545a7d40e4589b5597581fa1c441fe1cce96dd1de43159910a36a2"
[[package]]
name = "generic-array"
version = "0.14.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a"
dependencies = [
"typenum",
"version_check",
]
[[package]]
name = "hashbrown"
version = "0.14.5"
@@ -420,49 +371,6 @@ dependencies = [
"cc",
]
[[package]]
name = "rust-embed"
version = "8.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fa66af4a4fdd5e7ebc276f115e895611a34739a9c1c01028383d612d550953c0"
dependencies = [
"rust-embed-impl",
"rust-embed-utils",
"walkdir",
]
[[package]]
name = "rust-embed-impl"
version = "8.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6125dbc8867951125eec87294137f4e9c2c96566e61bf72c45095a7c77761478"
dependencies = [
"proc-macro2",
"quote",
"rust-embed-utils",
"syn 2.0.79",
"walkdir",
]
[[package]]
name = "rust-embed-utils"
version = "8.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2e5347777e9aacb56039b0e1f28785929a8a3b709e87482e7442c72e7c12529d"
dependencies = [
"sha2",
"walkdir",
]
[[package]]
name = "same-file"
version = "1.0.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502"
dependencies = [
"winapi-util",
]
[[package]]
name = "scopeguard"
version = "1.2.0"
@@ -489,18 +397,7 @@ checksum = "079a83df15f85d89a68d64ae1238f142f172b1fa915d0d76b26a7cba1b659a69"
dependencies = [
"proc-macro2",
"quote",
"syn 1.0.109",
]
[[package]]
name = "sha2"
version = "0.10.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8"
dependencies = [
"cfg-if",
"cpufeatures",
"digest",
"syn",
]
[[package]]
@@ -532,17 +429,6 @@ dependencies = [
"unicode-ident",
]
[[package]]
name = "syn"
version = "2.0.79"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "89132cd0bf050864e1d38dc3bbc07a0eb8e7530af26344d3d2bbbef83499f590"
dependencies = [
"proc-macro2",
"quote",
"unicode-ident",
]
[[package]]
name = "terminfo"
version = "0.9.0"
@@ -555,49 +441,18 @@ dependencies = [
"phf_codegen",
]
[[package]]
name = "typenum"
version = "1.17.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825"
[[package]]
name = "unicode-ident"
version = "1.0.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe"
[[package]]
name = "version_check"
version = "0.9.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a"
[[package]]
name = "walkdir"
version = "2.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b"
dependencies = [
"same-file",
"winapi-util",
]
[[package]]
name = "widestring"
version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7219d36b6eac893fa81e84ebe06485e7dcbb616177469b142df14f1f4deb1311"
[[package]]
name = "winapi-util"
version = "0.1.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb"
dependencies = [
"windows-sys 0.59.0",
]
[[package]]
name = "windows-sys"
version = "0.52.0"
@@ -607,15 +462,6 @@ dependencies = [
"windows-targets",
]
[[package]]
name = "windows-sys"
version = "0.59.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b"
dependencies = [
"windows-targets",
]
[[package]]
name = "windows-targets"
version = "0.52.6"

View File

@@ -7,16 +7,11 @@ rust-version = "1.70"
edition = "2021"
[profile.release]
overflow-checks = true
lto = true
[profile.release-with-debug]
inherits = "release"
debug = true
[package]
name = "fish"
version = "4.0.1"
version = "0.1.0"
edition.workspace = true
rust-version.workspace = true
default-run = "fish"
@@ -57,7 +52,6 @@ rand = { version = "0.8.5", default-features = false, features = ["small_rng"] }
widestring = "1.1.0"
# We need 0.9.0 specifically for some crash fixes.
terminfo = "0.9.0"
rust-embed = { version = "8.2.0", optional = true }
[target.'cfg(not(target_has_atomic = "64"))'.dependencies]
portable-atomic = { version = "1", default-features = false, features = [
@@ -88,9 +82,8 @@ name = "fish_key_reader"
path = "src/bin/fish_key_reader.rs"
[features]
default = ["installable"]
default = []
benchmark = []
installable = ["dep:rust-embed"]
# The following features are auto-detected by the build-script and should not be enabled manually.
asan = []
@@ -103,4 +96,3 @@ rust.unknown_lints = "allow"
rust.unstable_name_collisions = "allow"
clippy.manual_range_contains = "allow"
clippy.needless_return = "allow"
clippy.needless_lifetimes = "allow"

View File

@@ -55,11 +55,7 @@ clean:
.PHONY: test
test: build/fish
$(CMAKE) --build build --target fish_run_tests
.PHONY: fish_run_tests
fish_run_tests: build/fish
$(CMAKE) --build build --target fish_run_tests
$(CMAKE) --build build --target test
.PHONY: install
install: build/fish

View File

@@ -66,7 +66,8 @@ Windows
for Linux with the instructions for the appropriate distribution
listed above under “Packages for Linux”, or from source with the
instructions below.
- fish (4.0 on and onwards) cannot be installed in Cygwin, due to a lack of Rust support.
- Fish can also be installed on all versions of Windows using
`Cygwin <https://cygwin.com/>`__ (from the **Shells** category).
Building from source
~~~~~~~~~~~~~~~~~~~~
@@ -120,27 +121,33 @@ Building
Dependencies
~~~~~~~~~~~~
Compiling fish requires:
Compiling fish from a tarball requires:
- a C++11 compiler (g++ 4.8 or later, or clang 3.3 or later)
- CMake (version 3.5 or later)
- PCRE2 (headers and libraries) - optional, this will be downloaded if missing
- gettext (headers and libraries) - optional, for translation support
Sphinx is also optionally required to build the documentation from a
cloned git repository.
Additionally, running the test suite requires Python 3.5+ and the pexpect package.
Dependencies, git master
~~~~~~~~~~~~~~~~~~~~~~~~
Building from git master currently requires:
- Rust (version 1.70 or later)
- CMake (version 3.15 or later)
- CMake (version 3.19 or later)
- a C compiler (for system feature detection and the test helper binary)
- PCRE2 (headers and libraries) - optional, this will be downloaded if missing
- gettext (headers and libraries) - optional, for translation support
- an Internet connection, as other dependencies will be downloaded automatically
Sphinx is also optionally required to build the documentation from a
cloned git repository.
Additionally, running the full test suite requires Python 3, tmux, and the pexpect package.
Building from source with CMake
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Rather than building from source, consider using a packaged build for your platform. Using the
steps below makes fish difficult to uninstall or upgrade. Release packages are available from the
links above, and up-to-date `development builds of fish are available for many platforms
<https://github.com/fish-shell/fish-shell/wiki/Development-builds>`__
Building from source (all platforms) - Makefile generator
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To install into ``/usr/local``, run:
@@ -148,50 +155,35 @@ To install into ``/usr/local``, run:
mkdir build; cd build
cmake ..
cmake --build .
sudo cmake --install .
make
sudo make install
The install directory can be changed using the
``-DCMAKE_INSTALL_PREFIX`` parameter for ``cmake``.
CMake Build options
~~~~~~~~~~~~~~~~~~~
Build options
~~~~~~~~~~~~~
In addition to the normal CMake build options (like ``CMAKE_INSTALL_PREFIX``), fish's CMake build has some other options available to customize it.
In addition to the normal CMake build options (like ``CMAKE_INSTALL_PREFIX``), fish has some other options available to customize it.
- BUILD_DOCS=ON|OFF - whether to build the documentation. This is automatically set to OFF when Sphinx isn't installed.
- INSTALL_DOCS=ON|OFF - whether to install the docs. This is automatically set to on when BUILD_DOCS is or prebuilt documentation is available (like when building in-tree from a tarball).
- FISH_USE_SYSTEM_PCRE2=ON|OFF - whether to use an installed pcre2. This is normally autodetected.
- MAC_CODESIGN_ID=String|OFF - the codesign ID to use on Mac, or "OFF" to disable codesigning.
- WITH_GETTEXT=ON|OFF - whether to build with gettext support for translations.
- extra_functionsdir, extra_completionsdir and extra_confdir - to compile in an additional directory to be searched for functions, completions and configuration snippets
Building fish as self-installable (experimental)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Note that fish does *not* support static linking and will attempt to error out if it detects it.
You can also build fish as a self-installing binary.
Help, it didnt build!
~~~~~~~~~~~~~~~~~~~~~~
This will include all the datafiles like the included functions or web configuration tool in the main ``fish`` binary.
On Debian or Ubuntu you want these packages:
On the first interactive run, and whenever it notices they are out of date, it will extract the datafiles to ~/.local/share/fish/install/ (currently, subject to change). You can do this manually by running ``fish --install``.
::
To install fish as self-installable, just use ``cargo``, like::
sudo apt install build-essential cmake libpcre2-dev gettext
cargo install --path /path/to/fish # if you have a git clone
cargo install --git https://github.com/fish-shell/fish-shell --tag 4.0 # to build from git once 4.0 is released
cargo install --git https://github.com/fish-shell/fish-shell # to build the current development snapshot without cloning
This will place the binaries in ``~/.cargo/bin/``, but you can place them wherever you want.
This build won't have the HTML docs (``help`` will open the online version) or translations.
It will try to build the man pages with sphinx-build. If that is not available and you would like to include man pages, you need to install it and retrigger the build script, e.g. by setting FISH_BUILD_DOCS=1::
FISH_BUILD_DOCS=1 cargo install --path .
Setting it to "0" disables the inclusion of man pages.
You can also link this build statically (but not against glibc) and move it to other computers.
On RedHat, CentOS, or Amazon EC2 everything should be preinstalled.
Contributing Changes to the Code
--------------------------------

144
build.rs
View File

@@ -29,25 +29,13 @@ fn main() {
.unwrap(),
);
// Some build info
rsconf::set_env_value("BUILD_TARGET_TRIPLE", &env::var("TARGET").unwrap());
rsconf::set_env_value("BUILD_HOST_TRIPLE", &env::var("HOST").unwrap());
rsconf::set_env_value("BUILD_PROFILE", &env::var("PROFILE").unwrap());
let version = &get_version(&env::current_dir().unwrap());
// Per https://doc.rust-lang.org/cargo/reference/build-scripts.html#inputs-to-the-build-script,
// the source directory is the current working directory of the build script
rsconf::set_env_value("FISH_BUILD_VERSION", version);
rsconf::set_env_value(
"FISH_BUILD_VERSION",
&get_version(&env::current_dir().unwrap()),
);
std::env::set_var("FISH_BUILD_VERSION", version);
#[cfg(feature = "installable")]
#[cfg(not(clippy))]
{
let cman = std::fs::canonicalize(env!("CARGO_MANIFEST_DIR")).unwrap();
let targetman = cman.as_path().join("target").join("man");
build_man(&targetman);
}
rsconf::rebuild_if_path_changed("src/libc.c");
cc::Build::new()
.file("src/libc.c")
@@ -235,18 +223,10 @@ fn get_path(name: &str, default: &str, onvar: PathBuf) -> PathBuf {
var
}
let (prefix_from_home, prefix) = if let Ok(pre) = env::var("PREFIX") {
(false, PathBuf::from(pre))
} else {
(true, PathBuf::from(".local/"))
};
// If someone gives us a $PREFIX, we need it to be absolute.
// Otherwise we would try to get it from $HOME and that won't really work.
if !prefix_from_home && prefix.is_relative() {
let prefix = PathBuf::from(env::var("PREFIX").unwrap_or("/usr/local".to_string()));
if prefix.is_relative() {
panic!("Can't have relative prefix");
}
rsconf::rebuild_if_env_changed("PREFIX");
rsconf::set_env_value("PREFIX", prefix.to_str().unwrap());
@@ -254,24 +234,11 @@ fn get_path(name: &str, default: &str, onvar: PathBuf) -> PathBuf {
rsconf::set_env_value("DATADIR", datadir.to_str().unwrap());
rsconf::rebuild_if_env_changed("DATADIR");
let datadir_subdir = if prefix_from_home {
"fish/install"
} else {
"fish"
};
rsconf::set_env_value("DATADIR_SUBDIR", datadir_subdir);
let bindir = get_path("BINDIR", "bin/", prefix.clone());
rsconf::set_env_value("BINDIR", bindir.to_str().unwrap());
rsconf::rebuild_if_env_changed("BINDIR");
let sysconfdir = get_path(
"SYSCONFDIR",
// If we get our prefix from $HOME, we should use the system's /etc/
// ~/.local/share/etc/ makes no sense
if prefix_from_home { "/etc/" } else { "etc/" },
datadir.clone(),
);
let sysconfdir = get_path("SYSCONFDIR", "etc/", datadir.clone());
rsconf::set_env_value("SYSCONFDIR", sysconfdir.to_str().unwrap());
rsconf::rebuild_if_env_changed("SYSCONFDIR");
@@ -303,7 +270,7 @@ fn get_version(src_dir: &Path) -> String {
if !rev.is_empty() {
// If it contains a ".", we have a proper version like "3.7",
// or "23.2.1-1234-gfab1234"
if rev.contains('.') {
if rev.contains(".") {
return rev;
}
// If it doesn't, we probably got *just* the commit SHA,
@@ -316,98 +283,7 @@ fn get_version(src_dir: &Path) -> String {
return version + "-g" + &rev;
}
}
// TODO: Do we just use the cargo version here?
// git did not tell us a SHA either because it isn't installed,
// or because it refused (safe.directory applies to `git describe`!)
// So we read the SHA ourselves.
fn get_git_hash() -> Result<String, Box<dyn std::error::Error>> {
let gitdir = PathBuf::from(env!("CARGO_MANIFEST_DIR")).join(".git");
// .git/HEAD contains ref: refs/heads/branch
let headpath = gitdir.join("HEAD");
let headstr = read_to_string(headpath)?;
let headref = headstr.split(' ').collect::<Vec<_>>()[1].trim();
// .git/refs/heads/branch contains the SHA
let refpath = gitdir.join(headref);
// Shorten to 9 characters (what git describe does currently)
let refstr = &read_to_string(refpath)?[0..9];
let refstr = refstr.trim();
let version = env!("CARGO_PKG_VERSION").to_owned();
Ok(version + "-g" + refstr)
}
get_git_hash().expect("Could not get a version. Either set $FISH_BUILD_VERSION or install git.")
}
#[cfg(feature = "installable")]
// disable clippy because otherwise it would panic without sphinx
#[cfg(not(clippy))]
fn build_man(build_dir: &Path) {
use std::process::Command;
let mandir = build_dir;
let sec1dir = mandir.join("man1");
let docsrc_path = std::fs::canonicalize(env!("CARGO_MANIFEST_DIR"))
.unwrap()
.as_path()
.join("doc_src");
let docsrc = docsrc_path.to_str().unwrap();
let args = &[
"-j",
"auto",
"-q",
"-b",
"man",
"-c",
docsrc,
// doctree path - put this *above* the man1 dir to exclude it.
// this is ~6M
"-d",
mandir.to_str().unwrap(),
docsrc,
sec1dir.to_str().unwrap(),
];
let _ = std::fs::create_dir_all(sec1dir.to_str().unwrap());
rsconf::rebuild_if_env_changed("FISH_BUILD_DOCS");
if env::var("FISH_BUILD_DOCS") == Ok("0".to_string()) {
println!("cargo:warning=Skipping man pages because $FISH_BUILD_DOCS is set to 0");
return;
}
// We run sphinx to build the man pages.
// Every error here is fatal so cargo doesn't cache the result
// - if we skipped the docs with sphinx not installed, installing it would not then build the docs.
// That means you need to explicitly set $FISH_BUILD_DOCS=0 (`FISH_BUILD_DOCS=0 cargo install --path .`),
// which is unfortunate - but the docs are pretty important because they're also used for --help.
match Command::new("sphinx-build").args(args).spawn() {
Err(x) if x.kind() == std::io::ErrorKind::NotFound => {
if env::var("FISH_BUILD_DOCS") == Ok("1".to_string()) {
panic!("Could not find sphinx-build to build man pages.\nInstall sphinx or disable building the docs by setting $FISH_BUILD_DOCS=0.");
}
println!("cargo:warning=Cannot find sphinx-build to build man pages.");
println!("cargo:warning=If you install it now you need to run `cargo clean` and rebuild, or set $FISH_BUILD_DOCS=1 explicitly.");
}
Err(x) => {
// Another error - permissions wrong etc
panic!("Error starting sphinx-build to build man pages: {:?}", x);
}
Ok(mut x) => match x.wait() {
Err(err) => {
panic!(
"Error waiting for sphinx-build to build man pages: {:?}",
err
);
}
Ok(out) => {
if out.success() {
// Success!
return;
} else {
panic!("sphinx-build failed to build the man pages.");
}
}
},
}
"unknown".to_string()
}

View File

@@ -53,16 +53,16 @@ fi
if test -r "$FBVF"
then
VC=$(cat "$FBVF")
VC=$(grep -v '^#' "$FBVF" | tr -d '"' | sed -e 's/^FISH_BUILD_VERSION=//')
else
VC="unset"
fi
# Maybe output the FBVF
# It looks like "2.7.1-621-ga2f065e6"
# It looks like FISH_BUILD_VERSION="2.7.1-621-ga2f065e6"
test "$VN" = "$VC" || {
echo >&2 "$VN"
echo "$VN" >"$FBVF"
echo >&2 "FISH_BUILD_VERSION=$VN"
echo "FISH_BUILD_VERSION=\"$VN\"" >"$FBVF"
}
# Output the fish-build-version-witness.txt

View File

@@ -142,7 +142,7 @@ fi
(cd "$PKGDIR/build_arm64" && env $ARM64_DEPLOY_TARGET make -j 12 fish_macapp)
(cd "$PKGDIR/build_x86_64" && env $X86_64_DEPLOY_TARGET make -j 12 fish_macapp)
# Make the app's /usr/local/bin binaries universal. Note fish.app/Contents/MacOS/fish already is, courtesy of CMake.
# Make the app's /usr/local/bin binaries universal. Note fish.app/Contents/MacOS/fish already is, courtsey of CMake.
cd "$PKGDIR/build_arm64"
for FILE in fish.app/Contents/Resources/base/usr/local/bin/*; do
X86_FILE="$PKGDIR/build_x86_64/fish.app/Contents/Resources/base/usr/local/bin/$(basename $FILE)"

View File

@@ -29,7 +29,7 @@ add_custom_target(sphinx-docs
# sphinx-manpages needs the fish_indent binary for the version number
add_custom_target(sphinx-manpages
env FISH_BUILD_VERSION_FILE="${CMAKE_CURRENT_BINARY_DIR}/${FBVF}"
env PATH="${CMAKE_BINARY_DIR}:$$PATH"
${SPHINX_EXECUTABLE}
-j auto
-q -b man
@@ -38,7 +38,7 @@ add_custom_target(sphinx-manpages
"${SPHINX_SRC_DIR}"
# TODO: This only works if we only have section 1 manpages.
"${SPHINX_MANPAGE_DIR}/man1"
DEPENDS CHECK-FISH-BUILD-VERSION-FILE
DEPENDS fish_indent
COMMENT "Building man pages with Sphinx")
if(SPHINX_EXECUTABLE)

View File

@@ -265,6 +265,18 @@ else()
endif()
if (_RUSTC_VERSION_RAW MATCHES "rustup [0-9\\.]+")
if (_USER_SPECIFIED_RUSTC)
message(
WARNING "User-specified Rust_COMPILER pointed to rustup's rustc proxy. Corrosion's "
"FindRust will always try to evaluate to an actual Rust toolchain, and so the "
"user-specified Rust_COMPILER will be discarded in favor of the default "
"rustup-managed toolchain."
)
unset(Rust_COMPILER)
unset(Rust_COMPILER CACHE)
endif()
# Get `rustup` next to the `rustc` proxy
get_filename_component(_RUST_PROXIES_PATH "${_Rust_COMPILER_TEST}" DIRECTORY)
find_program(Rust_RUSTUP rustup HINTS "${_RUST_PROXIES_PATH}" NO_DEFAULT_PATH)
@@ -306,23 +318,18 @@ if (Rust_RESOLVE_RUSTUP_TOOLCHAINS)
set(_DISCOVERED_TOOLCHAINS_VERSION "")
foreach(_TOOLCHAIN_RAW ${_TOOLCHAINS_RAW})
# We're going to try to parse the output of `rustup toolchain list --verbose`.
# We expect output like this:
# stable-random-toolchain-junk (parenthesized-random-stuff-like-active-or-default) /path/to/toolchain/blah/more-blah
# In the following regex, we capture the toolchain name, any parenthesized stuff, and then the path.
message(STATUS "Parsing toolchain: ${_TOOLCHAIN_RAW}")
if (_TOOLCHAIN_RAW MATCHES "([^\t ]+)[\t ]*(\\(.*\\))?[\t ]*(.+)")
if (_TOOLCHAIN_RAW MATCHES "([a-zA-Z0-9\\._\\-]+)[ \t\r\n]?(\\(default\\) \\(override\\)|\\(default\\)|\\(override\\))?[ \t\r\n]+(.+)")
set(_TOOLCHAIN "${CMAKE_MATCH_1}")
set(_TOOLCHAIN_TYPE "${CMAKE_MATCH_2}")
set(_TOOLCHAIN_PATH "${CMAKE_MATCH_3}")
set(_TOOLCHAIN_${_TOOLCHAIN}_PATH "${CMAKE_MATCH_3}")
if (_TOOLCHAIN_TYPE MATCHES "default")
if (_TOOLCHAIN_TYPE MATCHES ".*\\(default\\).*")
set(_TOOLCHAIN_DEFAULT "${_TOOLCHAIN}")
endif()
if (_TOOLCHAIN_TYPE MATCHES "override")
if (_TOOLCHAIN_TYPE MATCHES ".*\\(override\\).*")
set(_TOOLCHAIN_OVERRIDE "${_TOOLCHAIN}")
endif()

View File

@@ -106,7 +106,7 @@ configure_file(fish.pc.in fish.pc.noversion @ONLY)
add_custom_command(OUTPUT fish.pc
COMMAND sed '/Version/d' fish.pc.noversion > fish.pc
COMMAND printf "Version: " >> fish.pc
COMMAND cat ${FBVF} >> fish.pc
COMMAND sed 's/FISH_BUILD_VERSION=//\;s/\"//g' ${FBVF} >> fish.pc
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
DEPENDS CHECK-FISH-BUILD-VERSION-FILE ${CMAKE_CURRENT_BINARY_DIR}/fish.pc.noversion)

View File

@@ -22,7 +22,7 @@ else()
set(rust_target_dir "${FISH_RUST_BUILD_DIR}/${Rust_CARGO_HOST_TARGET}")
endif()
set(rust_profile $<IF:$<CONFIG:Debug>,debug,$<IF:$<CONFIG:RelWithDebInfo>,release-with-debug,release>>)
set(rust_profile $<IF:$<CONFIG:Debug>,debug,release>)
set(rust_debugflags "$<$<CONFIG:Debug>:-g>$<$<CONFIG:RelWithDebInfo>:-g>")
@@ -49,8 +49,6 @@ set(VARS_FOR_CARGO
"PREFIX=${CMAKE_INSTALL_PREFIX}"
# Temporary hack to propogate CMake flags/options to build.rs.
"CMAKE_WITH_GETTEXT=${CMAKE_WITH_GETTEXT}"
# Cheesy so we can tell cmake was used to build
"CMAKE=1"
"DOCDIR=${CMAKE_INSTALL_FULL_DOCDIR}"
"DATADIR=${CMAKE_INSTALL_FULL_DATADIR}"
"SYSCONFDIR=${CMAKE_INSTALL_FULL_SYSCONFDIR}"

View File

@@ -8,11 +8,13 @@ set(CMAKE_FOLDER tests)
# pass but it should not be considered a failed test run, either.
set(SKIP_RETURN_CODE 125)
# Even though we are using CMake's ctest for testing, we still define our own `make fish_run_tests` target
# Even though we are using CMake's ctest for testing, we still define our own `make test` target
# rather than use its default for many reasons:
# * CMake doesn't run tests in-proc or even add each tests as an individual node in the ninja
# dependency tree, instead it just bundles all tests into a target called `test` that always just
# shells out to `ctest`, so there are no build-related benefits to not doing that ourselves.
# * CMake devs insist that it is appropriate for `make test` to never depend on `make all`, i.e.
# running `make test` does not require any of the binaries to be built before testing.
# * The only way to have a test depend on a binary is to add a fake test with a name like
# "build_fish" that executes CMake recursively to build the `fish` target.
# * Circling back to the point about individual tests not being actual Makefile targets, CMake does
@@ -30,6 +32,15 @@ add_custom_target(fish_run_tests
USES_TERMINAL
)
# If CMP0037 is available, also make an alias "test" target.
# Note that this policy may not be available, in which case definining such a target silently fails.
cmake_policy(PUSH)
if(POLICY CMP0037)
cmake_policy(SET CMP0037 OLD)
add_custom_target(test DEPENDS fish_run_tests)
endif()
cmake_policy(POP)
# The "test" directory.
set(TEST_DIR ${CMAKE_CURRENT_BINARY_DIR}/test)
@@ -43,7 +54,6 @@ set(TEST_ROOT_DIR ${TEST_DIR}/root)
if(NOT FISH_IN_TREE_BUILD)
add_custom_target(funcs_dir)
add_custom_command(TARGET funcs_dir
POST_BUILD
COMMAND mkdir -p ${CMAKE_BINARY_DIR}/share
# Don't run ln twice or it will create a new link in the link.
COMMAND test -e ${CMAKE_BINARY_DIR}/share/functions || ln -sf
@@ -53,7 +63,6 @@ if(NOT FISH_IN_TREE_BUILD)
add_custom_target(tests_dir DEPENDS tests)
add_custom_command(TARGET tests_dir
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_directory
${CMAKE_SOURCE_DIR}/tests/ ${CMAKE_BINARY_DIR}/tests/
COMMENT "Copying test files to binary dir"
@@ -70,7 +79,7 @@ configure_file(build_tools/pexpect_helper.py pexpect_helper.py COPYONLY)
set(CMAKE_XCODE_GENERATE_SCHEME 0)
# CMake being CMake, you can't just add a DEPENDS argument to add_test to make it depend on any of
# your binaries actually being built before `make fish_run_tests` is executed (requiring `make all` first),
# your binaries actually being built before `make test` is executed (requiring `make all` first),
# and the only dependency a test can have is on another test. So we make building fish
# prerequisites to our entire top-level `test` target.
function(add_test_target NAME)
@@ -144,7 +153,7 @@ endif()
add_test(
NAME "cargo-test"
COMMAND env ${VARS_FOR_CARGO} cargo test --no-default-features ${CARGO_FLAGS} --workspace --target-dir ${rust_target_dir} ${cargo_test_flags}
COMMAND env ${VARS_FOR_CARGO} cargo test ${CARGO_FLAGS} --workspace --target-dir ${rust_target_dir} ${cargo_test_flags}
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
)
set_tests_properties("cargo-test" PROPERTIES SKIP_RETURN_CODE ${SKIP_RETURN_CODE})

25
debian/control vendored
View File

@@ -3,16 +3,10 @@ Section: shells
Priority: optional
Maintainer: ridiculous_fish <corydoras@ridiculousfish.com>
Uploaders: David Adam <zanchey@ucc.gu.uwa.edu.au>
Build-Depends: debhelper (>= 12),
cargo (>= 0.66) | cargo-mozilla (>= 0.66),
cmake (>= 3.15.0) | cmake-mozilla (>= 3.15.0),
gettext,
libpcre2-dev,
rustc (>= 1.70),
Build-Depends: debhelper (>= 12), cmake (>= 3.19.0) | cmake-mozilla (>= 3.19.0), gettext,
rustc (>= 1.70), cargo (>= 0.66) | cargo-mozilla (>= 0.66), libpcre2-dev,
# Test dependencies
locales-all,
ncurses-base,
python3
locales-all, python3
Standards-Version: 4.1.5
Homepage: https://fishshell.com/
Vcs-Git: https://github.com/fish-shell/fish-shell.git
@@ -20,17 +14,8 @@ Vcs-Browser: https://github.com/fish-shell/fish-shell
Package: fish
Architecture: any
Depends: bsdextrautils,
Depends: bsdextrautils | bsdmainutils,
file,
gettext-base,
groff-base,
man-db,
ncurses-base,
procps,
python3 (>=3.5),
${misc:Depends},
${shlibs:Depends}
Depends: ${shlibs:Depends}, ${misc:Depends}, passwd (>= 4.0.3-10), gettext-base, man-db,
procps, python3 (>=3.5)
Conflicts: fish-common
Recommends: xsel (>=1.2.0)
Suggests: xdg-utils

View File

@@ -1,22 +0,0 @@
[licenses]
# We want really high confidence when inferring licenses from text
confidence-threshold = 0.93
unused-allowed-license = "allow" # don't warn for unused licenses in this list
allow = [
"BSD-2-Clause",
"BSD-3-Clause",
"BSL-1.0",
"GPL-2.0",
"ISC",
"LGPL-2.0",
"MIT",
"MPL-2.0",
"PSF-2.0",
"Unicode-DFS-2016",
"WTFPL",
"Zlib",
]
[sources.allow-org]
# 1 or more github.com organizations to allow git sources for
github = ["fish-shell"]

View File

@@ -53,7 +53,7 @@ Combining these features, it is possible to create custom syntaxes, where a regu
> abbr > ~/.config/fish/conf.d/myabbrs.fish
This will save all your abbreviations in "myabbrs.fish", overwriting the whole file so it doesn't leave any duplicates,
This will save all your abbrevations in "myabbrs.fish", overwriting the whole file so it doesn't leave any duplicates,
or restore abbreviations you had erased.
Of course any functions will have to be saved separately, see :doc:`funcsave <funcsave>`.
@@ -125,7 +125,6 @@ This first creates a function ``vim_edit`` which prepends ``vim`` before its arg
This creates an abbreviation "4DIRS" which expands to a multi-line loop "template." The template enters each directory and then leaves it. The cursor is positioned ready to enter the command to run in each directory, at the location of the ``!``, which is itself erased.
::
abbr --command git co checkout
Turns "co" as an argument to "git" into "checkout". Multiple commands are possible, ``--command={git,hg}`` would expand "co" to "checkout" for both git and hg.

View File

@@ -23,7 +23,7 @@ If both ``KEYS`` and ``COMMAND`` are given, ``bind`` adds (or replaces) a bindin
If only ``KEYS`` is given, any existing binding in the given ``MODE`` will be printed.
``KEYS`` is a comma-separated list of key names.
Modifier keys can be specified by prefixing a key name with a combination of ``ctrl-``, ``alt-`` and ``shift-``.
Modifier keys can be specified by prefixing a key name with a combination of ``ctrl-``/``c-``, ``alt-``/``a-`` and ``shift-``.
For example, pressing :kbd:`w` while holding the Alt modifier is written as ``alt-w``.
Key names are case-sensitive; for example ``alt-W`` is the same as ``alt-shift-w``.
``ctrl-x,ctrl-e`` would mean pressing :kbd:`ctrl-x` followed by :kbd:`ctrl-e`.
@@ -162,7 +162,7 @@ The following special input functions are available:
start selecting text
``cancel``
close the pager if it is open, or undo the most recent completion if one was just inserted, or otherwise cancel the current commandline and replace it with a new empty one
cancel the current commandline and replace it with a new empty one
``cancel-commandline``
cancel the current commandline and replace it with a new empty one, leaving the old one in place with a marker to show that it was cancelled
@@ -170,9 +170,6 @@ The following special input functions are available:
``capitalize-word``
make the current word begin with a capital letter
``clear-commandline``
empty the entire commandline
``clear-screen``
clears the screen and redraws the prompt. if the terminal doesn't support clearing the screen it is the same as ``repaint``.
@@ -262,7 +259,7 @@ The following special input functions are available:
search the history for the next matching argument
``forward-jump`` and ``backward-jump``
read another character and jump to its next occurrence after/before the cursor
read another character and jump to its next occurence after/before the cursor
``forward-jump-till`` and ``backward-jump-till``
jump to right *before* the next occurrence
@@ -272,7 +269,7 @@ The following special input functions are available:
``jump-to-matching-bracket``
jump to matching bracket if the character under the cursor is bracket;
otherwise, jump to the next occurrence of *any right* bracket after the cursor.
otherwise, jump to the next occurence of *any right* bracket after the cursor.
The following brackets are considered: ``([{}])``
``jump-till-matching-bracket``
@@ -295,7 +292,7 @@ The following special input functions are available:
move the selected text to the killring
``kill-whole-line``
move the line (including the following newline) to the killring. If the line is the last line, its preceding newline is also removed
move the line (including the following newline) to the killring. If the line is the last line, its preceeding newline is also removed
``kill-inner-line``
move the line (without the following newline) to the killring

View File

@@ -71,7 +71,7 @@ The following options change what part of the commandline is printed or updated:
Selects the current token
**--search-field**
Use the pager search field instead of the command line. Returns false if the search field is not shown.
Use the pager search field instead of the command line. Returns false is the search field is not shown.
The following options change the way ``commandline`` prints the current commandline buffer:
@@ -97,12 +97,7 @@ If ``commandline`` is called during a call to complete a given string using ``co
The following options output metadata about the commandline state:
**-L** or **--line**
If no argument is given, print the line that the cursor is on, with the topmost line starting at 1.
Otherwise, set the cursor to the given line.
**--column**
If no argument is given, print the 1-based offset from the start of the line to the cursor position in Unicode code points.
Otherwise, set the cursor to the given code point offset.
Print the line that the cursor is on, with the topmost line starting at 1.
**-S** or **--search-mode**
Evaluates to true if the commandline is performing a history search.
@@ -116,7 +111,7 @@ The following options output metadata about the commandline state:
**--is-valid**
Returns true when the commandline is syntactically valid and complete.
If it is, it would be executed when the ``execute`` bind function is called.
If the commandline is incomplete, return 2, if erroneous, return 1.
If the commandline is incomplete, return 2, if erroneus, return 1.
**--showing-suggestion**
Evaluates to true (i.e. returns 0) when the shell is currently showing an automatic history completion/suggestion, available to be consumed via one of the `forward-` bindings.

View File

@@ -1,50 +0,0 @@
.. _cmd-export:
export - compatibility function for exporting variables
=======================================================
Synopsis
--------
.. synopsis::
export
export NAME=VALUE
Description
-----------
``export`` is a function included for compatibility with POSIX shells. In general, the :doc:`set <set>`
builtin should be used instead.
When called without arguments, ``export`` prints a list of currently-exported variables, like ``set
-x``.
When called with a ``NAME=VALUE`` pair, the variable ``NAME`` is set to ``VALUE`` in the global
scope, and exported as an environment variable to other commands.
There are no options available.
Example
-------
The following commands have an identical effect.
::
set -gx PAGER bat
export PAGER=bat
Note: If you want to add to e.g. ``$PATH``, you need to be careful to :ref:`combine the list <cartesian-product>`. Quote it, like so::
export PATH="$PATH:/opt/bin"
Or just use ``set``, which avoids this::
set -gx PATH $PATH /opt/bin
See more
--------
1. The :doc:`set <set>` command.

View File

@@ -34,18 +34,12 @@ The following options are available:
See :ref:`Debugging <debugging-fish>` below for details.
**-o** or **--debug-output=DEBUG_FILE**
Specifies a file path to receive the debug output, including categories and :envvar:`fish_trace`.
The default is standard error.
Specifies a file path to receive the debug output, including categories and :envvar:`fish_trace`.
The default is stderr.
**-i** or **--interactive**
The shell is interactive.
**--install[=PATH]**
When built as self-installable (via cargo), this will unpack fish's data files and place them in ``~/.local/share/fish/install/``.
fish will also ask to do this automatically when run interactively.
If PATH is given, fish will install itself into a relocatable directory tree rooted at that path.
That means it will install the data files to PATH/share/fish and copy itself to PATH/bin/fish.
**-l** or **--login**
Act as if invoked as a login shell.

View File

@@ -26,12 +26,15 @@ The first argument to fish_title contains the most recently executed foreground
This requires that your terminal supports programmable titles and the feature is turned on.
To disable setting the title, use an empty function (see below).
Example
-------
A simple title::
A simple title:
::
function fish_title
set -q argv[1]; or set argv fish
@@ -40,7 +43,3 @@ A simple title::
echo (fish_prompt_pwd_dir_length=1 prompt_pwd): $argv;
end
Do not change the title::
function fish_title
end

View File

@@ -279,7 +279,7 @@ Examples
path normalize [-z | --null-in] [-Z | --null-out] [-q | --quiet] [PATH ...]
``path normalize`` returns the normalized versions of all paths. That means it squashes duplicate "/", collapses "../" with earlier components and removes "." components.
``path normalize`` returns the normalized versions of all paths. That means it squashes duplicate "/" (except for two leading "//"), collapses "../" with earlier components and removes "." components.
Unlike ``realpath`` or ``path resolve``, it does not make the paths absolute. It also does not resolve any symlinks. As such it can operate on non-existent paths.

View File

@@ -20,7 +20,7 @@ Description
fish will search the working directory to resolve relative paths but will not search :envvar:`PATH` .
If no file is specified and a file or pipeline is connected to standard input, or if the file name ``-`` is used, ``source`` will read from standard input. If no file is specified and there is no redirected file or pipeline on standard input, an error will be printed.
If no file is specified and stdin is not the terminal, or if the file name ``-`` is used, stdin will be read.
The exit status of ``source`` is the exit status of the last job to execute. If something goes wrong while opening or reading the file, ``source`` exits with a non-zero status.

View File

@@ -11,7 +11,6 @@ Synopsis
status
status is-login
status is-interactive
status is-interactive-read
status is-block
status is-breakpoint
status is-command-substitution
@@ -30,7 +29,6 @@ Synopsis
status job-control CONTROL_TYPE
status features
status test-feature FEATURE
status buildinfo
Description
-----------
@@ -51,9 +49,6 @@ The following operations (subcommands) are available:
**is-interactive**, **-i** or **--is-interactive**
Returns 0 if fish is interactive - that is, connected to a keyboard.
**is-interactive-read** or **--is-interactive-read**
Returns 0 if fish is running an interactive :doc:`read <read>` builtin which is connected to a keyboard.
**is-login**, **-l** or **--is-login**
Returns 0 if fish is a login shell - that is, if fish should perform login tasks such as setting up :envvar:`PATH`.
@@ -102,10 +97,6 @@ The following operations (subcommands) are available:
**test-feature** *FEATURE*
Returns 0 when FEATURE is enabled, 1 if it is disabled, and 2 if it is not recognized.
**buildinfo**
This prints information on how fish was build - which architecture, which build system or profile was used, etc.
This is mainly useful for debugging.
Notes
-----

View File

@@ -18,9 +18,7 @@ Description
.. BEGIN DESCRIPTION
``string escape`` escapes each *STRING* in one of several ways.
**--style=script** (default) alters the string such that it can be passed back to ``eval`` to produce the original argument again. By default, all special characters are escaped, and quotes are used to simplify the output when possible. If **-n** or **--no-quoted** is given, the simplifying quoted format is not used. Exit status: 0 if at least one string was escaped, or 1 otherwise.
``string escape`` escapes each *STRING* in one of three ways. The first is **--style=script**. This is the default. It alters the string such that it can be passed back to ``eval`` to produce the original argument again. By default, all special characters are escaped, and quotes are used to simplify the output when possible. If **-n** or **--no-quoted** is given, the simplifying quoted format is not used. Exit status: 0 if at least one string was escaped, or 1 otherwise.
**--style=var** ensures the string can be used as a variable name by hex encoding any non-alphanumeric characters. The string is first converted to UTF-8 before being encoded.

View File

@@ -19,7 +19,7 @@ Description
.. BEGIN DESCRIPTION
``string repeat`` repeats the *STRING* **-n** or **--count** times. The **-m** or **--max** option will limit the number of outputted characters (excluding the newline). This option can be used by itself or in conjunction with **--count**. If both **--count** and **--max** are present, max char will be outputted unless the final repeated string size is less than max, in that case, the string will repeat until count has been reached. Both **--count** and **--max** will accept a number greater than or equal to zero, in the case of zero, nothing will be outputted. The first argument is interpreted as *COUNT* if **--count** or **--max** are not explicitly specified. If **-N** or **--no-newline** is given, the output won't contain a newline character at the end. Exit status: 0 if yielded string is not empty, 1 otherwise.
``string repeat`` repeats the *STRING* **-n** or **--count** times. The **-m** or **--max** option will limit the number of outputted characters (excluding the newline). This option can be used by itself or in conjunction with **--count**. If both **--count** and **--max** are present, max char will be outputed unless the final repeated string size is less than max, in that case, the string will repeat until count has been reached. Both **--count** and **--max** will accept a number greater than or equal to zero, in the case of zero, nothing will be outputed. The first argument is interpreted as *COUNT* if **--count** or **--max** are not explicilty specified. If **-N** or **--no-newline** is given, the output won't contain a newline character at the end. Exit status: 0 if yielded string is not empty, 1 otherwise.
.. END DESCRIPTION

View File

@@ -34,7 +34,7 @@ If **-q** or **--quiet** is given, ``string shorten`` only runs for the return v
The default ellipsis is ````. If fish thinks your system is incapable because of your locale, it will use ``...`` instead.
The return value is 0 if any shortening occurred, 1 otherwise.
The return value is 0 if any shortening occured, 1 otherwise.
.. END DESCRIPTION

View File

@@ -18,11 +18,7 @@ Description
.. BEGIN DESCRIPTION
``string trim`` removes leading and trailing whitespace from each *STRING*. If **-l** or **--left** is given, only leading whitespace is removed. If **-r** or **--right** is given, only trailing whitespace is trimmed.
The **-c** or **--chars** switch causes the set of characters in *CHARS* to be removed instead of whitespace. This is a set of characters, not a string - if you pass ``-c foo``, it will remove any "f" or "o", not just "foo" as a whole.
Exit status: 0 if at least one character was trimmed, or 1 otherwise.
``string trim`` removes leading and trailing whitespace from each *STRING*. If **-l** or **--left** is given, only leading whitespace is removed. If **-r** or **--right** is given, only trailing whitespace is trimmed. The **-c** or **--chars** switch causes the characters in *CHARS* to be removed instead of whitespace. Exit status: 0 if at least one character was trimmed, or 1 otherwise.
.. END DESCRIPTION

View File

@@ -79,7 +79,6 @@ Some helper functions, often to give you information for use in your prompt:
- :doc:`fish_add_path <cmds/fish_add_path>` to easily add a path to $PATH.
- :doc:`alias <cmds/alias>` to quickly define wrapper functions ("aliases").
- :doc:`fish_delta <cmds/fish_delta>` to show what you have changed from the default configuration.
- :doc:`export <cmds/export>` as a compatibility function for other shells.
Helper commands
^^^^^^^^^^^^^^^

View File

@@ -65,16 +65,9 @@ issue_url = "https://github.com/fish-shell/fish-shell/issues"
# Parsing FISH-BUILD-VERSION-FILE is possible but hard to ensure that it is in the right place
# fish_indent is guaranteed to be on PATH for the Pygments highlighter anyway
if "FISH_BUILD_VERSION_FILE" in os.environ:
f = open(os.environ["FISH_BUILD_VERSION_FILE"], "r")
ret = f.readline().strip()
elif "FISH_BUILD_VERSION" in os.environ:
ret = os.environ["FISH_BUILD_VERSION"]
else:
ret = subprocess.check_output(
("fish_indent", "--version"), stderr=subprocess.STDOUT
).decode("utf-8")
ret = subprocess.check_output(
("fish_indent", "--version"), stderr=subprocess.STDOUT
).decode("utf-8")
# The full version, including alpha/beta/rc tags
release = ret.strip().split(" ")[-1]
# The short X.Y version

View File

@@ -154,7 +154,7 @@ in :ref:`config.fish <configuration>`.
How do I run a command from history?
------------------------------------
Type some part of the command, and then hit the :kbd:`up` (````) or :kbd:`down` (````) arrow keys to navigate through history matches, or press :kbd:`ctrl-r` to open the history in a searchable pager. In this pager you can press :kbd:`ctrl-r` or :kbd:`ctrl-s` to move to older or younger history respectively.
Type some part of the command, and then hit the :kbd:`up` (````) or :kbd:`ctrl-down` (````) arrow keys to navigate through history matches, or press :kbd:`ctrl-r` to open the history in a searchable pager. In this pager you can press :kbd:`ctrl-r` or :kbd:`ctrl-s` to move to older or younger history respectively.
Additional default key bindings include :kbd:`ctrl-p` (up) and :kbd:`ctrl-n` (down). See :ref:`Searchable command history <history-search>` for more information.
@@ -168,7 +168,7 @@ In general, fish's history recall works like this:
- Like other shells, the Up arrow, ``up`` recalls whole lines, starting from the last executed line. So instead of typing ``!!``, you would just hit the up-arrow.
- If the line you want is far back in the history, type any part of the line and then press Up one or more times. This will filter the recalled lines to ones that include this text, and you will get to the line you want much faster. This replaces "!vi", "!?bar.c" and the like. If you want to see more context, you can press ``ctrl-r`` to open the history in the pager.
- If the line you want is far back in the history, type any part of the line and then press Up one or more times. This will filter the recalled lines to ones that include this text, and you will get to the line you want much faster. This replaces "!vi", "!?bar.c" and the like. If you want to see more context, you can press ``ctlr-b`` to open the history in the pager.
- ``alt-up`` recalls individual arguments, starting from the last argument in the last executed line. This can be used instead of "!$".

View File

@@ -303,7 +303,7 @@ Some bindings are common across Emacs and vi mode, because they aren't text edit
- :kbd:`alt-enter` inserts a newline at the cursor position. This is useful to add a line to a commandline that's already complete.
- :kbd:`alt-left` (````) and :kbd:`alt-right` (````) move the cursor one word left or right (to the next space or punctuation mark), or moves forward/backward in the directory history if the command line is empty. If the cursor is already at the end of the line, and an autosuggestion is available, :kbd:`alt-right` (````) (or :kbd:`alt-f`) accepts the first word in the suggestion.
- :kbd:`alt-left` (````) and :kbd:`alt-right` (````) move the cursor one argument left or right, or moves forward/backward in the directory history if the command line is empty. If the cursor is already at the end of the line, and an autosuggestion is available, :kbd:`alt-right` (````) (or :kbd:`alt-f`) accepts the first argument in the suggestion.
- :kbd:`ctrl-left` (````) and :kbd:`ctrl-right` (````) move the cursor one word left or right. These accept one word of the autosuggestion - the part they'd move over.
@@ -327,12 +327,8 @@ Some bindings are common across Emacs and vi mode, because they aren't text edit
- :kbd:`alt-d` or :kbd:`ctrl-delete` moves the next word to the :ref:`killring`.
- :kbd:`alt-d` lists the directory history if the command line is empty.
- :kbd:`alt-delete` moves the next argument to the :ref:`killring`.
- :kbd:`shift-delete` removes the current history item or autosuggestion from the command history.
- :kbd:`alt-h` (or :kbd:`f1`) shows the manual page for the current command, if one exists.
- :kbd:`alt-l` lists the contents of the current directory, unless the cursor is over a directory argument, in which case the contents of that directory will be listed.
@@ -364,13 +360,11 @@ To enable emacs mode, use :doc:`fish_default_key_bindings <cmds/fish_default_key
- :kbd:`ctrl-b`, :kbd:`ctrl-f` move the cursor one character left or right or accept the autosuggestion just like the :kbd:`left` (````) and :kbd:`right` (````) shared bindings (which are available as well).
- :kbd:`alt-b`, :kbd:`alt-f` move the cursor one word left or right, or accept one word of the autosuggestion. If the command line is empty, moves forward/backward in the directory history instead.
- :kbd:`ctrl-n`, :kbd:`ctrl-p` move the cursor up/down or through history, like the up and down arrow shared bindings.
- :kbd:`delete` or :kbd:`backspace` or :kbd:`ctrl-h` removes one character forwards or backwards respectively.
- :kbd:`alt-backspace` removes one word backwards. If supported by the terminal, :kbd:`ctrl-backspace` does the same.
- :kbd:`ctrl-backspace` removes one word backwards and :kbd:`alt-backspace` removes one argument backwards.
- :kbd:`alt-<` moves to the beginning of the commandline, :kbd:`alt->` moves to the end.
@@ -388,7 +382,7 @@ To enable emacs mode, use :doc:`fish_default_key_bindings <cmds/fish_default_key
- :kbd:`ctrl-z`, :kbd:`ctrl-_` (:kbd:`ctrl-/` on some terminals) undo the most recent edit of the line.
- :kbd:`alt-/` or :kbd:`ctrl-shift-z` reverts the most recent undo.
- :kbd:`alt-/` reverts the most recent undo.
- :kbd:`ctrl-r` opens the history in a pager. This will show history entries matching the search, a few at a time. Pressing :kbd:`ctrl-r` again will search older entries, pressing :kbd:`ctrl-s` (that otherwise toggles pager search) will go to newer entries. The search bar will always be selected.
@@ -482,7 +476,6 @@ Command mode is also known as normal mode.
- :kbd:`p` pastes text from the :ref:`killring`.
- :kbd:`u` undoes the most recent edit of the command line.
- :kbd:`ctrl-r` redoes the most recent edit.
- :kbd:`[` and :kbd:`]` search the command history for the previous/next token containing the token under the cursor before the search was started. See the :ref:`history <history-search>` section for more information on history searching.
@@ -504,8 +497,6 @@ Insert mode
- :kbd:`backspace` removes one character to the left.
- :kbd:`ctrl-n` accepts the autosuggestion.
.. _vi-mode-visual:
Visual mode

View File

@@ -266,9 +266,8 @@ Consider this helper function::
Now let's see a few cases::
# Redirect both stderr and stdout to less
# (can also be spelt as `&|`)
print 2>&1 | less
# or
print &| less
# Show the "out" on stderr, silence the "err"
print >&2 2>/dev/null
@@ -870,7 +869,7 @@ but if you need multiple or the command doesn't read from standard input, "proce
This creates a temporary file, stores the output of the command in that file and prints the filename, so it is given to the outer command.
Fish has a default limit of 100 MiB on the data it will read in a command substitution. If that limit is reached the command (all of it, not just the command substitution - the outer command won't be executed at all) fails and ``$status`` is set to 122. This is so command substitutions can't cause the system to go out of memory, because typically your operating system has a much lower limit, so reading more than that would be useless and harmful. This limit can be adjusted with the ``fish_read_limit`` variable (`0` meaning no limit). This limit also affects the :doc:`read <cmds/read>` command.
Fish has a default limit of 100 MiB on the data it will read in a command sustitution. If that limit is reached the command (all of it, not just the command substitution - the outer command won't be executed at all) fails and ``$status`` is set to 122. This is so command substitutions can't cause the system to go out of memory, because typically your operating system has a much lower limit, so reading more than that would be useless and harmful. This limit can be adjusted with the ``fish_read_limit`` variable (`0` meaning no limit). This limit also affects the :doc:`read <cmds/read>` command.
.. [#] One exception: Setting ``$IFS`` to empty will disable line splitting. This is deprecated, use :doc:`string split <cmds/string-split>` instead.
@@ -1845,7 +1844,7 @@ The "locale" of a program is its set of language and regional settings that depe
.. envvar:: LC_MONETARY
Determines currency, how it is formatted, and the symbols used.
Determines currency, how it is formated, and the symbols used.
.. envvar:: LC_NUMERIC
@@ -2022,21 +2021,17 @@ You can see the current list of features via ``status features``::
qmark-noglob on 3.0 ? no longer globs
regex-easyesc on 3.1 string replace -r needs fewer \\'s
ampersand-nobg-in-token on 3.4 & only backgrounds if followed by a separating character
remove-percent-self off 4.0 %self is no longer expanded (use $fish_pid)
test-require-arg off 4.0 builtin test requires an argument
keyboard-protocols on 4.0 Use keyboard protocols (kitty, xterm's modifyotherkeys
remove-percent-self off 3.8 %self is no longer expanded (use $fish_pid)
test-require-arg off 3.8 builtin test requires an argument
Here is what they mean:
- ``stderr-nocaret`` was introduced in fish 3.0 and cannot be turned off since fish 3.5. It can still be tested for compatibility, but a ``no-stderr-nocaret`` value will simply be ignored. The flag made ``^`` an ordinary character instead of denoting an stderr redirection. Use ``2>`` instead.
- ``qmark-noglob`` was also introduced in fish 3.0 (and made the default in 4.0). It makes ``?`` an ordinary character instead of a single-character glob. Use a ``*`` instead (which will match multiple characters) or find other ways to match files like ``find``.
- ``regex-easyesc`` was introduced in 3.1 (and made the default in 3.5). It makes it so the replacement expression in ``string replace -r`` does one fewer round of escaping. Before, to escape a backslash you would have to use ``string replace -ra '([ab])' '\\\\\\\\$1'``. After, just ``'\\\\$1'`` is enough. Check your ``string replace`` calls if you use this anywhere.
- ``ampersand-nobg-in-token`` was introduced in fish 3.4 (and made the default in 3.5). It makes it so a ``&`` i no longer interpreted as the backgrounding operator in the middle of a token, so dealing with URLs becomes easier. Either put spaces or a semicolon after the ``&``. This is recommended formatting anyway, and ``fish_indent`` will have done it for you already.
- ``remove-percent-self`` turns off the special ``%self`` expansion. It was introduced in 4.0. To get fish's pid, you can use the :envvar:`fish_pid` variable.
- ``test-require-arg`` removes :doc:`builtin test <cmds/test>`'s one-argument form (``test "string"``. It was introduced in 4.0. To test if a string is non-empty, use ``test -n "string"``. If disabled, any call to ``test`` that would change sends a :ref:`debug message <debugging-fish>` of category "deprecated-test", so starting fish with ``fish --debug=deprecated-test`` can be used to find offending calls.
- ``keyboard-protocols`` lets fish turn on various keyboard protocols including the kitty keyboard protocol.
It was introduced in 4.0 and is on by default.
Disable it with ``no-keyboard-protocols`` to work around bugs in your terminal.
- ``stderr-nocaret`` was introduced in fish 3.0 (and made the default in 3.3). It makes ``^`` an ordinary character instead of denoting an stderr redirection, to make dealing with quoting and such easier. Use ``2>`` instead. This can no longer be turned off since fish 3.5. The flag can still be tested for compatibility, but a ``no-stderr-nocaret`` value will simply be ignored.
- ``qmark-noglob`` was also introduced in fish 3.0 (and made the default in 3.8). It makes ``?`` an ordinary character instead of a single-character glob. Use a ``*`` instead (which will match multiple characters) or find other ways to match files like ``find``.
- ``regex-easyesc`` was introduced in 3.1. It makes it so the replacement expression in ``string replace -r`` does one fewer round of escaping. Before, to escape a backslash you would have to use ``string replace -ra '([ab])' '\\\\\\\\$1'``. After, just ``'\\\\$1'`` is enough. Check your ``string replace`` calls if you use this anywhere.
- ``ampersand-nobg-in-token`` was introduced in fish 3.4. It makes it so a ``&`` i no longer interpreted as the backgrounding operator in the middle of a token, so dealing with URLs becomes easier. Either put spaces or a semicolon after the ``&``. This is recommended formatting anyway, and ``fish_indent`` will have done it for you already.
- ``remove-percent-self`` turns off the special ``%self`` expansion. It was introduced in 3.8. To get fish's pid, you can use the :envvar:`fish_pid` variable.
- ``test-require-arg`` removes :doc:`builtin test <cmds/test>`'s one-argument form (``test "string"``. It was introduced in 3.8. To test if a string is non-empty, use ``test -n "string"``. If disabled, any call to ``test`` that would change sends a :ref:`debug message <debugging-fish>` of category "deprecated-test", so starting fish with ``fish --debug=deprecated-test`` can be used to find offending calls.
These changes are introduced off by default. They can be enabled on a per session basis::
@@ -2057,6 +2052,12 @@ Prefixing a feature with ``no-`` turns it off instead. E.g. to reenable the ``?`
set -Ua fish_features no-qmark-noglob
Currently, the following features are enabled by default:
- stderr-nocaret - ``^`` no longer redirects stderr, use ``2>``. Enabled by default in fish 3.3.0. No longer changeable since fish 3.5.0.
- regex-easyesc - ``string replace -r`` requires fewer backslashes in the replacement part. Enabled by default in fish 3.5.0.
- ampersand-nobg-in-token - ``&`` in the middle of a word is a normal character instead of backgrounding. Enabled by default in fish 3.5.0.
.. _event:
Event handlers

View File

@@ -53,6 +53,7 @@ body {
div.related ul {
margin: 0;
padding: 0 0 0 10px;
list-style: none;
}
div.related {
@@ -70,10 +71,12 @@ div.related h3 {
}
div.related li.right {
float: right;
margin-right: 5px;
}
div.sphinxsidebar {
width: 230px;
overflow-wrap: break-word;
}
@@ -110,6 +113,7 @@ div.sphinxsidebar ul {
margin: 10px;
padding: 0;
color: var(--secondary-link-color);
margin: 10px;
list-style: none;
}
@@ -544,6 +548,10 @@ div.sphinxsidebar ul {
}
div.bodywrapper {
margin-left: 230px;
}
aside.footnote > .label {
display: inline;
}
@@ -557,36 +565,19 @@ div.documentwrapper {
width: 100%;
}
div.document {
display: grid;
grid-template: 1fr min-content / 12rem minmax(0,1fr);
}
/* On screens that are less than 700px wide remove anything non-essential
- the sidebar, the gradient background, ... */
@media screen and (max-width: 700px) {
div.document {
display: grid;
grid-template: 30vh min-content / 100%;
}
div.sphinxsidebar {
font-size: 16px;
width: 100%;
height: auto;
position: relative;
/* To separate the "side"bar from the content below */
border-bottom: 1px solid;
border-color: var(--sidebar-border-color);
}
/* Reduce margins to save space */
div.sphinxsidebar ul ul, div.bodywrapper, div.content {
div.bodywrapper {
margin-left: 0;
}
div.sphinxsidebar h3, div.sphinxsidebar h4 {
margin-top: 0;
}
div.sphinxsidebar ul {
flex-basis: content;
@@ -594,15 +585,14 @@ div.document {
}
div.sphinxsidebarwrapper {
display: flex;
gap: 1em;
justify-content: space-between;
}
div.sphinxsidebarwrapper > h3:nth-child(5) {
display: none;
}
#searchbox {
div#searchbox {
display: none !important;
}
div.content {margin-left: 0;}
div.body {
padding: 1rem;
}
@@ -623,9 +613,6 @@ div.document {
/* On print media remove anything non-essential. */
@media print {
div.document {
display: block;
}
.inline-search {
display: none;
}

View File

@@ -14,7 +14,7 @@ BuildRequires: cargo gettext gcc xz pcre2-devel
BuildRequires: rust >= 1.70
# Packaging guidelines say to use a BuildRequires: rust-packaging, but it adds no value for our package
BuildRequires: cmake >= 3.15
BuildRequires: cmake >= 3.19
%if 0%{?suse_version}
BuildRequires: update-desktop-files
@@ -31,15 +31,8 @@ BuildRequires: glibc-langpack-en
%endif
BuildRequires: python3 procps
%if 0%{?suse_version}
Requires: terminfo-base
%else
Requires: ncurses-base
%endif
Requires: file
Requires: python3
Requires: man
Requires: procps
# Although the build scripts mangle the version number to be RPM compatible
# for continuous builds (transforming the output of `git describe`), Fedora 32+

View File

@@ -1,6 +1,6 @@
complete -c VBoxSDL -l startvm -x -d "Set virtual machine to start" -a "(__fish_print_VBox_vms)"
complete -c VBoxSDL -l separate -d "Run separate VM process or attach to a running VM"
complete -c VBoxSDL -l seperate -d "Run separate VM process or attach to a running VM"
complete -c VBoxSDL -l hda -f -d "Set temporary first hard disk"
complete -c VBoxSDL -l fda -f -d "Set temporary first floppy disk"
complete -c VBoxSDL -l cdrom -r -d "Set temporary CDROM/DVD" -a "none\tunmount"

View File

@@ -14,7 +14,7 @@ complete -c acpi -s A -l without-ac-adapter -d 'Suppress ac-adapter information'
complete -c acpi -s V -l everything -d 'Show every device, overrides above options'
complete -c acpi -s s -l show-empty -d 'Show non-operational devices'
complete -c acpi -s S -l hide-empty -d 'Hide non-operational devices'
complete -c acpi -s c -l cooling -d 'Show cooling device information'
complete -c acpi -s c -l celcius -d 'Use celsius as the temperature unit'
complete -c acpi -s f -l fahrenheit -d 'Use fahrenheit as the temperature unit'
complete -c acpi -s k -l kelvin -d 'Use kelvin as the temperature unit'
complete -c acpi -s d -l directory -d '<dir> path to ACPI info (/proc/acpi)'

View File

@@ -64,16 +64,6 @@ function __fish_adb_list_uninstallable_packages
__fish_adb_run_command pm list packages -3 | string replace 'package:' ''
end
function __fish_adb_list_local_files
set -l token (commandline -ct)*
# Unquoted $token to expand the array
# Return list of directories suffixed with '/'
find $token -maxdepth 0 -type d 2>/dev/null | string replace -r '$' /
# Return list of files
find $token -maxdepth 0 -type f -o -type l 2>/dev/null
end
function __fish_adb_list_files
set -l token (commandline -ct)
@@ -197,8 +187,7 @@ complete -n '__fish_seen_subcommand_from reconnect' -c adb -x -a device -d 'Kick
# commands that accept listing device files
complete -n '__fish_seen_subcommand_from shell' -c adb -f -a "(__fish_adb_list_files)" -d 'File on device'
complete -n '__fish_seen_subcommand_from pull' -c adb -F -a "(__fish_adb_list_files)" -d 'File on device'
complete -n '__fish_seen_subcommand_from push' -c adb -ka "(__fish_adb_list_files)" -d 'File on device'
complete -n '__fish_seen_subcommand_from push' -c adb -ka "(__fish_adb_list_local_files)"
complete -n '__fish_seen_subcommand_from push' -c adb -F -a "(__fish_adb_list_files)" -d 'File on device'
# logcat
complete -n '__fish_seen_subcommand_from logcat' -c adb -f

View File

@@ -2,7 +2,7 @@
complete -c apt-build -l help -d "Display help and exit"
complete -f -c apt-build -a update -d "Update list of packages"
complete -f -c apt-build -a upgrade -d "Upgrade packages"
complete -f -c apt-build -a world -d "Rebuild your system"
complete -f -c apt-bulid -a world -d "Rebuild your system"
complete -x -c apt-build -a install -d "Build and install a new package"
complete -x -c apt-build -a source -d "Download and extract a source"
complete -x -c apt-build -a info -d "Info on a package"

View File

@@ -2,7 +2,7 @@
function __fish_apt_no_subcommand -d 'Test if apt has yet to be given the subcommand'
for i in (commandline -xpc)
if contains -- $i auto manual minimize-manual hold unhold showauto showmanual showhold
if contains -- $i auto manual hold unhold showauto showmanual showhold
return 1
end
end
@@ -23,7 +23,6 @@ complete -c apt-mark -n __fish_apt_use_package -a '(__fish_print_apt_packages)'
complete -c apt-mark -s h -l help -d 'Display help and exit'
complete -f -n __fish_apt_no_subcommand -c apt-mark -a auto -d 'Mark a package as automatically installed'
complete -f -n __fish_apt_no_subcommand -c apt-mark -a manual -d 'Mark a package as manually installed'
complete -f -n __fish_apt_no_subcommand -c apt-mark -a minimize-manual -d 'Mark all dependencies of meta packages as auto'
complete -f -n __fish_apt_no_subcommand -c apt-mark -a hold -d 'Hold a package, prevent automatic installation or removal'
complete -f -n __fish_apt_no_subcommand -c apt-mark -a unhold -d 'Cancel a hold on a package'
complete -f -n __fish_apt_no_subcommand -c apt-mark -a showauto -d 'Show automatically installed packages'
@@ -32,6 +31,4 @@ complete -f -n __fish_apt_no_subcommand -c apt-mark -a showhold -d 'Show held pa
complete -c apt-mark -s v -l version -d 'Display version and exit'
complete -r -c apt-mark -s c -l config-file -d 'Specify a config file'
complete -r -c apt-mark -s o -l option -d 'Set a config option'
complete -c apt-mark -l color -d 'Turn colors on'
complete -c apt-mark -l no-color -d 'Turn colors off'
complete -r -c apt-mark -s f -l file -d 'Write package statistics to a file'

View File

@@ -1,12 +0,0 @@
set -l command batsh
complete -c $command -f
complete -c $command -s h -l help \
-a 'pager\tdefault plain groff' \
-d 'Show help'
complete -c $command -s v -l version -d 'Show version'
complete -c $command \
-a 'bash\t"Compile to Bash" batsh\t"Format file" winbat\t"Compile to Batch"'

View File

@@ -1,13 +1,4 @@
set -l commands status install update remove is-installed random-seed systemd-efi-options reboot-to-firmware list set-default set-oneshot set-timeout set-timeout-oneshot
# Execute `bootctl list` and return entries
function __bootctl_entries
if not type -q jq
return 1
end
bootctl list --json short | jq '.[] | "\(.id)\t\(.showTitle)"' --raw-output
end
set -l commands status install update remove is-installed random-seed systemd-efi-options reboot-to-firmware list set-default set-oneshot
complete -c bootctl -f
complete -c bootctl -n "not __fish_seen_subcommand_from $commands" -a status -d 'Show status of EFI variables'
@@ -22,9 +13,6 @@ complete -c bootctl -n "__fish_seen_subcommand_from reboot-to-firmware" -a 'true
complete -c bootctl -n "not __fish_seen_subcommand_from $commands" -a list -d 'List boot loader entries'
complete -c bootctl -n "not __fish_seen_subcommand_from $commands" -a set-default -d 'Set default boot loader entry'
complete -c bootctl -n "not __fish_seen_subcommand_from $commands" -a set-oneshot -d 'Set default boot loader entry (Once)'
complete -c bootctl -n "__fish_seen_subcommand_from set-default set-oneshot" -x -a '(__bootctl_entries)'
complete -c bootctl -n "not __fish_seen_subcommand_from $commands" -a set-timeout -d 'Set default boot loader timeout'
complete -c bootctl -n "not __fish_seen_subcommand_from $commands" -a set-timeout-oneshot -d 'Set default boot loader timeout (Once)'
complete -c bootctl -s h -l help -d 'Show this help'
complete -c bootctl -l version -d 'Print version'

View File

@@ -1,62 +0,0 @@
# Filter Completion
function __fish_btrbk_complete_filter
btrbk list config --format col:h:snapshot_name,source_subvolume,target_url | string replace -r '([^ ]+)\s+([^ ]+)\s+([^ ]*)' '$1\t$2 -> $3'
end
# options with arguments
complete -c btrbk -l format -x -d 'Change output format' -a "table long raw"
complete -c btrbk -l loglevel -s l -x -d 'Set logging level' -a "error warn info debug trace"
complete -c btrbk -l exclude -x -d 'Exclude configured sections' -a "(__fish_btrbk_complete_filter)"
complete -c btrbk -l override -x -d 'Globally override a configuration option'
# options with file completion
complete -c btrbk -l config -r -s c -d 'Specify configuration file'
complete -c btrbk -l lockfile -r -d 'Create and check lockfile'
# options without arguments
complete -c btrbk -l help -s h -d 'Display this help message'
complete -c btrbk -l version -d 'Display version information'
complete -c btrbk -l dry-run -s n -d 'Perform a trial run with no changes made'
complete -c btrbk -l preserve -s p -d 'Preserve all (do not delete anything)'
complete -c btrbk -l preserve-snapshots -d 'Preserve snapshots (do not delete snapshots)'
complete -c btrbk -l preserve-backups -d 'Preserve backups (do not delete backups)'
complete -c btrbk -l wipe -d 'Delete all but latest snapshots'
complete -c btrbk -l verbose -s v -d 'Be more verbose (increase logging level)'
complete -c btrbk -l quiet -s q -d 'Be quiet (do not print backup summary)'
complete -c btrbk -l table -s t -d 'Change output to table format'
complete -c btrbk -l long -s L -d 'Change output to long format'
complete -c btrbk -l print-schedule -s S -d 'Print scheduler details (for the "run" command)'
complete -c btrbk -l progress -d 'Show progress bar on send-receive operation'
# uncommon options from manpage
complete -c btrbk -l single-column -s 1 -d 'Print output as a single column'
complete -c btrbk -l pretty -d 'Print pretty table output with lowercase and underlined column headings'
complete -c btrbk -l raw -d 'Create raw targets for archive command'
# subcommands
complete -c btrbk -f -n __fish_use_subcommand -a run -d 'Run snapshot and backup operations'
complete -c btrbk -f -n __fish_use_subcommand -a dryrun -d 'Show what would be executed without running btrfs commands'
complete -c btrbk -f -n __fish_use_subcommand -a snapshot -d 'Run snapshot operations only'
complete -c btrbk -f -n __fish_use_subcommand -a resume -d 'Run backup operations and delete snapshots'
complete -c btrbk -f -n __fish_use_subcommand -a prune -d 'Only delete snapshots and backups'
complete -c btrbk -f -n __fish_use_subcommand -a archive -d 'Recursively copy all subvolumes (src -> dst)'
complete -c btrbk -f -n __fish_use_subcommand -a clean -d 'Delete incomplete (garbled) backups'
complete -c btrbk -f -n __fish_use_subcommand -a stats -d 'Print snapshot/backup statistics'
complete -c btrbk -f -n __fish_use_subcommand -a usage -d 'Print filesystem usage'
complete -c btrbk -f -n __fish_use_subcommand -a ls -d 'List all btrfs subvolumes below a given path'
complete -c btrbk -f -n __fish_use_subcommand -a origin -d 'Print origin information for a subvolume'
complete -c btrbk -f -n __fish_use_subcommand -a diff -d 'List file changes between related subvolumes'
complete -c btrbk -f -n __fish_use_subcommand -a extents -d 'Calculate accurate disk space usage for a path'
complete -c btrbk -f -n __fish_use_subcommand -a list -d 'List snapshots and backups'
# subsubcommands for "list"
complete -c btrbk -n '__fish_seen_subcommand_from list' -f -a all -d 'List all snapshots and backups'
complete -c btrbk -n '__fish_seen_subcommand_from list' -f -a snapshots -d 'List snapshots only'
complete -c btrbk -n '__fish_seen_subcommand_from list' -f -a backups -d 'List backups and correlated snapshots'
complete -c btrbk -n '__fish_seen_subcommand_from list' -f -a latest -d 'List most recent snapshots and backups'
complete -c btrbk -n '__fish_seen_subcommand_from list' -f -a config -d 'List configured source/snapshot/target relations'
complete -c btrbk -n '__fish_seen_subcommand_from list' -f -a source -d 'List configured source/snapshot relations'
complete -c btrbk -n '__fish_seen_subcommand_from list' -f -a volume -d 'List configured volume sections'
complete -c btrbk -n '__fish_seen_subcommand_from list' -f -a target -d 'List configured targets'
complete -c btrbk -n '__fish_seen_subcommand_from run dryrun snapshot resume prune clean' -x -a '(__fish_btrbk_complete_filter)'

View File

@@ -61,7 +61,7 @@ complete -f -c bzr -n '__fish_seen_subcommand_from merge' -l pull -d 'If destina
complete -f -c bzr -n '__fish_seen_subcommand_from merge' -l remember -d 'Remember the specified location as a default'
complete -f -c bzr -n '__fish_seen_subcommand_from merge' -l force -d 'Merge even if the destination tree has uncommitted changes'
complete -f -c bzr -n '__fish_seen_subcommand_from merge' -l reprocess -d 'Reprocess to reduce spurious conflicts'
complete -f -c bzr -n '__fish_seen_subcommand_from merge' -l uncommitted -d 'Apply uncommitted changes from a working copy, instead of branch changes'
complete -f -c bzr -n '__fish_seen_subcommand_from merge' -l uncommited -d 'Apply uncommitted changes from a working copy, instead of branch changes'
complete -f -c bzr -n '__fish_seen_subcommand_from merge' -l show-base -d 'Show base revision text in conflicts'
complete -f -c bzr -n '__fish_seen_subcommand_from merge' -l preview -d 'Instead of merging, show a diff of the merge'
complete -f -c bzr -n '__fish_seen_subcommand_from merge' -l interactive -s i -d 'Select changes interactively'

View File

@@ -737,7 +737,6 @@ complete -c cargo -n "__fish_seen_subcommand_from tree" -s v -l verbose -d 'Use
complete -c cargo -n "__fish_seen_subcommand_from tree" -l frozen -d 'Require Cargo.lock and cache are up to date'
complete -c cargo -n "__fish_seen_subcommand_from tree" -l locked -d 'Require Cargo.lock is up to date'
complete -c cargo -n "__fish_seen_subcommand_from tree" -l offline -d 'Run without accessing the network'
complete -c cargo -n "__fish_seen_subcommand_from uninstall" -fa '(cargo install --list | string replace -rf "(\S+) (.*):" \'$1\t$2\')'
complete -c cargo -n "__fish_seen_subcommand_from uninstall" -s p -l package -d 'Package to uninstall'
complete -c cargo -n "__fish_seen_subcommand_from uninstall" -l bin -d 'Only uninstall the binary NAME'
complete -c cargo -n "__fish_seen_subcommand_from uninstall" -l root -d 'Directory to uninstall packages from'

View File

@@ -1,4 +1,37 @@
complete -c cmd -f -a '(__fish_cmd__complete_args)'
function __cmd_complete_args -d 'Function to generate args'
set -l current_token (commandline -tc)
switch $current_token
case '/t:*'
echo -e '0\tBlack
1\tBlue
2\tGreen
3\tAqua
4\tRed
5\tPurple
6\tYellow
7\tWhite
8\tGray
9\tLight blue
A\tLight green
B\tLight aqua
C\tLight red
D\tLight purple
E\tLight yellow
F\tBright white' | awk -F '\t' "{ printf \"$current_token%s\t%s\n\", \$1, \$2 }"
case '/e:*'
echo -e 'on\tEnable command extensions
off\tDisable command extensions' | awk -F '\t' "{ printf \"$current_token%s\t%s\n\", \$1, \$2 }"
case '/f:*'
echo -e 'on\tEnable file and directory name completion
off\tDisable file and directory name completion' | awk -F '\t' "{ printf \"$current_token%s\t%s\n\", \$1, \$2 }"
case '/v:*'
echo -e 'on\tEnable delayed environment variable expansion
off\tDisable delayed environment variable expansion' | awk -F '\t' "{ printf \"$current_token%s\t%s\n\", \$1, \$2 }"
end
end
complete -c cmd -f -a '(__cmd_complete_args)'
complete -c cmd -f -n 'not __fish_seen_argument -w c -w k' -a /c \
-d 'Carry out the command specified by string and then stop'

View File

@@ -16,12 +16,14 @@ complete -c code -l user-data-dir -ra "(__fish_complete_directories)" -d 'Specif
complete -c code -l profile -d 'Opens the provided folder or workspace with the given profile'
complete -c code -s v -l version -d 'Print version'
complete -c code -s h -l help -d 'Print usage'
complete -c code -l folder-uri -d 'Opens a window with given folder uri(s)'
complete -c code -l file-uri -d 'Opens a window with given file uri(s)'
# Extensions management
complete -c code -l extensions-dir -r -d 'Set the root path for extensions'
complete -c code -l extensions-dir -d 'Set the root path for extensions'
complete -c code -l list-extensions -d 'List the installed extensions'
complete -c code -l show-versions -d 'Show versions of installed extensions' -n '__fish_seen_argument -l list-extensions'
complete -c code -l category -x -d 'Filters installed extensions by provided category' -n '__fish_seen_argument -l list-extensions'
complete -c code -l category -d 'Filters installed extensions by provided category' -n '__fish_seen_argument -l list-extensions'
complete -c code -l install-extension -ra "(__fish_complete_vscode_extensions)" -d 'Installs or updates the extension'
complete -c code -l force -n '__fish_seen_argument -l install-extension' -d 'Updates to the latest version'
complete -c code -l pre-release -n '__fish_seen_argument -l install-extension' -d 'Installs the pre-release version'
@@ -33,13 +35,12 @@ complete -c code -l disable-extensions -d 'Disable all installed extensions'
# Troubleshooting
complete -c code -l verbose -d 'Print verbose output (implies --wait)'
complete -c code -l log -xa 'critical error warn info debug trace off' -d 'Log level to use (default: info)'
complete -c code -l log -a 'critical error warn info debug trace off' -d 'Log level to use (default: info)'
complete -c code -s s -l status -d 'Print process usage and diagnostics information'
complete -c code -l prof-startup -d 'Run CPU profiler during startup'
complete -c code -l sync -xa 'on off' -d 'Turn sync on or off'
complete -c code -l inspect-extensions -x -d 'Allow debugging and profiling of extensions'
complete -c code -l sync -d 'Turn sync on or off'
complete -c code -l inspect-extensions -d 'Allow debugging and profiling of extensions'
complete -c code -l inspect-brk-extensions -x -d 'Allow debugging and profiling of extensions'
complete -c code -l disable-lcd-text -d 'Disable LCD font rendering'
complete -c code -l disable-gpu -d 'Disable GPU hardware acceleration'
complete -c code -l disable-chromium-sandbox -d 'Disable the Chromium sandbox environment'
complete -c code -l telemetry -d 'Shows all telemetry events which VS code collects'

View File

@@ -5,7 +5,7 @@ complete -c create_ap -l version -d 'Print version number'
complete -c create_ap -s c -x -d 'Channel number'
complete -c create_ap -s w -x -a '1 2 1+2' -d 'WPA version to use'
complete -c create_ap -s n -d 'Disable Internet sharing'
complete -c create_ap -s m -x -a 'nat bridge none' -d 'Method for Internet sharing'
complete -c create_ap -s m -x -a 'nat brigde none' -d 'Method for Internet sharing'
complete -c create_ap -l psk -d 'Use 64 hex digits pre-shared-key'
complete -c create_ap -l hidden -d 'Make the Access Point hidden'
complete -c create_ap -l mac-filter -d 'Enable MAC address filtering'

View File

@@ -6,6 +6,6 @@ complete -c csvlens -l filter -r -d "Use this regex to filter rows to display by
complete -c csvlens -l find -r -d "Use this regex to find and highlight matches by default"
complete -c csvlens -s i -l ignore-case -d "Searches ignore case. Ignored if any uppercase letters are present in the search string"
complete -c csvlens -l echo-column -r -d "Print the value of this column to stdout for the selected row"
complete -c csvlens -l debug -d "Show stats for debugging"
complete -c csvlens -l debug "Show stats for debugging"
complete -c csvlens -s h -l help -f -d "Print help"
complete -c csvlens -s V -l version -f -d "Print version"

View File

@@ -1,3 +1 @@
# Older versions of delta do not have a --generate-completion option and will complain
# to stderr but emit nothing to stdout, making it safe (but a no-op) to source.
delta --generate-completion fish 2>/dev/null | source
delta --generate-completion fish | source

View File

@@ -14,6 +14,11 @@ function __fish_diskutil_mounted_volumes
printf '%s\n' $mountpoints
end
function __fish_diskutil_writeable_volumes
set -l mountpoints (path filter -w /Volumes/*)
printf '%s\n' $mountpoints
end
function __fish_diskutil_using_not_subcommand
not __fish_seen_subcommand_from apfs
and not __fish_seen_subcommand_from appleRAID
@@ -53,7 +58,7 @@ complete -f -c diskutil -n '__fish_diskutil_using_not_subcommand umountDisk' -a
# eject
complete -f -c diskutil -n __fish_use_subcommand -a eject -d 'Eject a volume or disk'
complete -f -c diskutil -n '__fish_diskutil_using_not_subcommand eject' -a '(__fish_diskutil_mounted_volumes ; __fish_diskutil_devices)'
complete -f -c diskutil -n '__fish_diskutil_using_not_subcommand eject' -a '(__fish_diskutil_writeable_volumes ; __fish_diskutil_devices)'
# mount
complete -f -c diskutil -n __fish_use_subcommand -a mount -d 'Mount a single volume'

View File

@@ -2,12 +2,8 @@
# Completions for the dnf command
#
function __dnf_is_dnf5
path resolve -- $PATH/dnf | path filter | string match -q -- '*/dnf5'
end
function __dnf_list_installed_packages
dnf repoquery --cacheonly "$cur*" --qf "%{name}\n" --installed </dev/null
dnf repoquery --cacheonly "$cur*" --qf "%{name}" --installed </dev/null
end
function __dnf_list_available_packages
@@ -19,14 +15,9 @@ function __dnf_list_available_packages
return
end
set -l results
if __dnf_is_dnf5
# dnf5 provides faster completions than repoquery, but does not maintain the
# same sqlite db as dnf4
set results (dnf --complete=2 dnf install "$tok*")
else if type -q sqlite3
# dnf --cacheonly list --available gives a list of non-installed packages dnf is aware of,
# but it is slow as molasses. Unfortunately, sqlite3 is not available oob (Fedora Server 32).
# dnf --cacheonly list --available gives a list of non-installed packages dnf is aware of,
# but it is slow as molasses. Unfortunately, sqlite3 is not available oob (Fedora Server 32).
if type -q sqlite3
# This schema is bad, there is only a "pkg" field with the full
# packagename-version-release.fedorarelease.architecture
# tuple. We are only interested in the packagename.
@@ -35,7 +26,7 @@ function __dnf_list_available_packages
else
# In some cases dnf will ask for input (e.g. to accept gpg keys).
# Connect it to /dev/null to try to stop it.
set results (dnf repoquery --cacheonly "$tok*" --qf "%{name}\n" --available </dev/null 2>/dev/null)
set results (dnf repoquery --cacheonly "$tok*" --qf "%{name}" --available </dev/null 2>/dev/null)
end
if set -q results[1]
set results (string match -r -- '.*\\.rpm$' $files) $results
@@ -46,7 +37,7 @@ function __dnf_list_available_packages
end
function __dnf_list_transactions
if not __dnf_is_dnf5 && type -q sqlite3
if type -q sqlite3
sqlite3 /var/lib/dnf/history.sqlite "SELECT id, cmdline FROM trans" 2>/dev/null | string replace "|" \t
end
end

View File

@@ -3,7 +3,7 @@
#
function __fish_doas_print_remaining_args
set -l tokens (commandline -xpc | string escape) (commandline -ct)
set -l tokens (commandline -xpc) (commandline -ct)
set -e tokens[1]
# These are all the options mentioned in the man page for openbsd's "doas" (in that order).
set -l opts a= C= L n s u=

View File

@@ -0,0 +1,29 @@
complete -c dust -s d -l depth -d "Depth to show"
complete -c dust -s n -l number-of-lines -d "Number of lines of output to show"
complete -c dust -s p -l full-paths -d "Subdirectories will not have their path shortened"
complete -c dust -s X -l ignore-directory -d "Exclude any file or directory with this name"
complete -c dust -s I -l ignore-all-in-file -d "Exclude any file or directory with a regex"
complete -c dust -s L -l dereference-links -d "dereference sym links - Treat sym links as directories and go into them"
complete -c dust -s x -l limit-filesystem -d "Only count the files and directories on the same filesystem as the supplied directory"
complete -c dust -s s -l apparent-size -d "Use file length instead of blocks"
complete -c dust -s r -l reverse -d "Print tree upside down (biggest highest)"
complete -c dust -s c -l no-colors -d "No colors will be printed"
complete -c dust -s C -l force-colors -d "Force colors print"
complete -c dust -s b -l no-percent-bars -d "No percent bars or percentages will be displayed"
complete -c dust -s B -l bars-on-right -d "percent bars moved to right side of screen"
complete -c dust -s z -l min-size -d "Minimum size file to include in output"
complete -c dust -s R -l screen-reader -d "For screen readers"
complete -c dust -l skip-total -d "No total row will be displayed"
complete -c dust -s f -l filecount -d "Directory 'size' is number of child files instead of disk size"
complete -c dust -s i -l ignore_hidden -d "Do not display hidden files"
complete -c dust -s v -l invert-filter -d "Exclude filepaths matching this regex"
complete -c dust -s e -l filter -d "Only include filepaths matching this regex"
complete -c dust -s t -l file_types -d "show only these file types"
complete -c dust -s w -l terminal_width -d "Specify width of output"
complete -c dust -s P -l no-progress -d "Disable the progress indication"
complete -c dust -s D -l only-dir -d "Only directories will be displayed"
complete -c dust -s F -l only-file -d "Only files will be displayed (finds your largest files)"
complete -c dust -s o -l output-format -d "Changes output display size"
complete -c dust -s S -l stack-size -d "Specify memory to use as stack size"
complete -c dust -s h -l help -d "Print help"
complete -c dust -s V -l version -d "Print version"

View File

@@ -1,24 +0,0 @@
set -l commands repl init reactor make install bump diff publish
complete -c elm -f
# repl completions
complete -c elm -n "not __fish_seen_subcommand_from $commands" -a repl -d 'Open up an interactive programming session'
complete -c elm -n "__fish_seen_subcommand_from repl" -l no-colors -d 'Turn off the colors in REPL'
complete -c elm -n "__fish_seen_subcommand_from repl" -l interpreter -d 'Path to an alternative JS interpreter'
# reactor completions
complete -c elm -n "not __fish_seen_subcommand_from $commands" -a reactor -d 'Compile code with a click'
complete -c elm -n "__fish_seen_subcommand_from reactor" -l port -d 'Compile code with a click'
# make completions
complete -c elm -n "not __fish_seen_subcommand_from $commands" -a make -d 'Compiles Elm code in JS or HTML'
complete -c elm -n "__fish_seen_subcommand_from make" -l output -F -r -d 'Specify the name of resulting JS file'
complete -c elm -n "__fish_seen_subcommand_from make" -l debug -d 'Turn on the time-travelling debugger'
complete -c elm -n "__fish_seen_subcommand_from make" -l optimize -d 'Turn on optimizations to make code smaller and faster'
complete -c elm -n "__fish_seen_subcommand_from make" -l docs -d 'Generate a JSON file of documentation for a package'
#other commands completions
complete -c elm -n "not __fish_seen_subcommand_from $commands" -a init -d 'Start an Elm project'
complete -c elm -n "not __fish_seen_subcommand_from $commands" -a install -d 'Fetches packages from Elm repository'
complete -c elm -n "not __fish_seen_subcommand_from $commands" -a bump -d 'Figures out the next version number based on API changes'
complete -c elm -n "not __fish_seen_subcommand_from $commands" -a diff -d 'See what changed in a package between different versions'
complete -c elm -n "not __fish_seen_subcommand_from $commands" -a publish -d 'Publishes your package on package.elm-lang.org so anyone in the community can use it'
complete -c elm -l help -d "Show a more detailed description"

View File

@@ -62,7 +62,7 @@ end
# Get the text after all env arguments and variables, so we can complete it as a regular command
function __fish_env_remaining_args -V is_gnu
set -l argv (commandline -xpc | string escape) (commandline -ct)
set -l argv (commandline -xpc) (commandline -ct)
if set -q is_gnu[1]
argparse -s i/ignore-environment u/unset= help version -- $argv 2>/dev/null
or return 0

View File

@@ -1 +1,26 @@
exercism completion fish | source
function __fish_exercism_no_subcommand -d 'Test if exercism has yet to be given the subcommand'
for i in (commandline -xpc)
if contains -- $i demo debug configure fetch restore submit unsubmit tracks download help
return 1
end
end
return 0
end
complete -c exercism -s c -l config -d 'path to config file [$EXERCISM_CONFIG_FILE, $XDG_CONFIG_HOME]'
complete -c exercism -s v -l verbose -d "turn on verbose logging"
complete -c exercism -s h -l help -d "show help"
complete -c exercism -s v -l version -d "print the version"
complete -f -n __fish_exercism_no_subcommand -c exercism -a configure -d "Writes config values to a JSON file"
complete -f -n __fish_exercism_no_subcommand -c exercism -a debug -d "Outputs useful debug information"
complete -f -n __fish_exercism_no_subcommand -c exercism -a download -d "Downloads a solution given the ID of the latest iteration"
complete -f -n __fish_exercism_no_subcommand -c exercism -a fetch -d "Fetches the next unsubmitted problem in each track"
complete -f -n __fish_exercism_no_subcommand -c exercism -a list -d "Lists the available problems for a language track, given its ID"
complete -f -n __fish_exercism_no_subcommand -c exercism -a open -d "Opens exercism.io on given problem"
complete -f -n __fish_exercism_no_subcommand -c exercism -a restore -d "Downloads the most recent iteration for each of your solutions on exercism.io"
complete -f -n __fish_exercism_no_subcommand -c exercism -a skip -d "Skips a problem given a track ID and problem slug"
complete -f -n __fish_exercism_no_subcommand -c exercism -a status -d "Fetches information about your progress with a given language track"
complete -f -n __fish_exercism_no_subcommand -c exercism -a submit -d "Submits a new iteration to a problem on exercism.io"
complete -f -n __fish_exercism_no_subcommand -c exercism -a tracks -d "Lists the available language tracks"
complete -f -n __fish_exercism_no_subcommand -c exercism -a upgrade -d "Upgrades the CLI to the latest released version"
complete -f -n __fish_exercism_no_subcommand -c exercism -a help -d "show help"

View File

@@ -1,55 +0,0 @@
function __fish_firejail_profiles
path basename -- /etc/firejail/*.profile ~/.config/firejail/*.profile
end
function __fish_firejail_complete_sandboxes
firejail --list | string replace -rf -- '([^:]+):([^:]+):([^:]+):(.*)' '$1\t$3: $4 ($2)\n$3\t$1: $4 ($2)'
end
complete -c firejail -f
complete -c firejail -l help -d 'Show help and exit'
complete -c firejail -l version -d 'Show version and exit'
complete -c firejail -l debug -d 'Print debug info'
complete -c firejail -l debug-blacklists -d 'Debug blacklisting'
complete -c firejail -l debug-whitelists -d 'Debug whitelisting'
complete -c firejail -l debug-caps -d 'Print known capabilities and exit'
complete -c firejail -l debug-errnos -d 'Print known error numbers and exit'
complete -c firejail -l debug-private-lib -d 'Debug --private-lib'
complete -c firejail -l debug-protocols -d 'Print known protocols and exit'
complete -c firejail -l debug-syscalls -d 'Print known syscalls and exit'
complete -c firejail -l debug-syscalls32 -d 'Print known 32-bit syscalls and exit'
complete -c firejail -l list -d 'List all sandboxes'
complete -c firejail -l tree -d 'Print a tree of all sandboxes'
complete -c firejail -l top -d 'Monitor sandboxes (like `top`)'
complete -c firejail -l shutdown -d 'Show help and exit'
# Profiles
# Note: firejail's option parsing is weird and *requires* the --foo=bar form
# So we don't use -r
complete -c firejail -l profiles -d 'Load a custom security profile' -a '(__fish_firejail_profiles)'
# Sandboxes
complete -c firejail -l join -d 'Join existing sandbox' -a '(__fish_firejail_complete_sandboxes)'
# Files
complete -c firejail -l hosts-file -d 'Show help and exit' -a '(__fish_firejail_profiles)'
# directory
complete -c firejail -l chroot -d 'Chroot into this directory' -a '(__fish_complete_directories)'
complete -c firejail -l tmpfs -d 'Mount tmpfs into sandbox' -a '(__fish_complete_directories)'
complete -c firejail -l blacklist -d 'Blacklist dir or file' -F
complete -c firejail -l noblacklist -d 'Disable blacklist for dir or file' -F
complete -c firejail -l whitelist -d 'Whitelist dir or file' -F
complete -c firejail -l nowhitelist -d 'Disable whitelist for dir or file' -F
complete -c firejail -l read-only -d 'Set dir or file read-only' -F
complete -c firejail -l read-write -d 'Set dir or file read-write' -F
# TODO: Comma-separated ("/etc/foo,/usr/etc/foo" bind-mounts /etc/foo on /usr/etc/foo)
complete -c firejail -l bind -d 'Bind-mount file on top of another' -F
complete -c firejail -l private -d 'Mount temporary home directories and delete on exit' -F
complete -c firejail -l netfilter -d 'Enable firewall given by this file' -F
# Interfaces
complete -c firejail -l net -d 'Enable network namespace connected to this interface' -a '(__fish_print_interfaces)'
# Commands
complete -c firejail -a '(__fish_complete_subcommand)'

View File

@@ -1,2 +0,0 @@
__fish_cache_sourced_completions fish-lsp complete
or fish-lsp complete | source

View File

@@ -1 +0,0 @@
folderify --completions fish | source

View File

@@ -1 +0,0 @@
complete -c gcloud -f -a '(__fish_argcomplete_complete gcloud)'

View File

@@ -16,7 +16,6 @@ complete -c gem -n __fish_use_subcommand -xa cleanup -d "Cleanup old versions of
complete -c gem -n __fish_use_subcommand -xa contents -d "Display the contents of the installed gems"
complete -c gem -n __fish_use_subcommand -xa dependency -d "Show the dependencies of an installed gem"
complete -c gem -n __fish_use_subcommand -xa environment -d "Display RubyGems environmental information"
complete -c gem -n __fish_use_subcommand -xa fetch -d "Download a gem into current directory"
complete -c gem -n __fish_use_subcommand -xa help -d "Provide help on the 'gem' command"
complete -c gem -n __fish_use_subcommand -xa install -d "Install a gem into the local repository"
complete -c gem -n __fish_use_subcommand -xa list -d "Display all gems whose name starts with STRING"
@@ -87,9 +86,6 @@ complete $dep_opt -s p -l pipe -d "Pipe Format (name --version ver)"
set -l env_opt -c gem -n 'contains environment (commandline -pxc)'
complete $env_opt -xa "packageversion\t'display the package version' gemdir\t'display the path where gems are installed' gempath\t'display path used to search for gems' version\t'display the gem format version' remotesources\t'display the remote gem servers'"
set -l fetch_opt -c gem -n 'contains fetch (commandline -pxc)'
complete $fetch_opt -s v -l version -d "Specify version of gem to download" -x
##
# help
set -l help_opt -c gem -n 'contains help (commandline -pxc)'

View File

@@ -1,6 +1,6 @@
# gh, at least as of version 1.17.5, does not write errors to stderr, causing
# `checks/completions.fish` to fail if the `gh-completion` module is missing.
# It also does not exit with a non-zero error code, making this harder than it needs to be :(
set completion "$(gh completion --shell fish 2>/dev/null)"
set completion "$(gh completion --shell fish)"
string match -rq '^Error' -- $completion && return -1
echo $completion | source

View File

@@ -882,16 +882,9 @@ short\t<sha1> / <author> / <title line>
medium\t<sha1> / <author> / <author date> / <title> / <commit msg>
full\t<sha1> / <author> / <committer> / <title> / <commit msg>
fuller\t<sha1> / <author> / <author date> / <committer> / <committer date> / <title> / <commit msg>
reference\t<abbrev-hash> (<title-line>, <short-author-date>)
email\t<sha1> <date> / <author> / <author date> / <title> / <commit msg>
mboxrd\tLike email, but lines in the commit message starting with \"From \" are quoted with \">\"
raw\tShow the entire commit exactly as stored in the commit object
format:\tSpecify which information to show
"
__fish_git config -z --get-regexp '^pretty\.' 2>/dev/null | while read -lz key value
set -l name (string replace -r '^.*?\.' '' -- $key)
printf "%s\t%s\n" $name $value
end
format:\tSpecify which information to show"
end
end
@@ -1447,7 +1440,7 @@ complete -c git -n '__fish_git_using_command diff' -s 1 -l base -d 'Compare the
complete -c git -n '__fish_git_using_command diff' -s 2 -l ours -d 'Compare the working tree with the "our branch"'
complete -c git -n '__fish_git_using_command diff' -s 3 -l theirs -d 'Compare the working tree with the "their branch"'
complete -c git -n '__fish_git_using_command diff' -s 0 -d 'Omit diff output for unmerged entries and just show "Unmerged"'
complete -c git -n '__fish_git_using_command diff' -k -n 'not __fish_git_contains_opt cached staged' -a '(
complete -c git -n '__fish_git_using_command diff' -n 'not __fish_git_contains_opt cached staged' -a '(
set -l kinds modified
contains -- -- (commandline -xpc) && set -a kinds deleted modified-staged-deleted
__fish_git_files $kinds
@@ -2569,11 +2562,11 @@ complete -c git -n __fish_git_needs_command -a '(__fish_git_custom_commands)' -d
function __fish_git_complete_custom_command -a subcommand
set -l cmd (commandline -xpc)
set -e cmd[1] # Drop "git".
set -l subcommand_args
set -lx subcommand_args
if argparse -s (__fish_git_global_optspecs) -- $cmd
set subcommand_args $argv[2..] # Drop the subcommand.
end
complete -C "git-$subcommand $(string escape -- $subcommand_args) "(commandline -ct)
complete -C "git-$subcommand \$subcommand_args "(commandline -ct)
end
# source git-* commands' autocompletion file if exists

View File

@@ -1,4 +1,4 @@
complete -c gprof -s A -l annotated-source -d "Print annotated source"
complete -c gprof -s A -l annoted-source -d "Print annotated source"
complete -c gprof -s b -l brief -d "Do not print explanations"
complete -c gprof -s C -l exec-counts -d "Print tally"
complete -c gprof -s i -l file-info -d "Display summary"

View File

@@ -1 +0,0 @@
complete -c gsutil -f -a '(__fish_argcomplete_complete gsutil)'

View File

@@ -1,68 +0,0 @@
function __fish_guild__complete_warnings
guild compile -Whelp |
string replace --filter --regex '^\s+`([a-z\-]+)\'\s+(.+)' '$1\t$2'
printf '%s\n' 0 2 3
echo 1\tdefault
end
function __fish_guild__complete_optimizations
guild compile -Ohelp |
string replace --filter --regex '^\s+-O(.+)' '$1\nno-$1'
printf '%s\n' 0 1 3
echo 2\tdefault
end
set -l command guild
complete -c $command -f
set -l compile_condition '__fish_seen_subcommand_from compile'
complete -c $command -a 'compile\tCompile scripts' -n "not $compile_condition"
complete -c $command -s h -l help -d 'Show help' -n $compile_condition
complete -c $command -l version -d 'Show version' -n $compile_condition
complete -c $command -s L -l load-path -F \
-d 'Specify the directory to prepend to module load path' \
-n $compile_condition
complete -c $command -s o -l output -F \
-d 'Specify the output file to put bytecode in' \
-n $compile_condition
complete -c $command -s x -x \
-d 'Specify the extension to prepend to extension list' \
-n $compile_condition
complete -c $command -s W -l warning \
-a '(__fish_complete_list , __fish_guild__complete_warnings)' \
-d 'Specify the warning level for a compilation' \
-n $compile_condition
complete -c $command -s O -l optimize \
-a '(__fish_guild__complete_optimizations)' \
-d 'Specify the optimization level for a compilation' \
-n $compile_condition
for standard in 6 7
set -l option r$standard"rc"
complete -c $command -l $option \
-d "Use $(string upper -- $option) compatible mode" \
-n $compile_condition
end
complete -c $command -s f -l from \
-a 'scheme\tdefault elisp ecmascript' \
-d 'Specify the language for sources' \
-n $compile_condition
complete -c $command -s t -l to \
-a 'rtl\tdefault' \
-d 'Specify the language for an output' \
-n $compile_condition
complete -c $command -s T -l target \
-d 'Specify the target for a code' \
-n $compile_condition

View File

@@ -1,115 +0,0 @@
function __fish_guile__complete_srfis
printf '%s\n' 0\t'cond-expand' \
1\t'List library' \
2\t'and-let*' \
4\t'Homogeneous numeric vector datatypes' \
6\t'Basic String Ports' \
8\t'receive' \
9\t'define-record-type' \
10\t'Hash-Comma Reader Extension' \
11\t'let-values' \
13\t'String Library' \
14\t'Character-set Library' \
16\t'case-lambda' \
17\t'Generalized set!' \
18\t'Multithreading support' \
19\t'Time/Date Library' \
23\t'Error Reporting' \
26\t'specializing parameters' \
27\t'Sources of Random Bits' \
28\t'Basic Format Strings' \
30\t'Nested Multi-line Comments' \
31\t'A special form rec for recursive evaluation' \
34\t'Exception handling for programs' \
35\t'Conditions' \
37\t'args-fold' \
38\t'External Representation for Data With Shared Structure' \
39\t'Parameters' \
41\t'Streams' \
42\t'Eager Comprehensions' \
43\t'Vector Library' \
45\t'Primitives for Expressing Iterative Lazy Algorithms' \
46\t'Basic syntax-rules Extensions' \
55\t'Requiring Features' \
60\t'Integers as Bits' \
61\t'A more general cond clause' \
62\t'S-expression comments' \
64\t'A Scheme API for test suites' \
67\t'Compare procedures' \
69\t'Basic hash tables' \
71\t'Extended let-syntax for multiple values' \
87\t'in case clauses' \
88\t'Keyword Objects' \
98\t'Accessing environment variables' \
105\t'Curly-infix expressions' \
111\t'Boxes' \
119\t'Wisp: simpler indentation-sensitive Scheme'
end
function __fish_guile__complete_function_names
set -l path (commandline -poc |
string match --regex '.*\\.scm$' |
sed -n 1p)
test -e "$path" && begin
cat $path |
string match --all --groups-only --regex '\(\s*define\s+\(\s*(\w+)'
end
end
set -l command guile
complete -c $command -f
complete -c $command -s h -l help -d 'Show help'
complete -c $command -s v -l version -d 'Show version'
complete -c $command -s s -F -r -d 'Specify the script to run'
complete -c $command -s c -x -d 'Specify the code to run'
complete -c $command -s L -F -r \
-d 'Specify the directory to prepend to module load path'
complete -c $command -s C -F -r \
-d 'Specify the directory to prepend to module load path for compiled files'
complete -c $command -s x -x \
-a '.scm\tdefault' \
-d 'Specify the extension to prepend to extension list'
complete -c $command -s l -F -r -d 'Specify the script to load'
complete -c $command -s e -x \
-a '(__fish_guile__complete_function_names)' \
-d 'Specify the entry point of a script'
complete -c $command -o ds \
-d 'Treat the last -s option as if it occurred at this point'
complete -c $command -l use-srfi \
-a '(__fish_complete_list , __fish_guile__complete_srfis)' \
-d 'Specify the SRFI modules to load'
for standard in 6 7
set -l option r$standard"rc"
complete -c $command -l $option \
-d "Use $(string upper -- $option) compatible mode"
end
complete -c $command -l debug -d 'Use debug mode'
complete -c $command -l no-debug -d "Don't use debug mode"
complete -c $command -s q -d "Don't load .guile file"
complete -c $command -l listen \
-a '37146\tdefault' \
-d 'Specify the port to list to'
complete -c $command -l auto-compile -d 'Compile scripts automatically'
complete -c $command -l fresh-auto-compile \
-d 'Compile scripts automatically forcefully'
complete -c $command -l no-auto-compile -d "Don't compile scripts automatically"
complete -c $command -l language \
-a 'scheme\tdefault elisp ecmascript' \
-d 'Specify the language for sources'

View File

@@ -15,7 +15,7 @@ complete -c htop -l readonly -d 'Disable all system and process changing feature
complete -c htop -l version -s V -d 'Show version and exit'
complete -c htop -l tree -s t -d 'Show processes in tree view'
complete -c htop -l highlight-changes -s H -d 'Highlight new and old processes' -x
complete -c htop -l drop-capabilities -d 'Drop unneeded Linux capabilities (Requires libpcap support)' -xka "
complete -c htop -l drop-capabilites -d 'Drop unneeded Linux capabilites (Requires libpcap support)' -xka "
off
basic
strict

View File

@@ -1,29 +0,0 @@
function __fish_iftop_sort_orders
echo -e "2s\tSort by 2s traffic average"
echo -e "10s\tSort by 10s traffic average (default)"
echo -e "40s\tSort by 40s traffic average"
echo -e "source\tSort by source address"
echo -e "destination\tSort by destination address"
end
complete -c iftop -f
complete -c iftop -s h -d "Print a summary of usage"
complete -c iftop -s n -d "Don't do hostname lookups"
complete -c iftop -s N -d "Don't resolve port number to service names"
complete -c iftop -s p -d "Run in promiscuous mode"
complete -c iftop -s P -d "Turn on port display"
complete -c iftop -s l -d "Include link-local IPv6 addresses"
complete -c iftop -s b -d "Don't display bar graphs of traffic"
complete -c iftop -s m -x -d "Set the upper limit for the bandwidth scale"
complete -c iftop -s B -d "Show bandwidth rates in bytes/s rather than bits/s"
complete -c iftop -s i -xa "(__fish_print_interfaces)" -d "Listen to packets on interface"
complete -c iftop -s f -x -d "Use filter code to select the packets to count"
complete -c iftop -s F -x -d "Filter to only specified IPv4 network"
complete -c iftop -s G -x -d "Filter to only specified IPv6 network"
complete -c iftop -s c -r -d "Use specified config file"
complete -c iftop -s o -xa "(__fish_iftop_sort_orders)" -d "Sort by specified column"
complete -c iftop -s t -d "Use text interface without ncurses"
complete -c iftop -s L -x -d "Number of lines to print with -t"
complete -c iftop -s s -x -d "With -t, print single output after specific number of seconds"

View File

@@ -14,7 +14,7 @@ set -l ip_all_commands $ip_commands $ip_addr $ip_link $ip_neigh $ip_route $ip_ru
function __fish_ip_commandwords
set -l skip 0
set -l cmd (commandline -xpc | string escape)
set -l cmd (commandline -xpc)
# Remove the first word because it's "ip" or an alias for it
set -e cmd[1]
set -l have_command 0

View File

@@ -9,7 +9,7 @@ complete -c kak -o p -x -a '(command kak -l)' -d 'just send stdin as commands to
complete -c kak -o f -x -d 'filter: for each file, select the entire buffer and execute the given keys'
complete -c kak -o i -x -d 'backup the files on which a filter is applied using the given suffix'
complete -c kak -o q -d 'in filter mode be quiet about errors applying keys'
complete -c kak -o ui -x -a 'terminal dummy json' -d 'set the type of user interface to use'
complete -c kak -o ui -x -a 'ncurses dummy json' -d 'set the type of user interface to use'
complete -c kak -o l -d 'list existing sessions'
complete -c kak -o clear -d 'clear dead sessions'
complete -c kak -o debug -x -d 'initial debug option value' -a 'hooks shell profile keys commands'

View File

@@ -1 +0,0 @@
kops completion fish 2>/dev/null | source

View File

@@ -1,20 +0,0 @@
complete -c lazygit -xa "status branch log stash"
complete -c lazygit -s h -l help -d 'Display help'
complete -c lazygit -s v -l version -d 'Print version'
complete -c lazygit -s p -l path -d 'Path of git repo' -xa "(__fish_complete_directories)"
# Config
complete -c lazygit -s c -l config -d 'Print the default config'
complete -c lazygit -o cd -l print-config-dir -d 'Print the config directory'
complete -c lazygit -o ucd -l use-config-dir -d 'Override default config directory with provided directory' -r
complete -c lazygit -o ucf -l use-config-file -d 'Comma separated list to custom config file(s)' -r
# Git
complete -c lazygit -s f -l filter -d 'Path to filter on in `git log -- <path>`' -r
complete -c lazygit -s g -l git-dir -d 'Equivalent of the --git-dir git argument' -r
complete -c lazygit -s w -l work-tree -d 'Equivalent of the --work-tree git argument' -xa "(__fish_complete_directories)"
# Debug
complete -c lazygit -s d -l debug -d 'Run in debug mode with logging'
complete -c lazygit -s l -l logs -d 'Tail lazygit logs; used with --debug'
complete -c lazygit -l profile -d 'Start the profiler and serve it on http port 6060'

View File

@@ -1,50 +0,0 @@
# Basic completions for simonw/llm
# A complete implementation for `llm [prompt]` but other subcommands
# can be further fleshed out.
set -l subcmds prompt aliases chat collections embed embed-models embed-multi install keys logs models openai plugins similar templates uninstall
function __fish_llm_subcmds
printf "%s\t%s\n" "prompt" "Execute a prompt" \
"aliases" "Manage model aliases" \
"chat" "Hold chat with model" \
"collections" "View/manage embedding collections" \
"embed" "Embed text and get/store result" \
"embed-models" "Manage available embedding models" \
"embed-multi\Store embeddings for multiple strings" \
"install" "Install PyPI packages into llm env" \
"keys" "Manage stored API keys" \
"logs" "Explore logged prompts/responses" \
"models" "Manage available models" \
"openai" "Work with OpenAI API directly" \
"plugins" "List installed plugins" \
"similar" "Return top-N similar IDs for collection" \
"templates" "Manage stored prompt templates" \
"uninstall" "Uninstall Python packages from llm env"
end
complete -c llm -n __fish_is_first_token -xa "(__fish_llm_subcmds)"
# This applies to the base command only
complete -c llm -n "not __fish_seen_subcommand_from $subcmds" -l version -d "Show version info"
# This applies to the base command or any subcommands
complete -c llm -l help -d "Show usage info"
function __fish_llm_models
llm models |
string replace -r '^[^:]+: ([^ ]+)(?: \\(aliases: )?([^),]+,?)?+.*$' '$1 $2' |
string split ' ' -n |
string trim -c ','
end
# The default subcommand is 'prompt'
set -l is_prompt "not __fish_seen_subcommand_from $subcmds || __fish_seen_subcommand_from prompt"
complete -c llm -n $is_prompt -s s -l system -d "System prompt to use"
complete -c llm -n $is_prompt -s m -l model -d "Model to use" -xa "(__fish_llm_models)"
complete -c llm -n $is_prompt -s a -l attachment -d "Attachment to use" -r -a'-'
complete -c llm -n $is_prompt -l at -d "Attachment type" -r
complete -c llm -n $is_prompt -l attachment-type -d "Attachment type" -r
complete -c llm -n $is_prompt -s n -l no-log -d "Don't log to db"
complete -c llm -n $is_prompt -s l -l log -d "Log prompt/reply to db"
complete -c llm -n $is_prompt -s c -l continue -d "Continue most recent conversation"
complete -c llm -n $is_prompt -l key -d "API key to use"
complete -c llm -n $is_prompt -l save -d "Save prompt as template with name" -r

View File

@@ -1,13 +1,10 @@
complete -c md5sum -d "Compute and check message digest" -r
complete -c md5sum -s b -l binary -d 'Read in binary mode'
complete -c md5sum -s c -l check -d "Read sums from files and check them"
complete -c md5sum -l tag -d 'Create a BSD-style checksum'
complete -c md5sum -s t -l text -d 'Read in text mode (default)'
complete -c md5sum -s z -l zero -d 'End each output line with NUL, not newline, and disable file name escaping'
complete -c md5sum -l ignore-missing -d 'Don\'t fail or report status for missing files'
complete -c md5sum -l quiet -d 'Don\'t print OK for each successfully verified file'
complete -c md5sum -l status -d 'Don\'t output anything, status code shows success'
complete -c md5sum -l strict -d 'With --check, exit non-zero for any invalid input'
complete -c md5sum -s t -l text -d 'Read in text mode'
complete -c md5sum -l quiet -d 'Don''t print OK for each successfully verified file'
complete -c md5sum -l status -d 'Don''t output anything, status code shows success'
complete -c md5sum -s w -l warn -d 'Warn about improperly formatted checksum lines'
complete -c md5sum -l strict -d 'With --check, exit non-zero for any invalid input'
complete -c md5sum -l help -d 'Display help text'
complete -c md5sum -l version -d 'Output version information and exit'

View File

@@ -1,94 +0,0 @@
complete -c mksquashfs -o b -d 'Data block size'
complete -c mksquashfs -o comp -d 'Selects the compression scheme' -xa 'gzip lzo lz4 xz zstd lzma'
complete -c mksquashfs -o noI -o noInodeCompression -d 'Do not compress inode table'
complete -c mksquashfs -o noId -o noIdTableCompression -d 'Do not compress the uid/gid table'
complete -c mksquashfs -o noD -o noDataCompression -d 'Do not compress data blocks'
complete -c mksquashfs -o noF -o noFragmentCompression -d 'Do not compress fragment blocks'
complete -c mksquashfs -o noX -o noXattrCompression -d 'Do not compress extended attributes'
complete -c mksquashfs -o no-compression -d 'Do not compress any of the data or metadata'
complete -c mksquashfs -o tar -d 'Read uncompressed tar file from standard in (stdin)'
complete -c mksquashfs -o no-strip -o tarstyle -d 'Act like tar, and do not strip leading directories from source files'
complete -c mksquashfs -o cpiostyle -d 'Act like cpio, and read file pathnames from standard in (stdin)'
complete -c mksquashfs -o cpiostyle0 -d 'Like -cpiostyle, but filenames are null terminated'
complete -c mksquashfs -o reproducible -d 'Build filesystems that are reproducible'
complete -c mksquashfs -o not-reproducible -d 'Build filesystems that are not reproducible'
complete -c mksquashfs -o mkfs-time -o fstime -xd 'Set filesystem creation timestamp'
complete -c mksquashfs -o all-time -xd 'Set all file timestamps'
complete -c mksquashfs -o root-time -xd 'Set root directory time'
complete -c mksquashfs -o root-mode -xd 'Set root directory permissions to octal <mode>'
complete -c mksquashfs -o root-uid -xa '(__fish_complete_user_ids)' -d 'Set root directory owner'
complete -c mksquashfs -o root-gid -xa '(__fish_complete_group_ids)' -d 'Set root directory group'
complete -c mksquashfs -o all-root -o root-owned -d 'Make all files owned by root'
complete -c mksquashfs -o force-uid -xa '(__fish_complete_user_ids)' -d 'Set all file uids'
complete -c mksquashfs -o force-gid -xa '(__fish_complete_group_ids)' -d 'Set all file gids'
complete -c mksquashfs -o pseudo-override -d 'Make pseudo file uids and gids override -all-root, -force-uid and -force-gid options'
complete -c mksquashfs -o no-exports -d 'Do not make filesystem exportable via NFS'
complete -c mksquashfs -o exports -d 'Make filesystem exportable via NFS'
complete -c mksquashfs -o no-sparse -d 'Do not detect sparse files'
complete -c mksquashfs -o no-tailends -d 'Do not pack tail ends into fragments'
complete -c mksquashfs -o tailends -o always-use-fragments -d 'Pack tail ends into fragments'
complete -c mksquashfs -o no-fragments -d 'Do not use fragments'
complete -c mksquashfs -o no-duplicates -d 'Do not perform duplicate checking'
complete -c mksquashfs -o no-hardlinks -d 'Do not hardlink files, instead store duplicates'
complete -c mksquashfs -o keep-as-directory -d 'If one source directory is specified, create a root directory containing that directory, rather than the contents of the directory'
complete -c mksquashfs -o p -xd 'Add pseudo file definition'
complete -c mksquashfs -o pf -rd 'Add list of pseudo file definitions from <pseudo-file>'
complete -c mksquashfs -o sort -rd 'Sort files according to priorities in <sort_file>'
complete -c mksquashfs -o ef -rd 'List of exclude dirs/files'
complete -c mksquashfs -o wildcards -d 'Allow extended shell wildcards (globbing) to be used in exclude dirs/files'
complete -c mksquashfs -o regex -d 'Allow POSIX regular expressions to be used in exclude dirs/files'
complete -c mksquashfs -o max-depth -xd 'Descend at most <levels> of directories when scanning filesystem'
complete -c mksquashfs -o one-file-system -d 'Do not cross filesystem boundaries'
complete -c mksquashfs -o one-file-system-x -d 'Do not cross filesystem boundaries'
complete -c mksquashfs -o no-xattrs -d 'Do not store extended attributes'
complete -c mksquashfs -o xattrs -d 'Store extended attributes'
complete -c mksquashfs -o xattrs-exclude -xd 'Exclude any xattr names matching <regex>'
complete -c mksquashfs -o xattrs-include -xd 'Include any xattr names matching <regex>'
complete -c mksquashfs -o xattrs-add -xd 'Add the xattr <name> with <val> to files'
complete -c mksquashfs -o version -d 'Print version, licence and copyright message'
complete -c mksquashfs -o exit-on-error -d 'Treat normally ignored errors as fatal'
complete -c mksquashfs -o quiet -d 'No verbose output'
complete -c mksquashfs -o info -d 'Print files written to filesystem'
complete -c mksquashfs -o no-progress -d 'Do not display the progress bar'
complete -c mksquashfs -o progress -d 'Display progress bar when using the -info option'
complete -c mksquashfs -o percentage -d 'Display a percentage rather than the full progress bar'
complete -c mksquashfs -o throttle -xd 'Throttle the I/O input rate by the given percentage'
complete -c mksquashfs -o limit -xd 'Limit the I/O input rate to the given percentage'
complete -c mksquashfs -o processors -xd 'Use <number> processors'
complete -c mksquashfs -o mem -xd 'Use <size> physical memory for caches'
complete -c mksquashfs -o mem-percent -xd 'Use <percent> physical memory for caches'
complete -c mksquashfs -o mem-default -d 'Print default memory usage in Mbytes'
complete -c mksquashfs -o noappend -d 'Do not append to existing filesystem'
complete -c mksquashfs -o root-becomes -xd 'When appending source files/directories, make the original root become a subdirectory in the new root called <name>, rather than adding the new source items to the original root'
complete -c mksquashfs -o no-recovery -d 'Do not generate a recovery file'
complete -c mksquashfs -o recovery-path -rd 'Use <name> as the directory to store the recovery file'
complete -c mksquashfs -o recover -rd 'Recover filesystem data using recovery file'
complete -c mksquashfs -o action -xd 'Evaluate <expr> on every file, and execute <action> if it returns TRUE'
complete -c mksquashfs -o log-action -xd 'As -action, but log expression evaluation results and actions performed'
complete -c mksquashfs -o true-action -xd 'As -action, but only log expressions which return TRUE'
complete -c mksquashfs -o false-action -xd 'As -action, but only log expressions which return FALSE'
complete -c mksquashfs -o action-file -rd 'As -action, but read actions from <file>'
complete -c mksquashfs -o log-action-file -rd 'As -log-action, but read actions from <file>'
complete -c mksquashfs -o true-action-file -rd 'As -true-action, but read actions from <f>'
complete -c mksquashfs -o false-action-file -rd 'As -false-action, but read actions from <f>'
complete -c mksquashfs -o default-mode -xd 'Sets the default directory permissions to octal <mode>'
complete -c mksquashfs -o default-uid -xa '(__fish_complete_user_ids)' -d 'Sets the default directory user'
complete -c mksquashfs -o default-gid -xa '(__fish_complete_group_ids)' -d 'Sets the default directory group'
complete -c mksquashfs -o ignore-zeros -d 'Allow tar files to be concatenated together and fed to Mksquashfs'
complete -c mksquashfs -o nopad -d 'Do not pad filesystem to a multiple of 4K'
complete -c mksquashfs -o o -o offset -xd 'Skip <offset> bytes at the beginning of FILESYSTEM'
complete -c mksquashfs -o h -o help -d 'Print help and exit'
complete -c mksquashfs -o Xhelp -d 'Print compressor options for selected compressor'
complete -c mksquashfs -o Xwindow-size -xd 'Window size in range 8 .. 15 (gzip only)'
complete -c mksquashfs -o Xstrategy -xa 'default filtered huffman_only run_length_encoded fixed' -d 'Strategy to use (gzip only)'
complete -c mksquashfs -o Xalgorithm -xa 'lzo1x_1 lzo1x_1_11 lzo1x_1_12 lzo1x_1_15 lzo1x_999' -d 'Algorithm to use (lzo only)'
complete -c mksquashfs -o Xhc -d 'Compress using LZ4 High Compression (lz4 only)'
complete -c mksquashfs -o Xbcj -xa 'x86 arm armthumb powerpc sparc ia64' -d 'Compress using filters in turn and choose the best compression (xz only)'
complete -c mksquashfs -o Xdict-size -xd 'Set xz dictionary size (xz only)'
# Specialize description if compressor name appears in argv. Misdetection is possible.
complete -c mksquashfs -o Xcompression-level -xd 'Compression level setting (lzo, gzip, zstd)'
complete -c mksquashfs -n '__fish_seen_argument lzo' -o Xcompression-level -xd 'Sets compression level for lzo1x_999 algorithm in range 1 .. 9'
complete -c mksquashfs -n '__fish_seen_argument gzip' -o Xcompression-level -xd 'Sets gzip compression level in range 1 .. 9'
complete -c mksquashfs -n '__fish_seen_argument zstd' -o Xcompression-level -xd 'Sets zstd compression level in range 1 .. 22'

View File

@@ -141,8 +141,7 @@ complete -f -c npm -n '__fish_npm_using_command cache' -s h -l help -d 'Display
# install-ci-test
complete -f -c npm -n __fish_npm_needs_command -a 'ci clean-install' -d 'Clean install a project'
complete -f -c npm -n __fish_npm_needs_command -a 'install-ci-test cit' -d 'Install a project with a clean slate and run tests'
# typos are intentional
for c in ci clean-install ic install-clean isntall-clean install-ci-test cit clean-install-test sit
for c in ci clean-install ic install-clean install-clean install-ci-test cit clean-install-test sit
complete -x -c npm -n "__fish_npm_using_command $c" -l install-strategy -a 'hoisted nested shallow linked' -d 'Install strategy'
complete -x -c npm -n "__fish_npm_using_command $c" -l omit -a 'dev optional peer' -d 'Omit dependency type'
complete -x -c npm -n "__fish_npm_using_command $c" -l strict-peer-deps -d 'Treat conflicting peerDependencies as failure'
@@ -407,8 +406,7 @@ end
complete -c npm -n __fish_npm_needs_command -a 'install add i' -d 'Install a package'
complete -f -c npm -n __fish_npm_needs_command -a 'install-test it' -d 'Install package(s) and run tests'
complete -f -c npm -n __fish_npm_needs_command -a 'link ln' -d 'Symlink a package folder'
# typos are intentional
for c in install add i in ins inst insta instal isnt isnta isntal isntall install-test it link ln
for c in install add i in ins inst insta instal isnt isnta isntal install install-test it link ln
complete -f -c npm -n "__fish_npm_using_command $c" -s S -l save -d 'Save to dependencies'
complete -f -c npm -n "__fish_npm_using_command $c" -l no-save -d 'Prevents saving to dependencies'
complete -f -c npm -n "__fish_npm_using_command $c" -s P -l save-prod -d 'Save to dependencies'
@@ -728,4 +726,4 @@ complete -f -c npm -n '__fish_npm_using_command whoami' -a registry -d 'Check re
complete -f -c npm -n '__fish_npm_using_command whoami' -s h -l help -d 'Display help'
# misc
complete -f -c npm -n '__fish_seen_subcommand_from add i in ins inst insta instal isnt isnta isntal isntall; and not __fish_is_switch' -a "(__npm_filtered_list_packages \"$npm_install\")"
complete -f -c npm -n '__fish_seen_subcommand_from add i in ins inst insta instal isnt isnta isntal install; and not __fish_is_switch' -a "(__npm_filtered_list_packages \"$npm_install\")"

View File

@@ -2,18 +2,16 @@ function __fish_ollama_list
ollama list 2>/dev/null | tail -n +2 | string replace --regex "\s.*" ""
end
complete -f -c ollama
complete -c ollama -n __fish_use_subcommand -a serve -d "Start ollama"
complete -c ollama -n __fish_use_subcommand -a create -d "Create a model from a Modelfile"
complete -c ollama -n __fish_use_subcommand -a show -d "Show information for a model"
complete -c ollama -n __fish_use_subcommand -a run -d "Run a model"
complete -c ollama -n __fish_use_subcommand -a pull -d "Pull a model from a registry"
complete -c ollama -n __fish_use_subcommand -a push -d "Push a model to a registry"
complete -c ollama -n __fish_use_subcommand -a list -d "List models"
complete -c ollama -n __fish_use_subcommand -a cp -d "Copy a model"
complete -c ollama -n __fish_use_subcommand -a rm -d "Remove a model"
complete -c ollama -n __fish_use_subcommand -a help -d "Help about any command"
complete -c ollama -a serve -d "Start ollama"
complete -c ollama -a create -d "Create a model from a Modelfile"
complete -c ollama -a show -d "Show information for a model"
complete -c ollama -a run -d "Run a model"
complete -c ollama -a pull -d "Pull a model from a registry"
complete -c ollama -a push -d "Push a model to a registry"
complete -c ollama -a list -d "List models"
complete -c ollama -a cp -d "Copy a model"
complete -c ollama -a rm -d "Remove a model"
complete -c ollama -a help -d "Help about any command"
complete -c ollama -s h -l help -d "help for ollama"
complete -c ollama -s v -l version -d "Show version information"
complete -c ollama -f -a "(__fish_ollama_list)" --condition '__fish_seen_subcommand_from show'

View File

@@ -14,7 +14,6 @@ complete -f -c path -n "test (count (commandline -xpc)) -lt 2" -a sort -d 'Sort
complete -f -c path -n "test (count (commandline -xpc)) -ge 2" -s q -l quiet -d "Only return status, no output"
complete -f -c path -n "test (count (commandline -xpc)) -ge 2" -s z -l null-in -d "Handle NULL-delimited input"
complete -f -c path -n "test (count (commandline -xpc)) -ge 2" -s Z -l null-out -d "Print NULL-delimited output"
complete -f -c path -n "test (count (commandline -xpc)) -ge 2; and contains -- (commandline -xpc)[2] basename" -s E -l no-extension -d "Remove the extension"
complete -f -c path -n "test (count (commandline -xpc)) -ge 2; and contains -- (commandline -xpc)[2] filter is" -s v -l invert -d "Invert meaning of filters"
complete -f -c path -n "test (count (commandline -xpc)) -ge 2; and contains -- (commandline -xpc)[2] filter is" -s t -l type -d "Filter by type" -x -a '(__fish_append , file link dir block char fifo socket)'
complete -f -c path -n "test (count (commandline -xpc)) -ge 2; and contains -- (commandline -xpc)[2] filter is" -s f -d "Filter files"

View File

@@ -169,7 +169,7 @@ complete -c pkg -n '__fish_pkg_is list' -xa '(pkg query "%n")'
complete -c pkg -n '__fish_pkg_is add update' -s f -l force -d "Force a full download of a repository"
# alias
set -l with_package_names all-depends annotations build-depends cinfo comment csearch desc iinfo isearch \
set -l with_packge_names all-depends annotations build-depends cinfo comment csearch desc iinfo isearch \
list options origin provided-depends roptions shared-depends show size
for alias in (pkg alias -lq)

View File

@@ -16,12 +16,12 @@ complete -c pygmentize -s o -d "Set output file"
complete -c pygmentize -s s -d "Read one line at a time"
complete -c pygmentize -s l -d "Set lexer" -x -a "(__fish_print_pygmentize lexers Lexer)"
complete -c pygmentize -s g -d "Guess lexer"
complete -c pygmentize -s f -d "Set formatter" -x -a "(__fish_print_pygmentize formatters Formatter)"
complete -c pygmentize -s O -d "Set coma-separated options" -x
complete -c pygmentize -s f -d "Set formater" -x -a "(__fish_print_pygmentize formaters Formater)"
complete -c pygmentize -s O -d "Set coma-seperated options" -x
complete -c pygmentize -s P -d "Set one option" -x
complete -c pygmentize -s F -d "Set filter" -x -a "(__fish_print_pygmentize filters Filter)"
complete -c pygmentize -s S -d "Print style definition for given style" -x -a "(__fish_print_pygmentize styles Style)"
complete -c pygmentize -s L -d "List lexers, formatters, styles or filters" -x -a "lexers formatters styles filters"
complete -c pygmentize -s L -d "List lexers, formaters, styles or filters" -x -a "lexers formaters styles filters"
complete -c pygmentize -s N -d "Guess and print lexer name based on given file"
complete -c pygmentize -s H -d "Print detailed help" -x -a "lexer formatter filter"
complete -c pygmentize -s v -d "Print detailed traceback on unhandled exceptions"

View File

@@ -1,42 +1,23 @@
# This function adjusts for options with arguments (-X, -W, etc.), ensures completions stop when a script/module is set (-c, -m, file, -)
function __fish_python_no_arg
set -l num 1
set -l tokens (commandline -pxc)
set -l has_arg_list -X -W --check-hash-based-pycs
if contains -- - $tokens
set num (math $num - 1)
end
for has_arg in $has_arg_list
if contains -- $has_arg $tokens
set num (math $num + 1)
end
end
if test (__fish_number_of_cmd_args_wo_opts) -gt $num
return 1
end
return 0
end
complete -c python -n __fish_python_no_arg -s B -d 'Don\'t write .py[co] files on import'
complete -c python -n __fish_python_no_arg -s c -x -d "Execute argument as command"
complete -c python -n __fish_python_no_arg -l check-hash-based-pycs -a "default always never" -d "Control validation behaviour of pyc files"
complete -c python -n __fish_python_no_arg -s d -d "Debug on"
complete -c python -n __fish_python_no_arg -s E -d "Ignore all PYTHON* env vars"
complete -c python -n __fish_python_no_arg -s h -s '?' -l help -d "Display help and exit"
complete -c python -n __fish_python_no_arg -s i -d "Interactive mode after executing commands"
complete -c python -n __fish_python_no_arg -s m -d 'Run library module as a script (terminates option list)' -xa '(python -c "import pkgutil; print(\'\n\'.join([p[1] for p in pkgutil.iter_modules()]))")'
complete -c python -n __fish_python_no_arg -s O -d "Enable optimizations"
complete -c python -n __fish_python_no_arg -o OO -d "Remove doc-strings in addition to the -O optimizations"
complete -c python -n __fish_python_no_arg -s s -d 'Don\'t add user site directory to sys.path'
complete -c python -n __fish_python_no_arg -s S -d "Disable import of site module"
complete -c python -n __fish_python_no_arg -s u -d "Unbuffered input and output"
complete -c python -n __fish_python_no_arg -s v -d "Verbose mode"
complete -c python -n __fish_python_no_arg -o vv -d "Even more verbose mode"
complete -c python -n __fish_python_no_arg -s V -l version -d "Display version and exit"
complete -c python -n __fish_python_no_arg -s W -x -d "Warning control" -a "ignore default all module once error"
complete -c python -n __fish_python_no_arg -s x -d 'Skip first line of source, allowing use of non-Unix forms of #!cmd'
complete -c python -n __fish_python_no_arg -f -k -a "(__fish_complete_suffix .py)"
complete -c python -n __fish_python_no_arg -f -a - -d 'Read program from stdin'
complete -c python -s B -d 'Don\'t write .py[co] files on import'
complete -c python -s c -x -d "Execute argument as command"
complete -c python -l check-hash-based-pycs -a "default always never" -d "Control validation behaviour of pyc files"
complete -c python -s d -d "Debug on"
complete -c python -s E -d "Ignore all PYTHON* env vars"
complete -c python -s h -s '?' -l help -d "Display help and exit"
complete -c python -s i -d "Interactive mode after executing commands"
complete -c python -s m -d 'Run library module as a script (terminates option list)' -xa '(python -c "import pkgutil; print(\'\n\'.join([p[1] for p in pkgutil.iter_modules()]))")'
complete -c python -s O -d "Enable optimizations"
complete -c python -o OO -d "Remove doc-strings in addition to the -O optimizations"
complete -c python -s s -d 'Don\'t add user site directory to sys.path'
complete -c python -s S -d "Disable import of site module"
complete -c python -s u -d "Unbuffered input and output"
complete -c python -s v -d "Verbose mode"
complete -c python -o vv -d "Even more verbose mode"
complete -c python -s V -l version -d "Display version and exit"
complete -c python -s W -x -d "Warning control" -a "ignore default all module once error"
complete -c python -s x -d 'Skip first line of source, allowing use of non-Unix forms of #!cmd'
complete -c python -f -n "__fish_is_nth_token 1" -k -a "(__fish_complete_suffix .py)"
complete -c python -f -n "__fish_is_nth_token 1" -a - -d 'Read program from stdin'
# Version-specific completions
# We have to detect this at runtime because pyenv etc can change
@@ -44,10 +25,10 @@ complete -c python -n __fish_python_no_arg -f -a - -d 'Read program from stdin'
complete -c python -n 'python -V 2>&1 | string match -rq "^.*\s2"' -s 3 -d 'Warn about Python 3.x incompatibilities that 2to3 cannot trivially fix'
complete -c python -n 'python -V 2>&1 | string match -rq "^.*\s2"' -s t -d "Warn on mixed tabs and spaces"
complete -c python -n 'python -V 2>&1 | string match -rq "^.*\s2"' -s Q -x -a "old new warn warnall" -d "Division control"
complete -c python -n 'python -V 2>&1 | string match -rq "^.*\s3" && __fish_python_no_arg' -s q -d 'Don\'t print version and copyright messages on interactive startup'
complete -c python -n 'python -V 2>&1 | string match -rq "^.*\s3" && __fish_python_no_arg' -s X -x -d 'Set implementation-specific option'
complete -c python -n 'python -V 2>&1 | string match -rq "^.*\s3" && __fish_python_no_arg' -s b -d 'Warn when comparing bytes with str or int'
complete -c python -n 'python -V 2>&1 | string match -rq "^.*\s3" && __fish_python_no_arg' -o bb -d 'Error when comparing bytes with str or int'
complete -c python -n 'python -V 2>&1 | string match -rq "^.*\s3" && __fish_python_no_arg' -s R -d 'Turn on hash randomization'
complete -c python -n 'python -V 2>&1 | string match -rq "^.*\s3" && __fish_python_no_arg' -s I -d 'Run in isolated mode'
complete -c python -n 'python -V 2>&1 | string match -rq "^.*\s3" && __fish_python_no_arg' -o VV -d 'Print further version info'
complete -c python -n 'python -V 2>&1 | string match -rq "^.*\s3"' -s q -d 'Don\'t print version and copyright messages on interactive startup'
complete -c python -n 'python -V 2>&1 | string match -rq "^.*\s3"' -s X -x -d 'Set implementation-specific option'
complete -c python -n 'python -V 2>&1 | string match -rq "^.*\s3"' -s b -d 'Warn when comparing bytes with str or int'
complete -c python -n 'python -V 2>&1 | string match -rq "^.*\s3"' -o bb -d 'Error when comparing bytes with str or int'
complete -c python -n 'python -V 2>&1 | string match -rq "^.*\s3"' -s R -d 'Turn on hash randomization'
complete -c python -n 'python -V 2>&1 | string match -rq "^.*\s3"' -s I -d 'Run in isolated mode'
complete -c python -n 'python -V 2>&1 | string match -rq "^.*\s3"' -o VV -d 'Print further version info'

View File

@@ -1,43 +1,24 @@
# This function adjusts for options with arguments (-X, -W, etc.), ensures completions stop when a script/module is set (-c, -m, file, -)
function __fish_python_no_arg
set -l num 1
set -l tokens (commandline -pxc)
set -l has_arg_list -X -W --check-hash-based-pycs
if contains -- - $tokens
set num (math $num - 1)
end
for has_arg in $has_arg_list
if contains -- $has_arg $tokens
set num (math $num + 1)
end
end
if test (__fish_number_of_cmd_args_wo_opts) -gt $num
return 1
end
return 0
end
complete -c python3 -n __fish_python_no_arg -s B -d 'Don\'t write .py[co] files on import'
complete -c python3 -n __fish_python_no_arg -s c -x -d "Execute argument as command"
complete -c python3 -n __fish_python_no_arg -s d -d "Debug on"
complete -c python3 -n __fish_python_no_arg -s E -d "Ignore environment variables"
complete -c python3 -n __fish_python_no_arg -s h -s '?' -l help -d "Display help and exit"
complete -c python3 -n __fish_python_no_arg -s i -d "Interactive mode after executing commands"
complete -c python3 -n __fish_python_no_arg -s O -d "Enable optimizations"
complete -c python3 -n __fish_python_no_arg -o OO -d "Remove doc-strings in addition to the -O optimizations"
complete -c python3 -n __fish_python_no_arg -s s -d 'Don\'t add user site directory to sys.path'
complete -c python3 -n __fish_python_no_arg -s S -d "Disable import of site module"
complete -c python3 -n __fish_python_no_arg -s u -d "Unbuffered input and output"
complete -c python3 -n __fish_python_no_arg -s v -d "Verbose mode"
complete -c python3 -n __fish_python_no_arg -s V -l version -d "Display version and exit"
complete -c python3 -n __fish_python_no_arg -s W -x -d "Warning control" -a "ignore default all module once error"
complete -c python3 -n __fish_python_no_arg -s x -d 'Skip first line of source, allowing use of non-Unix forms of #!cmd'
complete -c python3 -n __fish_python_no_arg -k -fa "(__fish_complete_suffix .py)"
complete -c python3 -n __fish_python_no_arg -fa - -d 'Read program from stdin'
complete -c python3 -n __fish_python_no_arg -s q -d 'Don\'t print version and copyright messages on interactive startup'
complete -c python3 -n __fish_python_no_arg -s X -x -d 'Set implementation-specific option' -a 'faulthandler showrefcount tracemalloc showalloccount importtime dev utf8 pycache_prefix=PATH:'
complete -c python3 -n __fish_python_no_arg -s b -d 'Issue warnings for possible misuse of `bytes` with `str`'
complete -c python3 -n __fish_python_no_arg -o bb -d 'Issue errors for possible misuse of `bytes` with `str`'
complete -c python3 -n __fish_python_no_arg -s m -d 'Run library module as a script (terminates option list)' -xa '(python3 -c "import pkgutil; print(\'\n\'.join([p[1] for p in pkgutil.iter_modules()]))")'
complete -c python3 -n __fish_python_no_arg -l check-hash-based-pycs -d 'Set pyc hash check mode' -xa "default always never"
complete -c python3 -n __fish_python_no_arg -s I -d 'Run in isolated mode'
complete -c python3 -s B -d 'Don\'t write .py[co] files on import'
complete -c python3 -s c -x -d "Execute argument as command"
complete -c python3 -s d -d "Debug on"
complete -c python3 -s E -d "Ignore environment variables"
complete -c python3 -s h -s '?' -l help -d "Display help and exit"
complete -c python3 -s i -d "Interactive mode after executing commands"
complete -c python3 -s O -d "Enable optimizations"
complete -c python3 -o OO -d "Remove doc-strings in addition to the -O optimizations"
complete -c python3 -s s -d 'Don\'t add user site directory to sys.path'
complete -c python3 -s S -d "Disable import of site module"
complete -c python3 -s u -d "Unbuffered input and output"
complete -c python3 -s v -d "Verbose mode"
complete -c python3 -s V -l version -d "Display version and exit"
complete -c python3 -s W -x -d "Warning control" -a "ignore default all module once error"
complete -c python3 -s x -d 'Skip first line of source, allowing use of non-Unix forms of #!cmd'
complete -c python3 -n "__fish_is_nth_token 1" -k -fa "(__fish_complete_suffix .py)"
complete -c python3 -f -n "__fish_is_nth_token 1" -a - -d 'Read program from stdin'
complete -c python3 -s q -d 'Don\'t print version and copyright messages on interactive startup'
complete -c python3 -s X -x -d 'Set implementation-specific option' -a 'faulthandler showrefcount tracemalloc showalloccount importtime dev utf8 pycache_prefex=PATH:'
complete -c python3 -s b -d 'Issue warnings for possible misuse of `bytes` with `str`'
complete -c python3 -o bb -d 'Issue errors for possible misuse of `bytes` with `str`'
complete -c python3 -s m -d 'Run library module as a script (terminates option list)' -xa '(python3 -c "import pkgutil; print(\'\n\'.join([p[1] for p in pkgutil.iter_modules()]))")'
complete -c python3 -l check-hash-based-pycs -d 'Set pyc hash check mode' -xa "default always never"
complete -c python3 -s I -d 'Run in isolated mode'

View File

@@ -1,14 +1,10 @@
if set -l rclone_version (rclone version | string match -rg 'rclone v?(.*)' | string split .) &&
test "$rclone_version[1]" -lt 1 ||
test "$rclone_version[1]" -eq 1 &&
test "$rclone_version[2]" -le 62
# version is definitely <= 1.62, adding a `-` would be an error
rclone completion fish
else
# For newer versions, this requires an `-`. Without a `-`, it would
# try to write to /etc/completions/fish.
# If we can't determine the version, assume a recent one. An error
# is better than trying to write to /etc unexpectedly.
rclone completion fish -
end 2>/dev/null | source
set -l rclone_version (rclone version | string match -rg 'rclone v(.*)' | string split .)
or return
# Yes, rclone's parsing here has changed, now they *require* a `-` argument
# where previously they required *not* having it.
if test "$rclone_version[1]" -gt 1; or test "$rclone_version[2]" -gt 62
rclone completion fish - 2>/dev/null | source
else
rclone completion fish 2>/dev/null | source
end

View File

@@ -18,7 +18,6 @@ end
function __resolvectl_commands
printf "%b\n" "query\tResolve domain names or IP addresses" \
"query\tResolve domain names, IPv4 and IPv6 addresses" \
"service\tResolve service records" \
"openpgp\tQuery PGP keys for email" \
"tlsa\tQuery TLS public keys" \
@@ -27,9 +26,6 @@ function __resolvectl_commands
"reset-statistics\tReset statistics counters" \
"flush-caches\tFlush DNS RR caches" \
"reset-server-features\tFlushe all feature level information" \
"monitor\tMonitor DNS queries" \
"show-cache\tShow cache contents" \
"show-server-state\tShow server state" \
"dns\tSet per-interface DNS servers" \
"domain\tSet per-interface search or routing domains" \
"default-route\tSet per-interface default route flag" \

View File

@@ -1,23 +1,21 @@
function __run0_slice
systemctl -t slice --no-legend --no-pager --plain | string split -nf 1 ' '
systemctl -t slice --user --no-legend --no-pager --plain | string split -nf 1 ' '
end
#
# Completion for run0
#
complete -c run0 -xa "(__fish_complete_subcommand)"
complete -c run0 -s h -l help -d "Show help"
complete -c run0 -s V -l version -d "Show version"
complete -c run0 -s u -l user -d "Switches to the specified user instead of root" -xa "(__fish_complete_users)"
complete -c run0 -s g -l group -d "Switches to the specified group instead of root" -xa "(__fish_complete_groups)"
complete -c run0 -l no-ask-password -d "Do not query the user for authentication for privileged operations"
complete -c run0 -l machine -d "Execute operation on a local container" -xa "(machinectl list --no-legend --no-pager | string split -f 1 ' ')"
complete -c run0 -l property -d "Sets a property on the service unit that is created" -x
complete -c run0 -l description -d "Description for unit" -x
complete -c run0 -l slice -d "Make the new .service unit part of the specified slice, instead of user.slice." -xa "(__run0_slice)"
complete -c run0 -l slice-inherit -d "Make the new .service unit part of the slice the run0 itself has been invoked in"
complete -c run0 -l nice -d "Runs the invoked session with the specified nice level" -xa "(seq -20 19)"
complete -c run0 -s D -l chdir -d "Set working directory" -xa "(__fish_complete_directories)"
complete -c run0 -l setenv -d "Runs the invoked session with the specified environment variable set" -x
complete -c run0 -l background -d "Change the terminal background color to the specified ANSI color" -x
complete -c run0 -l pty -d "Request allocation of a pseudo TTY for stdio"
complete -c run0 -l pipe -d "Request redirect pipe for stdio"
complete -c run0 -l shell-prompt-prefix -d "Set a shell prompt prefix string" -x
complete -c run0 -l no-ask-password -d 'Do not query the user for authentication for privileged operations'
complete -c run0 -l unit -d 'Use this unit name instead of an automatically generated one'
complete -c run0 -l property -d 'Sets a property on the service unit that is created'
complete -c run0 -l description -d 'Provide a description for the service unit that is invoked'
complete -c run0 -l slice -d 'Make the new .service unit part of the specified slice, instead of user.slice.'
complete -c run0 -l slice-inherit -d 'Make the new .service unit part of the slice the run0 itself has been invoked in'
complete -c run0 -s u -l user -a "(__fish_complete_users)" -x -d "Switches to the specified user instead of root"
complete -c run0 -s g -l group -a "(__fish_complete_groups)" -x -d "Switches to the specified group instead of root"
complete -c run0 -l nice -d 'Runs the invoked session with the specified nice level'
complete -c run0 -s D -l chdir -d 'Runs the invoked session with the specified working directory'
complete -c run0 -l setenv -d 'Runs the invoked session with the specified environment variable set'
complete -c run0 -l background -d 'Change the terminal background color to the specified ANSI color'
complete -c run0 -l machine -d 'Execute operation on a local container'
complete -c run0 -s h -l help -d 'Print a short help text and exit'
complete -c run0 -l version -d 'Print a short version string and exit'
complete -c run0 -x -a '(__fish_complete_subcommand)'

View File

@@ -1,31 +1,5 @@
# Note that when a completion file is sourced a new block scope is created so `set -l` works.
set -l __fish_status_all_commands \
basename \
buildinfo \
current-command \
current-commandline \
current-filename \
current-function \
current-line-number \
dirname \
features \
filename \
fish-path \
function \
is-block \
is-breakpoint \
is-command-substitution \
is-full-job-control \
is-interactive \
is-interactive-job-control \
is-interactive-read \
is-login \
is-no-job-control \
job-control \
line-number \
print-stack-trace \
stack-trace \
test-feature
set -l __fish_status_all_commands basename current-command current-commandline current-filename current-function current-line-number dirname features filename fish-path function is-block is-breakpoint is-command-substitution is-full-job-control is-interactive is-interactive-job-control is-login is-no-job-control job-control line-number print-stack-trace stack-trace test-feature
# These are the recognized flags.
complete -c status -s h -l help -d "Display help and exit"
@@ -33,7 +7,6 @@ complete -c status -s h -l help -d "Display help and exit"
# The "is-something" subcommands.
complete -f -c status -n "not __fish_seen_subcommand_from $__fish_status_all_commands" -a is-login -d "Test if this is a login shell"
complete -f -c status -n "not __fish_seen_subcommand_from $__fish_status_all_commands" -a is-interactive -d "Test if this is an interactive shell"
complete -f -c status -n "not __fish_seen_subcommand_from $__fish_status_all_commands" -a is-interactive-read -d "Test if inside an interactive read builtin"
complete -f -c status -n "not __fish_seen_subcommand_from $__fish_status_all_commands" -a is-command-substitution -d "Test if a command substitution is currently evaluated"
complete -f -c status -n "not __fish_seen_subcommand_from $__fish_status_all_commands" -a is-block -d "Test if a code block is currently evaluated"
complete -f -c status -n "not __fish_seen_subcommand_from $__fish_status_all_commands" -a is-breakpoint -d "Test if a breakpoint is currently in effect"

View File

@@ -3,7 +3,7 @@
#
function __fish_sudo_print_remaining_args
set -l tokens (commandline -xpc | string escape) (commandline -ct)
set -l tokens (commandline -xpc) (commandline -ct)
set -e tokens[1]
# These are all the options mentioned in the man page for Todd Miller's "sudo.ws" sudo (in that order).
# If any other implementation has different options, this should be harmless, since they shouldn't be used anyway.

View File

@@ -1,5 +1,6 @@
function __fish_complete_svn_diff --description 'Complete "svn diff" arguments'
set -l cmdl (commandline -cxp | string escape)
set -l cmdl (commandline -cxp)
#set -l cmdl svn diff --diff-cmd diff --extensions '-a -b'
set -l diff diff
set -l args
while set -q cmdl[1]

View File

@@ -1 +0,0 @@
tailscale completion fish | source

View File

@@ -1 +0,0 @@
tex-fmt --completion fish | source

Some files were not shown because too many files have changed in this diff Show More