From 2e39c27560d7b49d0e44b46738414d264d86a855 Mon Sep 17 00:00:00 2001 From: Filipp Samoilov Date: Mon, 9 Jun 2025 14:09:18 +0300 Subject: [PATCH] Fix error in non-home paths (#1129) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Before it would fail in paths outside the home directory with ``` × Pipeline empty. ╭─[/home/filipp/.config/nushell/panache-git.nu:32:76] 31 │ let current_dir_relative_to_home = ( 32 │ do --ignore-errors { $current_dir | path relative-to $nu.home-path } | str join · ────┬─── · ╰── no input value was piped in 33 │ ) ╰──── ``` --- modules/prompt/panache-git.nu | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/prompt/panache-git.nu b/modules/prompt/panache-git.nu index e346cc5..45ea64a 100644 --- a/modules/prompt/panache-git.nu +++ b/modules/prompt/panache-git.nu @@ -29,7 +29,7 @@ export def current-dir [] { let current_dir = ($env.PWD) let current_dir_relative_to_home = ( - do --ignore-errors { $current_dir | path relative-to $nu.home-path } | str join + do --ignore-errors { $current_dir | path relative-to $nu.home-path | str join } ) let in_sub_dir_of_home = ($current_dir_relative_to_home | is-not-empty)