summaryrefslogtreecommitdiffstats
path: root/src/terminal_unix.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/terminal_unix.go')
-rw-r--r--src/terminal_unix.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/terminal_unix.go b/src/terminal_unix.go
index 2ae8175a..b14cd684 100644
--- a/src/terminal_unix.go
+++ b/src/terminal_unix.go
@@ -5,6 +5,7 @@ package fzf
import (
"os"
"os/signal"
+ "strings"
"syscall"
)
@@ -19,3 +20,7 @@ func notifyStop(p *os.Process) {
func notifyOnCont(resizeChan chan<- os.Signal) {
signal.Notify(resizeChan, syscall.SIGCONT)
}
+
+func quoteEntry(entry string) string {
+ return "'" + strings.Replace(entry, "'", "'\\''", -1) + "'"
+}