From 697c62fa5ff204251cfe468b40f5f549a8717cd8 Mon Sep 17 00:00:00 2001 From: uncenter <47499684+uncenter@users.noreply.github.com> Date: Wed, 1 May 2024 11:27:29 -0400 Subject: [PATCH] fix(fish): ghostty shell integration --- home/programs/fish/config.fish | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/home/programs/fish/config.fish b/home/programs/fish/config.fish index d8218f1..d9bd212 100644 --- a/home/programs/fish/config.fish +++ b/home/programs/fish/config.fish @@ -7,6 +7,13 @@ fish_add_path $GOPATH/bin fish_add_path $CARGO_HOME/bin fish_add_path $PNPM_HOME +# Ghostty supports auto-injection but nix-darwin hard overwrites XDG_DATA_DIRS +# which make it so that we can't use the auto-injection. We have to source +# manually. From https://github.com/mitchellh/nixos-config/blob/74ede9378860d4807780eac80c5d685e334d59e9/users/mitchellh/config.fish#L43-L51. +if set -q GHOSTTY_RESOURCES_DIR + source "$GHOSTTY_RESOURCES_DIR/shell-integration/fish/vendor_conf.d/ghostty-shell-integration.fish" +end + function newlinefix --on-event fish_prompt if test -z "$NEW_LINE_BEFORE_PROMPT" set -gx NEW_LINE_BEFORE_PROMPT 1