This removes most of the difference between the Fedora packge and upstream Fish.epel9
parent
30fc8a998c
commit
1c53e0f853
@ -1,3 +1,4 @@
|
|||||||
/fish-2.1.0.tar.gz
|
/fish-2.1.0.tar.gz
|
||||||
/fish-2.1.1.tar.gz
|
/fish-2.1.1.tar.gz
|
||||||
/fish-2.2.0.tar.gz
|
/fish-2.2.0.tar.gz
|
||||||
|
/fish-2.3.0.tar.gz
|
||||||
|
@ -1,98 +0,0 @@
|
|||||||
[Backport by amluto: use basename instead of string replace]
|
|
||||||
|
|
||||||
From c1b384e5d3f2f46e7d7a1b41e31c7aadc1d9ce28 Mon Sep 17 00:00:00 2001
|
|
||||||
Message-Id: <c1b384e5d3f2f46e7d7a1b41e31c7aadc1d9ce28.1456513347.git.luto@kernel.org>
|
|
||||||
From: Fabian Homborg <FHomborg@gmail.com>
|
|
||||||
Date: Tue, 20 Oct 2015 23:21:57 +0200
|
|
||||||
Subject: [PATCH] Add functions and configuration snippets hierarchy
|
|
||||||
|
|
||||||
This allows "vendors" (i.e. third-party upstreams interested in
|
|
||||||
supporting fish) to add auto-loaded functions and eager-loaded
|
|
||||||
configuration "snippets", while still allowing both the user and the administrator to
|
|
||||||
fully override all of that.
|
|
||||||
|
|
||||||
This has been inspired by systemd's configuration hierarchy, and implements a similar scheme
|
|
||||||
whereby files with the same name in higher-ranking directories override files in lower-ranking ones.
|
|
||||||
|
|
||||||
Fixes #1956
|
|
||||||
---
|
|
||||||
Makefile.in | 3 +++
|
|
||||||
doc_src/index.hdr.in | 1 +
|
|
||||||
fish.pc.in | 2 ++
|
|
||||||
share/config.fish | 14 +++++++++++++-
|
|
||||||
4 files changed, 19 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/Makefile.in b/Makefile.in
|
|
||||||
index 88155b2d58fd..056a3d814457 100644
|
|
||||||
--- a/Makefile.in
|
|
||||||
+++ b/Makefile.in
|
|
||||||
@@ -660,9 +660,12 @@ install-force: all install-translations
|
|
||||||
true ;\
|
|
||||||
done;
|
|
||||||
$(INSTALL) -m 755 -d $(DESTDIR)$(sysconfdir)/fish
|
|
||||||
+ $(INSTALL) -m 755 -d $(DESTDIR)$(sysconfdir)/fish/conf.d
|
|
||||||
$(INSTALL) -m 755 -d $(DESTDIR)$(datadir)/fish
|
|
||||||
$(INSTALL) -m 755 -d $(DESTDIR)$(datadir)/fish/completions
|
|
||||||
$(INSTALL) -m 755 -d $(DESTDIR)$(datadir)/fish/vendor_completions.d
|
|
||||||
+ $(INSTALL) -m 755 -d $(DESTDIR)$(datadir)/fish/vendor_functions.d
|
|
||||||
+ $(INSTALL) -m 755 -d $(DESTDIR)$(datadir)/fish/vendor_conf.d
|
|
||||||
$(INSTALL) -m 755 -d $(DESTDIR)$(datadir)/fish/functions
|
|
||||||
$(INSTALL) -m 755 -d $(DESTDIR)$(datadir)/fish/man/man1
|
|
||||||
$(INSTALL) -m 755 -d $(DESTDIR)$(datadir)/fish/tools
|
|
||||||
diff --git a/doc_src/index.hdr.in b/doc_src/index.hdr.in
|
|
||||||
index 9531876b5aca..a0f7ec0a2001 100644
|
|
||||||
--- a/doc_src/index.hdr.in
|
|
||||||
+++ b/doc_src/index.hdr.in
|
|
||||||
@@ -1088,6 +1088,7 @@ function on_exit --on-process %self
|
|
||||||
end
|
|
||||||
\endfish
|
|
||||||
|
|
||||||
+Right after reading /usr/share/fish/config.fish and before reading /etc/fish/config.fish, fish will also read files in ~/.config/fish/conf.d/, /etc/fish/conf.d and /usr/share/fish/vendor_conf.d (the exact values depend on $XDG_CONFIG_HOME, $__fish_sysconfdir and $__fish_datadir). If there are files with the same name in two or all of these, fish will only attempt to read the first (skipping all files with that name if it is unreadable). ~/.config takes precedence over /etc/ which takes precedence over /usr. The path to the latter can also be gotten via `pkg-config` as "confdir", and is meant for third-party applications to integrate with fish.
|
|
||||||
|
|
||||||
\section other Other features
|
|
||||||
|
|
||||||
diff --git a/fish.pc.in b/fish.pc.in
|
|
||||||
index cae82246b808..c8fabd7e8fbf 100644
|
|
||||||
--- a/fish.pc.in
|
|
||||||
+++ b/fish.pc.in
|
|
||||||
@@ -1,6 +1,8 @@
|
|
||||||
prefix=@prefix@
|
|
||||||
datadir=@datadir@
|
|
||||||
completionsdir=${datadir}/fish/vendor_completions.d
|
|
||||||
+functionsdir=${datadir}/fish/vendor_functions.d
|
|
||||||
+confdir=${datadir}/fish/vendor_conf.d
|
|
||||||
|
|
||||||
Name: fish
|
|
||||||
Description: fish, the friendly interactive shell
|
|
||||||
diff --git a/share/config.fish b/share/config.fish
|
|
||||||
index b1d404eecdac..40000740971b 100644
|
|
||||||
--- a/share/config.fish
|
|
||||||
+++ b/share/config.fish
|
|
||||||
@@ -49,7 +49,7 @@ end
|
|
||||||
# default functions/completions are included in the respective path.
|
|
||||||
|
|
||||||
if not set -q fish_function_path
|
|
||||||
- set fish_function_path $configdir/fish/functions $__fish_sysconfdir/functions $__fish_datadir/functions
|
|
||||||
+ set fish_function_path $configdir/fish/functions $__fish_sysconfdir/functions $__fish_datadir/vendor_functions.d $__fish_datadir/functions
|
|
||||||
end
|
|
||||||
|
|
||||||
if not contains $__fish_datadir/functions $fish_function_path
|
|
||||||
@@ -151,3 +151,15 @@ function . --description 'Evaluate contents of file (deprecated, see "source")'
|
|
||||||
source $argv
|
|
||||||
end
|
|
||||||
end
|
|
||||||
+
|
|
||||||
+# As last part of initialization, source the conf directories
|
|
||||||
+# Implement precedence (User > Admin > Vendors > Fish) by basically doing "basename"
|
|
||||||
+set -l sourcelist
|
|
||||||
+for file in $configdir/fish/conf.d/* $__fish_sysconfdir/conf.d/* $__fish_datadir/vendor_conf.d/*
|
|
||||||
+ set -l basename (basename -- $file)
|
|
||||||
+ contains -- $basename $sourcelist; and continue
|
|
||||||
+ set sourcelist $sourcelist $basename
|
|
||||||
+ # Also skip non-files or unreadable files
|
|
||||||
+ # This allows one to use e.g. symlinks to /dev/null to "mask" something (like in systemd)
|
|
||||||
+ [ -f $file -a -r $file ]; and source $file
|
|
||||||
+end
|
|
||||||
--
|
|
||||||
2.5.0
|
|
||||||
|
|
@ -1,23 +0,0 @@
|
|||||||
commit 7ff972511a6dd62f9a2623d86595575fb400b879
|
|
||||||
Author: Andy Lutomirski <luto@kernel.org>
|
|
||||||
Date: Thu Feb 4 11:52:42 2016 -0800
|
|
||||||
|
|
||||||
fish_tests: Explicitly cast -2 to wchar_t
|
|
||||||
|
|
||||||
On arm, wchar_t is unsigned, and C++11 and newer disallow implicit
|
|
||||||
narrowing conversions inside braces. Use an explicit conversion to
|
|
||||||
fix the build on GCC 6 and up, which defaults to C++11.
|
|
||||||
|
|
||||||
diff --git a/src/fish_tests.cpp b/src/fish_tests.cpp
|
|
||||||
index 90d9dadc30e6..521825516ce3 100644
|
|
||||||
--- a/src/fish_tests.cpp
|
|
||||||
+++ b/src/fish_tests.cpp
|
|
||||||
@@ -1154,7 +1154,7 @@ static void test_utf8()
|
|
||||||
wchar_t w4[] = {0x15555, 0xf7777, 0xa};
|
|
||||||
wchar_t w5[] = {0x255555, 0x1fa04ff, 0xddfd04, 0xa};
|
|
||||||
wchar_t w6[] = {0xf255555, 0x1dfa04ff, 0x7fddfd04, 0xa};
|
|
||||||
- wchar_t wb[] = {-2, 0xa, (wchar_t)0xffffffff, 0x0441};
|
|
||||||
+ wchar_t wb[] = {(wchar_t)-2, 0xa, (wchar_t)0xffffffff, 0x0441};
|
|
||||||
wchar_t wm[] = {0x41, 0x0441, 0x3042, 0xff67, 0x9b0d, 0x2e05da67};
|
|
||||||
wchar_t wb1[] = {0xa, 0x0422};
|
|
||||||
wchar_t wb2[] = {0xd800, 0xda00, 0x41, 0xdfff, 0xa};
|
|
@ -1,43 +0,0 @@
|
|||||||
commit 890f35cbcb28440c7e6c74055a77e3474c39fc3e
|
|
||||||
Author: Andy Lutomirski <luto@kernel.org>
|
|
||||||
Date: Tue Sep 15 18:24:11 2015 -0700
|
|
||||||
|
|
||||||
Don't complain if do_builtin_io fails due to EPIPE
|
|
||||||
|
|
||||||
If stdio is dead due to EPIPE, there's no great reason to spew a stack dump.
|
|
||||||
|
|
||||||
This will still write an error to stderr if stdout dies. This might be
|
|
||||||
undesirable, but changing that should be considered separately.
|
|
||||||
|
|
||||||
diff --git a/src/exec.cpp b/src/exec.cpp
|
|
||||||
index 39385b06a432..d7ff483bda3b 100644
|
|
||||||
--- a/src/exec.cpp
|
|
||||||
+++ b/src/exec.cpp
|
|
||||||
@@ -1161,7 +1161,7 @@ void exec_job(parser_t &parser, job_t *j)
|
|
||||||
const std::string outbuff = wcs2string(out);
|
|
||||||
const std::string errbuff = wcs2string(err);
|
|
||||||
bool builtin_io_done = do_builtin_io(outbuff.data(), outbuff.size(), errbuff.data(), errbuff.size());
|
|
||||||
- if (! builtin_io_done)
|
|
||||||
+ if (! builtin_io_done && errno != EPIPE)
|
|
||||||
{
|
|
||||||
show_stackframe();
|
|
||||||
}
|
|
||||||
diff --git a/src/postfork.cpp b/src/postfork.cpp
|
|
||||||
index 1eb958ad9f0d..29cf850ca3d6 100644
|
|
||||||
--- a/src/postfork.cpp
|
|
||||||
+++ b/src/postfork.cpp
|
|
||||||
@@ -569,12 +569,13 @@ bool do_builtin_io(const char *out, size_t outlen, const char *err, size_t errle
|
|
||||||
bool success = true;
|
|
||||||
if (out && outlen)
|
|
||||||
{
|
|
||||||
-
|
|
||||||
if (write_loop(STDOUT_FILENO, out, outlen) < 0)
|
|
||||||
{
|
|
||||||
+ int e = errno;
|
|
||||||
debug_safe(0, "Error while writing to stdout");
|
|
||||||
safe_perror("write_loop");
|
|
||||||
success = false;
|
|
||||||
+ errno = e;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,33 +0,0 @@
|
|||||||
commit 2d1a32ab4b0ce488726dd8929c85840dc73ed7dd
|
|
||||||
Author: Andy Lutomirski <luto@kernel.org>
|
|
||||||
Date: Tue Sep 15 18:27:52 2015 -0700
|
|
||||||
|
|
||||||
Switch show_stackframe to backtrace_symbols_fd
|
|
||||||
|
|
||||||
It's simpler and avoids calling into fprintf in contexts in which
|
|
||||||
it might crash or deadlock.
|
|
||||||
|
|
||||||
diff --git a/src/common.cpp b/src/common.cpp
|
|
||||||
index 78d0e23865c5..f5eb2ca5b921 100644
|
|
||||||
--- a/src/common.cpp
|
|
||||||
+++ b/src/common.cpp
|
|
||||||
@@ -90,17 +90,8 @@ void show_stackframe()
|
|
||||||
int trace_size = 0;
|
|
||||||
|
|
||||||
trace_size = backtrace(trace, 32);
|
|
||||||
- char **messages = backtrace_symbols(trace, trace_size);
|
|
||||||
-
|
|
||||||
- if (messages)
|
|
||||||
- {
|
|
||||||
- debug(0, L"Backtrace:");
|
|
||||||
- for (int i=0; i<trace_size; i++)
|
|
||||||
- {
|
|
||||||
- fwprintf(stderr, L"%s\n", messages[i]);
|
|
||||||
- }
|
|
||||||
- free(messages);
|
|
||||||
- }
|
|
||||||
+ debug(0, L"Backtrace:");
|
|
||||||
+ backtrace_symbols_fd(trace, trace_size, STDERR_FILENO);
|
|
||||||
}
|
|
||||||
|
|
||||||
int fgetws2(wcstring *s, FILE *f)
|
|
Loading…
Reference in new issue