Skip to content

Commit

Permalink
Add comment.
Browse files Browse the repository at this point in the history
Signed-off-by: corvofeng <corvofeng@gmail.com>
  • Loading branch information
corvofeng committed Dec 26, 2023
1 parent 601847c commit 9baca16
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/tmux.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ func TmuxHasSession(sessionName string) bool {
return false
}

// https://github.com/ruby/shellwords
// https://apidock.com/ruby/v2_5_5/Shellwords/shellescape
func shellescape(str string) string {
str = regexp.MustCompile(`[^A-Za-z0-9_\-.,:+/@\n]`).ReplaceAllStringFunc(str, func(s string) string {
return "\\" + s
Expand Down

0 comments on commit 9baca16

Please sign in to comment.