Skip to content
Myr

Match the current temp file name in the powershell {f} test

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

The template writes to os.CreateTemp("", "fzf-temp-*"); the fzf-preview- prefix went away with the --tmux work. The digit count was also pinned at nine, but CreateTemp's suffix has no fixed width.

authored by Cyrus · committed by Junegunn Choi · parent 85a2a33 · Browse files · 1 file+1 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

1 file+1 added−1 removed

  • other:+1 added−1 removed

1 file+1 added−1 removed

modified:src/terminal_test.go+1 added-1 removed
438 unmodified lines
439 // the "file" flag in the pattern won't create *.ps1 file so the powershell will offload this "unknown" filetype440 // to explorer, which will prompt user to pick editing program for the fzf-preview file441 // the temp file contains: `cat "C:\test.txt"`442 // TODO this should actually work443 {give{`powershell -NoProfile -Command {f}`, ``, newItems(`cat "C:\test.txt"`)}, want{match: `^powershell -NoProfile -Command .*\fzf-preview-[0-9]{9}$`}},443 {give{`powershell -NoProfile -Command {f}`, ``, newItems(`cat "C:\test.txt"`)}, want{match: `^powershell -NoProfile -Command .*\fzf-temp-[0-9]+$`}},444 }445446 // to force powershell-style escaping we temporarily set environment variable that fzf honors447 shellBackup := os.Getenv("SHELL")
476 unmodified lines