Skip to content
Myr

Use single-quoted strings in execute action

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Close #590

authored by Junegunn Choi · committed by Junegunn Choi · parent 1c86aaf · Browse files · 2 files+6 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+6 added−1 removed

  • other:+6 added−1 removed

2 files+6 added−1 removed

modified:src/terminal.go+1 added-1 removed
741 unmodified lines
742 event.Type == C.Mouse && key == C.DoubleClick && event.MouseEvent.Double743}744745func quoteEntry(entry string) string {746 return fmt.Sprintf("%q", entry)746 return "'" + strings.Replace(entry, "'", "'\\''", -1) + "'"747}748749func executeCommand(template string, replacement string) {750 command := strings.Replace(template, "{}", replacement, -1)
475 unmodified lines
modified:CHANGELOG.md+5 added
1CHANGELOG2=========340.12.35------6- `{}` in execute action is replaced to the single-quoted string of the7 current line890.12.210------1112- 256-color capability detection does not require `256` in `$TERM`
398 unmodified lines