Skip to content

Commit

Permalink
trim dashes from generated git session names
Browse files Browse the repository at this point in the history
  • Loading branch information
kkga committed Jan 16, 2022
1 parent 0456d5e commit 3453b20
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion kak/filepath.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ func (fp *Filepath) ParseGitDir() string {
if err != nil {
return ""
}
return strings.TrimSpace(strings.ReplaceAll(path.Base(string(gitOut)), ".", "-"))

sessName := strings.Trim(strings.TrimSpace(strings.ReplaceAll(path.Base(string(gitOut)), ".", "-")), "-")
return sessName
}

func (fp *Filepath) parse() (absName string, line, col int, err error) {
Expand Down

0 comments on commit 3453b20

Please sign in to comment.