diff --git a/CHANGELOG.md b/CHANGELOG.md index 76ea0bb3..30bca8cb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,14 @@ CHANGELOG fzf --height '~100%' --reverse --header 'Select one' \ --bind 'enter:transform:[[ -n {} ]] && echo accept || echo "change-header:Invalid selection"' \ --bind 'focus:transform:[[ -n {} ]] && exit; [[ {fzf:action} =~ up$ ]] && echo up || echo down' + + # A single key binding to toggle between modes + fd --type file | + fzf --prompt 'Files> ' \ + --header 'CTRL-T: Switch between Files/Directories' \ + --bind 'ctrl-t:transform:[[ ! {fzf:prompt} =~ Files ]] && + echo "change-prompt(Files> )+reload(fd --type file)" || + echo "change-prompt(Directories> )+reload(fd --type directory)"' ``` - Added placeholder expressions - `{fzf:action}` - The name of the last action performed @@ -32,9 +40,13 @@ CHANGELOG # You can make CTRL-R paste the current query when there's no match export FZF_CTRL_R_OPTS='--bind enter:accept-or-print-query' ``` - - Note that this new action isn't fundamentally different from the following `become` binding. `become` is apparently more versatile but it's not available on Windows. + - Note that there are alternative ways to implement the same strategy ```sh - export FZF_CTRL_R_OPTS='--bind "enter:become:if [[ -n {} ]]; then echo {}; else echo {q}; fi"' + # 'become' is apparently more versatile but it's not available on Windows. + export FZF_CTRL_R_OPTS='--bind "enter:become:if [ -z {} ]; then echo {q}; else echo {}; fi"' + + # Using the new 'transform' action + export FZF_CTRL_R_OPTS='--bind "enter:transform:[ -z {} ] && echo print-query || echo accept"' ``` - Added `show-header` and `hide-header` actions - Bug fixes diff --git a/LICENSE b/LICENSE index e3b8ff8e..e0da9468 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2013-2023 Junegunn Choi +Copyright (c) 2013-2024 Junegunn Choi Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README-VIM.md b/README-VIM.md index f3247bac..e02a97f6 100644 --- a/README-VIM.md +++ b/README-VIM.md @@ -489,4 +489,4 @@ autocmd FileType fzf set laststatus=0 noshowmode noruler The MIT License (MIT) -Copyright (c) 2013-2023 Junegunn Choi +Copyright (c) 2013-2024 Junegunn Choi diff --git a/README.md b/README.md index 24a4d39a..3838d944 100644 --- a/README.md +++ b/README.md @@ -810,4 +810,4 @@ https://github.com/junegunn/fzf/wiki/Related-projects The MIT License (MIT) -Copyright (c) 2013-2023 Junegunn Choi +Copyright (c) 2013-2024 Junegunn Choi diff --git a/doc/fzf.txt b/doc/fzf.txt index 92290a15..607637e7 100644 --- a/doc/fzf.txt +++ b/doc/fzf.txt @@ -1,4 +1,4 @@ -fzf.txt fzf Last change: September 17 2023 +fzf.txt fzf Last change: January 1 2024 FZF - TABLE OF CONTENTS *fzf* *fzf-toc* ============================================================================== @@ -512,7 +512,7 @@ LICENSE *fzf-license* The MIT License (MIT) -Copyright (c) 2013-2023 Junegunn Choi +Copyright (c) 2013-2024 Junegunn Choi ============================================================================== vim:tw=78:sw=2:ts=2:ft=help:norl:nowrap: diff --git a/install b/install index a30e0fb5..a448e5b8 100755 --- a/install +++ b/install @@ -2,7 +2,7 @@ set -u -version=0.44.1 +version=0.45.0 auto_completion= key_bindings= update_config=2 diff --git a/install.ps1 b/install.ps1 index 1a87fca7..d977dc7f 100644 --- a/install.ps1 +++ b/install.ps1 @@ -1,4 +1,4 @@ -$version="0.44.1" +$version="0.45.0" $fzf_base=Split-Path -Parent $MyInvocation.MyCommand.Definition diff --git a/main.go b/main.go index 22e47b33..9bf700c0 100644 --- a/main.go +++ b/main.go @@ -5,7 +5,7 @@ import ( "github.com/junegunn/fzf/src/protector" ) -var version string = "0.44" +var version string = "0.45" var revision string = "devel" func main() { diff --git a/man/man1/fzf-tmux.1 b/man/man1/fzf-tmux.1 index 51a3bd25..edaff980 100644 --- a/man/man1/fzf-tmux.1 +++ b/man/man1/fzf-tmux.1 @@ -1,7 +1,7 @@ .ig The MIT License (MIT) -Copyright (c) 2013-2023 Junegunn Choi +Copyright (c) 2013-2024 Junegunn Choi Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -21,7 +21,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. .. -.TH fzf-tmux 1 "Nov 2023" "fzf 0.44.1" "fzf-tmux - open fzf in tmux split pane" +.TH fzf-tmux 1 "Jan 2024" "fzf 0.45.0" "fzf-tmux - open fzf in tmux split pane" .SH NAME fzf-tmux - open fzf in tmux split pane diff --git a/man/man1/fzf.1 b/man/man1/fzf.1 index 38b0862f..e39f6ddd 100644 --- a/man/man1/fzf.1 +++ b/man/man1/fzf.1 @@ -1,7 +1,7 @@ .ig The MIT License (MIT) -Copyright (c) 2013-2023 Junegunn Choi +Copyright (c) 2013-2024 Junegunn Choi Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -21,7 +21,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. .. -.TH fzf 1 "Dec 2023" "fzf 0.45.0" "fzf - a command-line fuzzy finder" +.TH fzf 1 "Jan 2024" "fzf 0.45.0" "fzf - a command-line fuzzy finder" .SH NAME fzf - a command-line fuzzy finder diff --git a/plugin/fzf.vim b/plugin/fzf.vim index dd109906..a99dbb2b 100644 --- a/plugin/fzf.vim +++ b/plugin/fzf.vim @@ -1,4 +1,4 @@ -" Copyright (c) 2013-2023 Junegunn Choi +" Copyright (c) 2013-2024 Junegunn Choi " " MIT License " diff --git a/src/LICENSE b/src/LICENSE index e3b8ff8e..e0da9468 100644 --- a/src/LICENSE +++ b/src/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2013-2023 Junegunn Choi +Copyright (c) 2013-2024 Junegunn Choi Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal