diff options
Diffstat (limited to 'src/terminal_unix.go')
-rw-r--r-- | src/terminal_unix.go | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/src/terminal_unix.go b/src/terminal_unix.go index c7fa7f12..d0b00f2f 100644 --- a/src/terminal_unix.go +++ b/src/terminal_unix.go @@ -5,26 +5,11 @@ package fzf import ( "os" "os/signal" - "strings" "syscall" "golang.org/x/sys/unix" ) -var escaper *strings.Replacer - -func init() { - tokens := strings.Split(os.Getenv("SHELL"), "/") - if tokens[len(tokens)-1] == "fish" { - // https://fishshell.com/docs/current/language.html#quotes - // > The only meaningful escape sequences in single quotes are \', which - // > escapes a single quote and \\, which escapes the backslash symbol. - escaper = strings.NewReplacer("\\", "\\\\", "'", "\\'") - } else { - escaper = strings.NewReplacer("'", "'\\''") - } -} - func notifyOnResize(resizeChan chan<- os.Signal) { signal.Notify(resizeChan, syscall.SIGWINCH) } @@ -41,7 +26,3 @@ func notifyStop(p *os.Process) { func notifyOnCont(resizeChan chan<- os.Signal) { signal.Notify(resizeChan, syscall.SIGCONT) } - -func quoteEntry(entry string) string { - return "'" + escaper.Replace(entry) + "'" -} |