From a0aa01064d4f0d6f399c750deae21e5bb3f11dd6 Mon Sep 17 00:00:00 2001 From: Jan De Dobbeleer Date: Thu, 26 Dec 2024 11:12:33 +0100 Subject: [PATCH] fix(git): use raw string in nushell --- src/shell/git.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/shell/git.go b/src/shell/git.go index a5cc2dc..11a3383 100644 --- a/src/shell/git.go +++ b/src/shell/git.go @@ -4,6 +4,8 @@ import ( "fmt" "os/exec" "strings" + + "github.com/jandedobbeleer/aliae/src/context" ) var ( @@ -33,6 +35,10 @@ func (a *Alias) git() string { // safe to add the alias format := `git config --global alias.%s '%s'` + if context.Current.Shell == NU { + format = `git config --global alias.%s r#'%s'#` + } + return fmt.Sprintf(format, a.Name, a.Value) }