summaryrefslogtreecommitdiff
path: root/src/reader.go
AgeCommit message (Collapse)Author
2025-08-14chore: remove redundant word in comment (#4490)longhutianjie
Signed-off-by: longhutianjie <keplrnewton@icloud.com>
2025-04-11reader: Do not append '/' to '/'Junegunn Choi
https://github.com/junegunn/fzf/pull/4334#issue-2966013714
2025-02-25Use '/' as path separator on MSYS2Junegunn Choi
Fix #4281
2025-02-18walker: Append path separator to directoriesJunegunn Choi
Close #4255
2024-11-26Extend --walker-skip to support multi-component patternsJunegunn Choi
fzf --walker-skip 'foo/bar' Close #4107
2024-11-25Allow walking multiple root directories (#4109)msabathier
Co-authored-by: Martin Sabathier <martin.sabathier.ext@corys.fr> Co-authored-by: Junegunn Choi <junegunn.c@gmail.com>
2024-11-03Fix reader regression (#4070)Junegunn Choi
2024-11-03Remove possible races (#4070)Junegunn Choi
2024-10-31Fix race in reload actionJunegunn Choi
Fix #4070
2024-10-25walker: Do not treat '..' as a hidden entryJunegunn Choi
Thanks to @LangLangBart for the suggested fix Fix #4048
2024-07-28Remove stale commentJunegunn Choi
2024-07-27Fix incompatibility of adaptive height and 'start:reload'Junegunn Choi
This command would cause a deadlock and make fzf crash: fzf --bind 'start:reload:ls' --height ~100% Because, 1. 'start' event is handled by Terminal 2. When 'reload' is bound to 'start', fzf avoids starting the initial reader 3. Terminal waits for the initial input to find the right height when adaptive height is used 4. Because the initial reader is not started, Terminal never gets the initial list 5. No chance to trigger 'start:reload', hence deadlock This commit fixes the above problem by extracting the reload command bound to 'start' event and starting the initial reader with that command instead of letting Terminal start it. This commit also makes the environment variables available to $FZF_DEFAULT_COMMAND. FZF_DEFAULT_COMMAND='echo $FZF_QUERY' fzf --query foo Fix #3944
2024-07-19Update fastwalk to v1.0.8 for better MSYS detection and sorting (#3930)Charlie Vieth
This commit updates github.com/charlievieth/fastwalk to v1.0.8 which improves MSYS detection and adds optional sorting of directory entries. It also updates fzf to use the SortFilesFirst sort mode which improves the output by making it a bit more sorted and grouped by directory previously entries were visited in directory order (which is basically random). PRs Included: * https://github.com/charlievieth/fastwalk/pull/25 * https://github.com/charlievieth/fastwalk/pull/27 * https://github.com/charlievieth/fastwalk/pull/28
2024-07-08Update charlievieth/fastwalk to use forward-slashes on WSL and MSYS (#3907)Charlie Vieth
This commit changes FZF to enforce that all paths are joined with forward-slashes when running on WSL or MSYS even when the FZF binary was compiled for Windows. Update: github.com/charlievieth/fastwalk Fixes: https://github.com/junegunn/fzf/issues/3859 --------- Co-authored-by: Junegunn Choi <junegunn.c@gmail.com>
2024-07-05Remove --walker-path-sepJunegunn Choi
Related: #3859 #3907 #3909
2024-06-29Add --walker-path-sep=CHAR to use a different path separatorJunegunn Choi
This is needed when you run a Windows binary on WSL or zsh on Windows where forward slashes are expected. export FZF_DEFAULT_OPTS='--walker-path-sep /' Close #3859
2024-06-13--walker-skip should also handle symlinks to directoriesJunegunn Choi
Fix #3858
2024-06-01Immediately close standard output of the child processJunegunn Choi
Fix #3828
2024-05-23execute: Open separate handles to /dev/tty (in, out, err)Junegunn Choi
# This will no longer cause 'Vim: Warning: Output is not to a terminal' fzf --bind 'enter:execute:vim {}' > /tmp/foo
2024-05-07Refactor the code to remove global variablesJunegunn Choi
2024-05-07Refactor the code so that fzf can be used as a library (#3769)Junegunn Choi
2024-04-27Add --with-shell for shelling out with different command and flags (#3746)Junegunn Choi
Close #3732
2024-04-25Fix 'reload' not terminating closed standard input streamJunegunn Choi
Fix #3750
2024-04-14Improve search performance by limiting the search scopeJunegunn Choi
Find the last occurrence of the last character in the pattern and perform the search algorithm only up to that point. The effectiveness of this mechanism depends a lot on the shape of the input and the pattern.
2024-04-04Do not trim CR on Windows when --read0 is setJunegunn Choi
2024-04-02Improve ingestion performance (by around 40%)Junegunn Choi
Summary fzf --sync --bind load:accept < 27M-lines ran 1.16 ± 0.01 times faster than fzf-41b3511 --sync --bind load:accept < 27M-lines 1.44 ± 0.01 times faster than fzf-0.48.1 --sync --bind load:accept < 27M-lines
2024-04-01Improve ingestion performance (by around 20%)Junegunn Choi
2024-03-13Add walker options and replace 'find' with the built-in walker (#3649)Junegunn Choi
2024-02-19Export FZF_* variables to 'reload' process as wellJunegunn Choi
2024-02-15Code cleanup: Remove unused argumentJunegunn Choi
2024-02-15Replace "default find command" with built-in directory traversalJunegunn Choi
2023-07-12Use $SHELL instead of bash if it's known to support 'pipefail'Junegunn Choi
when running the default find command Close #3339 Close #3364
2020-03-14[windows] Do not include directories in the listJunegunn Choi
Fix #1926
2020-02-04[windows] Use native walker since output of DOS command is not UTF-8 encoded ↵mattn
(#1847) Makes scanning 300x faster on Windows
2019-11-11Remove unnecessary reader barrier on --filter modeJunegunn Choi
2019-11-10Experimental implementation of "reload" actionJunegunn Choi
# Reload input list with different sources seq 10 | fzf --bind 'ctrl-a:reload(seq 100),ctrl-b:reload(seq 1000)' # Reload as you type seq 10 | fzf --bind 'change:reload:seq {q}' --phony # Integration with ripgrep RG_PREFIX="rg --column --line-number --no-heading --color=always --smart-case " INITIAL_QUERY="" FZF_DEFAULT_COMMAND="$RG_PREFIX '$INITIAL_QUERY'" \ fzf --bind "change:reload:$RG_PREFIX {q} || true" \ --ansi --phony --query "$INITIAL_QUERY" Close #751 Close #965 Close #974 Close #1736 Related #1723
2018-09-28Kill running preview process after 500ms when focus has changedJunegunn Choi
Close #1383 Close #1384
2017-09-28Update FZF_DEFAULT_COMMANDJunegunn Choi
- Use bash for `set -o pipefail` - Fall back to simpler find command when the original command failed Related: #1061
2017-08-26Minor refactoringsJunegunn Choi
2017-08-16Make Reader event notification asynchronousJunegunn Choi
Instead of notifying the event coordinator (EventBox) whenever a new line is arrived, start a background goroutine that periodically does the task. Atomic.StoreInt32 is much cheaper than mutex synchronization that happens during EventBox update.
2017-07-01Print [ERROR] on info line when the default command failedJunegunn Choi
With zero result. Related: https://github.com/junegunn/fzf.vim/issues/22#issuecomment-311869805
2016-11-08Fix issues in tcell renderer and Windows buildJunegunn Choi
- Fix display of CJK wide characters - Fix horizontal offset of header lines - Add support for keys with ALT modifier, shift-tab, page-up and down - Fix util.ExecCommand to properly parse command-line arguments - Fix redraw on resize - Implement Pause/Resume for execute action - Remove runtime check of GOOS - Change exit status to 2 when tcell failed to start - TBD: Travis CI build for tcell renderer - Pending. tcell cannot reliably ingest keys from tmux send-keys
2016-11-07Implement tcell-based rendererMichael Kelley
2016-08-16Increase read buffer size to 64KBJunegunn Choi
2016-02-07Use $SHELL to start $FZF_DEFAULT_COMMAND (#481)Junegunn Choi
2015-08-02Performance fix - unnecessary rune convertion on --ansiJunegunn Choi
> time cat /tmp/list | fzf-0.10.1-darwin_amd64 --ansi -fqwerty > /dev/null real 0m4.364s user 0m8.231s sys 0m0.820s > time cat /tmp/list | fzf --ansi -fqwerty > /dev/null real 0m4.624s user 0m5.755s sys 0m0.732s
2015-08-02Performance tuning - eager rune array conversionJunegunn Choi
> wc -l /tmp/list2 2594098 /tmp/list2 > time cat /tmp/list2 | fzf-0.10.1-darwin_amd64 -fqwerty > /dev/null real 0m5.418s user 0m10.990s sys 0m1.302s > time cat /tmp/list2 | fzf-head -fqwerty > /dev/null real 0m4.862s user 0m6.619s sys 0m0.982s
2015-07-22Add --header-lines optionJunegunn Choi
2015-06-08add support to nil-byte separated input strings, closes #121Giulio Iotti
2015-06-03Fix #248 - Premature termination of Reader on long inputJunegunn Choi