From 2863d2c148e1e5d8b6a48a90696d9ae489f4ef57 Mon Sep 17 00:00:00 2001 From: ilk Date: Fri, 17 May 2024 18:02:03 +0300 Subject: [PATCH] refactor(shell-integration): refactor to make cases alphabetical also fix: build errors also fix: name mismatch (GHOSTTY_FISH_XDG_DIR -> GHOSTTY_INTEGRATION_DIR) also refactor elvish file to evade unobvious returns --- .../fish/vendor_conf.d/ghostty-shell-integration.fish | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) mode change 100755 => 100644 src/shell-integration/fish/vendor_conf.d/ghostty-shell-integration.fish 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 old mode 100755 new mode 100644 index fb3088865..2716be110 --- a/src/shell-integration/fish/vendor_conf.d/ghostty-shell-integration.fish +++ b/src/shell-integration/fish/vendor_conf.d/ghostty-shell-integration.fish @@ -6,7 +6,7 @@ function ghostty_restore_xdg_data_dir -d "restore the original XDG_DATA_DIR value" # If we don't have our own data dir then we don't need to do anything. - if not set -q GHOSTTY_FISH_XDG_DIR + if not set -q GHOSTTY_INTEGRATION_DIR return end @@ -19,7 +19,7 @@ function ghostty_restore_xdg_data_dir -d "restore the original XDG_DATA_DIR valu set --function --path xdg_data_dirs "$XDG_DATA_DIRS" # If our data dir is in the list then remove it. - if set --function index (contains --index "$GHOSTTY_FISH_XDG_DIR" $xdg_data_dirs) + if set --function index (contains --index "$GHOSTTY_INTEGRATION_DIR" $xdg_data_dirs) set --erase --function xdg_data_dirs[$index] end @@ -30,7 +30,7 @@ function ghostty_restore_xdg_data_dir -d "restore the original XDG_DATA_DIR valu set --erase --global XDG_DATA_DIRS end - set --erase GHOSTTY_FISH_XDG_DIR + set --erase GHOSTTY_INTEGRATION_DIR end function ghostty_exit -d "exit the shell integration setup"