From f218816b49aca91c7923b39a7bb402e8d887190d Mon Sep 17 00:00:00 2001 From: rsteube Date: Tue, 1 Aug 2023 01:12:40 +0200 Subject: [PATCH] nushell: fix nospace --- internal/shell/nushell/action.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/shell/nushell/action.go b/internal/shell/nushell/action.go index a8ab870dc..06a59db19 100644 --- a/internal/shell/nushell/action.go +++ b/internal/shell/nushell/action.go @@ -36,6 +36,7 @@ func sanitize(values []common.RawValue) []common.RawValue { func ActionRawValues(currentWord string, meta common.Meta, values common.RawValues) string { vals := make([]record, len(values)) for index, val := range sanitize(values) { + nospace := meta.Nospace.Matches(val.Value) if strings.ContainsAny(val.Value, ` {}()[]<>$&"'|;#\`+"`") { switch { case strings.HasPrefix(val.Value, "~"): @@ -45,7 +46,7 @@ func ActionRawValues(currentWord string, meta common.Meta, values common.RawValu } } - if !meta.Nospace.Matches(val.Value) { + if !nospace { val.Value = val.Value + " " }