fish/8784-old-school-cmd-subst.patch

25 lines
1019 B
Diff

From 0c5a13346cd2a09125b3c24e24855723bca8679d Mon Sep 17 00:00:00 2001
From: Fabian Homborg <FHomborg@gmail.com>
Date: Sun, 13 Mar 2022 20:00:02 +0100
Subject: [PATCH] Use old-school "()" command substitution in fish_title
Because we reload changed function files, a common issue on upgrading
to 3.4.0 is that fish_title causes errors.
So we simply use the oldschool syntax.
---
share/functions/fish_title.fish | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/share/functions/fish_title.fish
+++ b/share/functions/fish_title.fish
@@ -4,7 +4,7 @@ function fish_title
# If we're connected via ssh, we print the hostname.
set -l ssh
set -q SSH_TTY
- and set ssh "[$(prompt_hostname | string sub -l 10)]"
+ and set ssh "["(prompt_hostname | string sub -l 10 | string collect)"]"
# An override for the current command is passed as the first parameter.
# This is used by `fg` to show the true process name, among others.
if set -q argv[1]