summaryrefslogtreecommitdiff
path: root/src/util
AgeCommit message (Collapse)Author
2024-05-20Implement multi-line display of multi-line itemsJunegunn Choi
2024-05-18chore: use strings.ReplaceAll (#3801)Zhizhen He
2024-05-140.52.1Junegunn Choi
2024-05-07Refactor the code so that fzf can be used as a library (#3769)Junegunn Choi
2024-05-06Do not enable delayed expansion mode when running cmd.exeJunegunn Choi
And simplify the argument escaping code. Fix #3764. This may breaks some existing use cases, but the mode causes too much trouble when escaping arguments and it makes some things not possible. # Now you can pass special characters to rg process without any escaping problems: &|<>()@^%! fzf --ansi --disabled --bind "change:reload:rg --column --line-number --no-heading --color=always --smart-case -- {q}" # No sudden expansion of the arguments on '!' fzf --disabled --preview "echo {q} {n} {}" --query "&|<>()@^%!" --prompt "&|<>()@^%!"
2024-04-28Escaping for cmd.exe: always use double quotesJunegunn Choi
2024-04-28Fix escaping for cmd.exeJunegunn Choi
Close #3651 Close #2609
2024-04-28Determine shell type once by the basenameJunegunn Choi
2024-04-28Restore CmdLine parameter when running commands using cmd.exeJunegunn Choi
2024-04-27Add --with-shell for shelling out with different command and flags (#3746)Junegunn Choi
Close #3732
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-13Enable profiling options when 'pprof' tag is set (#2813)Charlie Vieth
This commit enables cpu, mem, block, and mutex profling of the FZF executable. To support flushing the profiles at program exit it adds util.AtExit to register "at exit" functions and mandates that util.Exit is used instead of os.Exit to stop the program. Co-authored-by: Junegunn Choi <junegunn.c@gmail.com>
2024-04-13Export $FZF_KEY environment variable to child processesJunegunn Choi
It's the name of the last key pressed. Related #3412
2024-04-02Further performance improvements by removing unnecessary copiesJunegunn Choi
2024-01-27junegunn/uniseg -> rivo/unisegJunegunn Choi
https://github.com/rivo/uniseg/pull/47
2024-01-21Change mattn/go-runewidth dependency to rivo/uniseg for accurate resultsJunegunn Choi
Related #3588 #3588 #3567
2024-01-19Handle ambiguous emoji widthJunegunn Choi
Fix #3588
2024-01-14Remove 'replace' directive for 'go install' compatibilityJunegunn Choi
Close #3577
2023-09-01Fix center-alignment of border/preview labelJunegunn Choi
Fix #3421
2023-03-25Render CR and LF as ␍ and ␊Junegunn Choi
Close #2529
2023-02-23Add spell check workflow (#3183)Zhizhen He
2023-02-15become: Set stdin to /dev/ttyJunegunn Choi
2023-01-23Make test case pass on 32-bit platformsJunegunn Choi
Close #3127
2022-11-27Add more util tests (#3062)OHZEKI Naoki
Co-authored-by: Junegunn Choi <junegunn.c@gmail.com>
2022-11-23test(eventbox): remove obsolete EvtClose const (#3059)Bruno Heridet
2022-11-10Add --separator to customize the info separatorJunegunn Choi
2022-03-29Add --ellipsis=.. optionJunegunn Choi
Close #2432 Also see - #1769 - https://github.com/junegunn/fzf/pull/1844#issuecomment-586663660
2022-03-29Modernize build tagsJunegunn Choi
2021-12-22Fix rendering of the prompt line when overflow occurs with `--info=inline`Junegunn Choi
Fix #2692
2021-11-02Fix powershell escapingRashil Gandhi
2021-10-25Cache cygpath resultJunegunn Choi
No need to repeatedly run cygpath process because $SHELL never changes.
2021-10-23Respect SHELL env var on Windows (#2641)Rashil Gandhi
This makes fzf respect SHELL environment variable on Windows, like it does on *nix, whenever defined. Close #2638
2021-10-03[tests] Add testing of keyboard events in FullscreenRenderer.GetChar()Vlastimil Ovčáčík
This contains one test case of each tcell.Key* event type that can be sent to and subsequently processed in fzf's GetChar(). The test cases describe status quo, and all of them PASS. Small function util.ToTty() was added. It is similar to util.IsTty(), but for stdout (hence the To preposition).
2021-06-01Fix bug where `--read0` not properly displaying long linesJunegunn Choi
Fix #2508
2021-05-14Replace RuneWidth to StringWidth to handle grapheme clustersJunegunn Choi
Fix #2482
2020-03-30Update AtomicBool to use atomic memory operation (#1939)Alexandr
2020-03-01Fix prefix/suffix/equal matcher to trim whitespacesJunegunn Choi
- Prefix matcher will trim leading whitespaces only when the pattern doesn't start with a whitespace - Suffix matcher will trim trailing whitespaces only when the pattern doesn't end with a whitespace - Equal matcher will trim leading whitespaces only when the pattern doesn't start with a whitespace, and trim trailing whitespaces only when the pattern doesn't end with a whitespace Previously, only suffix matcher would trim whitespaces unconditionally. Fix #1894
2019-12-09Defer resetting multi-selection on reloadJunegunn Choi
2019-11-12Remove trailing whitespaces when using --with-nthJunegunn Choi
2019-07-19Code cleanup (#1640)Christian Muehlhaeuser
- Replaced time.Now().Sub() with time.Since() - Replaced unnecessary string/byte slice conversions - Removed obsolete return and value assignment in range loop
2019-03-07Always prepend ANSI reset code before re-assembling tokensJunegunn Choi
2019-03-06Preserve the original color of each token when using --with-nth with --ansiJunegunn Choi
Close #1500
2018-10-070.17.5Junegunn Choi
2018-09-28Kill running preview process after 500ms when focus has changedJunegunn Choi
Close #1383 Close #1384
2018-04-12Do not print non-displayable charactersJunegunn Choi
fzf used to print non-displayable characters (ascii code < 32) as '?', but we will simply ignore those characters with this patch, just like our terminals do. \n and \r are exceptions. They will be printed as a space character. TODO: \H should delete the preceding character, but this is not implemented. Related: #1253
2018-03-13Make fzf pass go vetRyan Boehning
Add String() methods to types, so they can be printed with %s. Change some %s format specifiers to %v, when the default string representation is good enough. In Go 1.10, `go test` triggers a parallel `go vet`. So this also makes fzf pass `go test`. Close #1236 Close #1219
2018-01-17Update Windows default command to print relative paths (#1200)Jan Edmund Lazo
2017-10-15Fix compilation error of Windows binaryJunegunn Choi
2017-10-14Fix ExecCommandWith for cmd.exe in Windows (#1072)Jan Edmund Lazo
Close #1018 Run the command as is in cmd.exe with no parsing and escaping. Explicity set cmd.SysProcAttr so execCommand does not escape the command. Technically, the command should be escaped with ^ for special characters, including ". This allows cmd.exe commands to be chained together. See https://github.com/neovim/neovim/pull/7343#issuecomment-333350201 This commit also updates quoteEntry to use strings.Replace instead of strconv.Quote which escapes more than \ and ".
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