fix(fish)

docs are tougher to patch; and patch tries harder than git.
This commit is contained in:
Jacob Heider 2023-04-15 04:12:12 -04:00
parent 0177eafc70
commit 00a1858495
No known key found for this signature in database
GPG key ID: 59D15ADC7DCD39BB
2 changed files with 2 additions and 15 deletions

View file

@ -1,16 +1,3 @@
diff --git a/doc_src/language.rst b/doc_src/language.rst
index 16558cc8899..f3767415f8e 100644
--- a/doc_src/language.rst
+++ b/doc_src/language.rst
@@ -1718,7 +1718,7 @@ In order:
- If the kernel knows how to run the file (e.g. via a ``#!`` line - ``#!/bin/sh`` or ``#!/usr/bin/python``), it does it.
- If the kernel reports that it couldn't run it because of a missing interpreter, and the file passes a rudimentary check, fish tells ``/bin/sh`` to run it.
-If none of these work, fish runs the function :doc:`fish_command_not_found <cmds/fish_command_not_found>` and sets :envvar:`status` to 127.
+If none of these work, fish runs the function :doc:`fish_command_not_found <cmds/fish_command_not_found>`.
You can use :doc:`type <cmds/type>` to see how fish resolved something::
diff --git a/share/functions/fish_command_not_found.fish b/share/functions/fish_command_not_found.fish diff --git a/share/functions/fish_command_not_found.fish b/share/functions/fish_command_not_found.fish
index 36ca2190553..77b3a78f7b9 100644 index 36ca2190553..77b3a78f7b9 100644
--- a/share/functions/fish_command_not_found.fish --- a/share/functions/fish_command_not_found.fish

View file

@ -15,13 +15,13 @@ build:
tea.xyz/gx/make: '*' tea.xyz/gx/make: '*'
cmake.org: '>=3.5' cmake.org: '>=3.5'
freedesktop.org/pkg-config: '*' freedesktop.org/pkg-config: '*'
git-scm.org: '*' gnu.org/patch: '*'
script: | script: |
# By default, fish's fish_command_not_found handler will redirect to stderr, # By default, fish's fish_command_not_found handler will redirect to stderr,
# return an exit code of 127. Always. This patch fixes it. Hopefully, it will # return an exit code of 127. Always. This patch fixes it. Hopefully, it will
# be merged upstream soon. https://github.com/fish-shell/fish-shell/pull/9517 # be merged upstream soon. https://github.com/fish-shell/fish-shell/pull/9517
git apply props/command_not_found_handler.diff patch -p1 <props/command_not_found_handler.diff
echo {{version}} >version echo {{version}} >version