mirror of
https://github.com/junegunn/fzf.git
synced 2025-11-17 15:53:39 -05:00
Updated Examples (markdown)
11
Examples.md
11
Examples.md
@@ -577,8 +577,8 @@ _fzf_history_msys2() {
|
||||
local WORK_DIR="${TMPDIR:-/tmp}/${FUNCNAME[0]##_}-${UID:-$(id -u)}"
|
||||
mkdir -p "${WORK_DIR}" || return
|
||||
|
||||
# `builtin fc` does not work inside winpty, so run it here
|
||||
# to take output to a file.
|
||||
# `builtin fc` does not work inside winpty correctly,
|
||||
# so run it here to take output to a file.
|
||||
(set -o pipefail
|
||||
builtin fc -lnr -2147483648 |
|
||||
last_hist=$(HISTTIMEFORMAT='' builtin history 1) \
|
||||
@@ -588,11 +588,10 @@ _fzf_history_msys2() {
|
||||
|
||||
# stdin is passed to winpty as-is tty, and input/output
|
||||
# to/from fzf is via file.
|
||||
winpty -- bash -c "
|
||||
set -o pipefail
|
||||
winpty -- bash -c "set -o pipefail;
|
||||
cat '${WORK_DIR}'/input | \
|
||||
FZF_DEFAULT_OPTS='${FZF_OPTS}' fzf --query '${READLINE_LINE}' \
|
||||
>'${WORK_DIR}'/output
|
||||
FZF_DEFAULT_OPTS='${FZF_OPTS}' fzf --query '${READLINE_LINE}' \
|
||||
>'${WORK_DIR}'/output
|
||||
" || return
|
||||
|
||||
# Get fzf output from file.
|
||||
|
||||
Reference in New Issue
Block a user