Skip to content

Commit

Permalink
Merge pull request #333 from rsteube/tcsh-fix-display-values-not-shown
Browse files Browse the repository at this point in the history
tcsh: fix display values not shown
  • Loading branch information
rsteube authored Sep 10, 2021
2 parents 052fce1 + c06bc00 commit f3f290e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions internal/tcsh/action.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,10 @@ func ActionRawValues(currentWord string, nospace bool, values ...common.RawValue
vals[index] = quoter.Replace(sanitizer.Replace(val.Value))
} else {
if val.Description != "" {
vals[index] = fmt.Sprintf("%v_(%v)", val.Display, strings.Replace(sanitizer.Replace(val.TrimmedDescription()), " ", "_", -1))
// TODO seems actual value needs to be used or it won't be shown if the prefix doesn't match
vals[index] = fmt.Sprintf("%v_(%v)", quoter.Replace(sanitizer.Replace(val.Value)), strings.Replace(sanitizer.Replace(val.TrimmedDescription()), " ", "_", -1))
} else {
vals[index] = val.Display
vals[index] = quoter.Replace(sanitizer.Replace(val.Value))
}
}
}
Expand Down

0 comments on commit f3f290e

Please sign in to comment.