From c936276781107904e9af810e52f3661e91adc629 Mon Sep 17 00:00:00 2001 From: Anthony Date: Fri, 15 Nov 2024 01:29:50 +1100 Subject: [PATCH 1/4] Update shebangs in installed shellscripts to meet `rpmlint` and match provided paths at [pkgs.org](https://fedora.pkgs.org/41/fedora-x86_64/elvish-0.21.0-4.fc41.x86_64.rpm.html) --- src/shell-integration/bash/bash-preexec.sh | 1 + src/shell-integration/bash/ghostty.bash | 2 +- src/shell-integration/elvish/lib/ghostty-integration.elv | 1 + src/shell-integration/zsh/ghostty-integration | 2 +- 4 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/shell-integration/bash/bash-preexec.sh b/src/shell-integration/bash/bash-preexec.sh index 14a677888..4a8483052 100644 --- a/src/shell-integration/bash/bash-preexec.sh +++ b/src/shell-integration/bash/bash-preexec.sh @@ -1,3 +1,4 @@ +#!/usr/bin/bash # bash-preexec.sh -- Bash support for ZSH-like 'preexec' and 'precmd' functions. # https://github.com/rcaloras/bash-preexec # diff --git a/src/shell-integration/bash/ghostty.bash b/src/shell-integration/bash/ghostty.bash index 6a5da35cc..34fd4e923 100644 --- a/src/shell-integration/bash/ghostty.bash +++ b/src/shell-integration/bash/ghostty.bash @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/usr/bin/bash # # This is originally based on the recommended bash integration from # the semantic prompts proposal as well as some logic from Kitty's diff --git a/src/shell-integration/elvish/lib/ghostty-integration.elv b/src/shell-integration/elvish/lib/ghostty-integration.elv index 3d2f4a632..e0ba09f38 100644 --- a/src/shell-integration/elvish/lib/ghostty-integration.elv +++ b/src/shell-integration/elvish/lib/ghostty-integration.elv @@ -1,3 +1,4 @@ +#!/usr/bin/elvish { fn restore-xdg-dirs { use str diff --git a/src/shell-integration/zsh/ghostty-integration b/src/shell-integration/zsh/ghostty-integration index 662d5febb..6af443986 100755 --- a/src/shell-integration/zsh/ghostty-integration +++ b/src/shell-integration/zsh/ghostty-integration @@ -1,4 +1,4 @@ -#!/usr/bin/env zsh +#!/usr/bin/zsh # # Based on (started as) a copy of Kitty's zsh integration. Kitty is # distributed under GPLv3, so this file is also distributed under GPLv3. From 387ce53a97b1fabd95d13ff6074a42a920ffca6f Mon Sep 17 00:00:00 2001 From: Anthony Date: Fri, 15 Nov 2024 02:13:54 +1100 Subject: [PATCH 2/4] Revert "Update shebangs in installed shellscripts to meet `rpmlint` and match provided paths at [pkgs.org](https://fedora.pkgs.org/41/fedora-x86_64/elvish-0.21.0-4.fc41.x86_64.rpm.html)" This reverts commit c936276781107904e9af810e52f3661e91adc629. --- src/shell-integration/bash/bash-preexec.sh | 1 - src/shell-integration/bash/ghostty.bash | 2 +- src/shell-integration/elvish/lib/ghostty-integration.elv | 1 - src/shell-integration/zsh/ghostty-integration | 2 +- 4 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/shell-integration/bash/bash-preexec.sh b/src/shell-integration/bash/bash-preexec.sh index 4a8483052..14a677888 100644 --- a/src/shell-integration/bash/bash-preexec.sh +++ b/src/shell-integration/bash/bash-preexec.sh @@ -1,4 +1,3 @@ -#!/usr/bin/bash # bash-preexec.sh -- Bash support for ZSH-like 'preexec' and 'precmd' functions. # https://github.com/rcaloras/bash-preexec # diff --git a/src/shell-integration/bash/ghostty.bash b/src/shell-integration/bash/ghostty.bash index 34fd4e923..6a5da35cc 100644 --- a/src/shell-integration/bash/ghostty.bash +++ b/src/shell-integration/bash/ghostty.bash @@ -1,4 +1,4 @@ -#!/usr/bin/bash +#!/usr/bin/env bash # # This is originally based on the recommended bash integration from # the semantic prompts proposal as well as some logic from Kitty's diff --git a/src/shell-integration/elvish/lib/ghostty-integration.elv b/src/shell-integration/elvish/lib/ghostty-integration.elv index e0ba09f38..3d2f4a632 100644 --- a/src/shell-integration/elvish/lib/ghostty-integration.elv +++ b/src/shell-integration/elvish/lib/ghostty-integration.elv @@ -1,4 +1,3 @@ -#!/usr/bin/elvish { fn restore-xdg-dirs { use str diff --git a/src/shell-integration/zsh/ghostty-integration b/src/shell-integration/zsh/ghostty-integration index 6af443986..662d5febb 100755 --- a/src/shell-integration/zsh/ghostty-integration +++ b/src/shell-integration/zsh/ghostty-integration @@ -1,4 +1,4 @@ -#!/usr/bin/zsh +#!/usr/bin/env zsh # # Based on (started as) a copy of Kitty's zsh integration. Kitty is # distributed under GPLv3, so this file is also distributed under GPLv3. From 7faa73e5fdabb011c37b2a1250a6afc964c7bd6e Mon Sep 17 00:00:00 2001 From: Anthony Date: Fri, 15 Nov 2024 02:15:09 +1100 Subject: [PATCH 3/4] Remove shebangs from non-executable configuration source scripts --- src/shell-integration/bash/ghostty.bash | 2 -- .../fish/vendor_conf.d/ghostty-shell-integration.fish | 2 -- 2 files changed, 4 deletions(-) diff --git a/src/shell-integration/bash/ghostty.bash b/src/shell-integration/bash/ghostty.bash index 6a5da35cc..b00ec7609 100644 --- a/src/shell-integration/bash/ghostty.bash +++ b/src/shell-integration/bash/ghostty.bash @@ -1,5 +1,3 @@ -#!/usr/bin/env bash -# # This is originally based on the recommended bash integration from # the semantic prompts proposal as well as some logic from Kitty's # bash integration. diff --git a/src/shell-integration/fish/vendor_conf.d/ghostty-shell-integration.fish b/src/shell-integration/fish/vendor_conf.d/ghostty-shell-integration.fish index 6ccec3933..420a49528 100644 --- a/src/shell-integration/fish/vendor_conf.d/ghostty-shell-integration.fish +++ b/src/shell-integration/fish/vendor_conf.d/ghostty-shell-integration.fish @@ -1,5 +1,3 @@ -#!/bin/fish -# # This shell script aims to be written in a way where it can't really fail # or all failure scenarios are handled, so that we never leave the shell in # a weird state. If you find a way to break this, please report a bug! From 058bcb88ff478aabd9cef580fa07a002bfc069bf Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Thu, 14 Nov 2024 09:25:21 -0800 Subject: [PATCH 4/4] Make all shell integration scripts non-executable --- src/shell-integration/zsh/ghostty-integration | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 src/shell-integration/zsh/ghostty-integration diff --git a/src/shell-integration/zsh/ghostty-integration b/src/shell-integration/zsh/ghostty-integration old mode 100755 new mode 100644