Commit Graph

84 Commits (master)

Author SHA1 Message Date
Junegunn Choi 90d7e38909
[fzf-tmux] Replace `command -v` with `which`
`command -v fzf` prints `alias fzf=...` when `fzf` is an alias.

Fix #3730
3 weeks ago
Junegunn Choi d282a1649d
Add walker options and replace 'find' with the built-in walker (#3649) 2 months ago
Junegunn Choi edee2b753c
fzf-tmux: Workaround for tmux 3.4 bug
Close #3635

https://github.com/tmux/tmux/pull/3840
2 months ago
Junegunn Choi de7ef7eace
[fzf-tmux] Fix 'empty command' error on tmux 3.2
Fix #3474
7 months ago
Chandan Mangu 815b595d2f
[fzf-tmux] Turn off remain-on-exit only on fzf-tmux pane (#3410)
* fix: turn off remain-on-exit only on fzf-tmux pane

Using `fzf-tmux` overwrites `remain-on-exit` for all panes in a window,
if it is only set globally or at a higher scope than window.

	set-option -wg remain-on-exit on
	set-option -s remain-on-exit on

This makes other panes in that window close immediately on exit after
using `fzf-tmux`, even though I expect them to remain open.

Since TMux 3.0, `remain-on-exit` is a pane option that can be set via
`set-option -p`. This will limit the option's scope to just the
`fzf-tmux` pane, thus allowing us to close it immediately without
overriding `remain-on-exit` on other panes in the window.

Co-authored-by: Junegunn Choi <junegunn.c@gmail.com>
Link: 11e69f6025/CHANGES (L753-L760)
Link: https://github.com/tmux/tmux/releases/tag/3.0
Related: https://github.com/junegunn/fzf/issues/3397

* fix: turn off synchronize-panes only on fzf-tmux pane

Similar reason to 482fd2b (fix: turn off remain-on-exit only on fzf-tmux
pane, 2023-08-24).

	Limit scope on which option is set to bare minimum.

Have confirmed this will not feed input back to other panes which are
set to be synchronized. However, note that this will not stop `fzf-tmux`
from being launched by two synchronized panes in parallel.

Link: https://github.com/junegunn/fzf/issues/3397#issuecomment-1689295351

---------

Co-authored-by: Junegunn Choi <junegunn.c@gmail.com>
9 months ago
Junegunn Choi 89b9189efa
[fzf-tmux] Pass $RUNEWIDTH_EASTASIAN
Close #3385
9 months ago
Junegunn Choi 20340190b5
[fzf-tmux] Pass $BAT_THEME
This may anger some purists, but bat is widely used as the previewer so
I think it's worth it.
11 months ago
Junegunn Choi 36b971ee4e
[fzf-tmux] Try awk before bc 1 year ago
Junegunn Choi f1a9629652
[fzf-tmux] Use awk if bc is not found
Fix #3235
1 year ago
Junegunn Choi 025aa33773
[fzf-tmux] Disallow popup mode on tmux 3.1 or below
Close #3198
1 year ago
Junegunn Choi b3bf18b1c0
[fzf-tmux] Fix version check
The output of `tmux -V` starts with "tmux ".
1 year ago
Junegunn Choi b1619f675f
[fzf-tmux] Do not set --margin 0,1 on tmux 3.3 or above
Close #3162
1 year ago
Zhizhen He 2a54e3d770
Fix typos in the source code (#3048) 1 year ago
Junegunn Choi 19f9bbca0d
Allow specifying fzf options in $FZF_TMUX_OPTS without '--' 2 years ago
Yang Tian d826f9e72f
[fzf-tmux] Use fzf border instead of tmux popup border (#2908)
Co-authored-by: Yang Tian <yang.tian@getcruise.com>
Co-authored-by: Junegunn Choi <junegunn.c@gmail.com>
2 years ago
Junegunn Choi 6a6130615d
[fzf-tmux] Remove code for tmux 3.2 beta compatibility 2 years ago
a1346054 ab247a1309 use consistent style for bash [[ ... ]] 3 years ago
solarizedalias 489b16efce
[fzf-tmux] Adapt to tmux latest changes (#2379) 3 years ago
Junegunn Choi fd8858f8c9
[fzf-tmux] Disable CTRL-Z 3 years ago
Junegunn Choi 246b9f3130
Simplify fzf-tmux script
# Should properly escape arguments
    FZF_DEFAULT_OPTS='--prompt "\$a`b\"c"' fzf-tmux --header $'$a\nb"c`d'
4 years ago
karasu 01cf01e084
[fzf-tmux] Fix zoomed pane handling in popup mode (#2054)
When called with popup options, do not move to temp window.
4 years ago
Junegunn Choi 15e2952a2b
[fzf-tmux] Allow positional flags
Since we don't know in advance which flags tmux will support, simply
allow a single uppercase character ([A-Z]) for now.

    fzf-tmux -xR -yS
    fzf-tmux -x R -y S

Fix #1956
4 years ago
Junegunn Choi 540bfd7a72 [fzf-tmux] Fall back to plain fzf when split failed 4 years ago
Junegunn Choi 8fbed2b13a [fzf-tmux] Use $PWD instead of #{pane_current_path}
Related: https://github.com/tmux/tmux/issues/1282
4 years ago
Junegunn Choi aa17510e0a [fzf-tmux] Set default horizontal margin 4 years ago
Junegunn Choi bf65e8cd12 [fzf-tmux] Add option to start fzf in tmux popup window
Requires latest tmux built from source (e.g. brew install tmux --HEAD)

Examples:

  # 50%/50% width and height on the center of the screen
  fzf-tmux -p

  # 80%/80%
  fzf-tmux -p80%

  # 80%/40%
  fzf-tmux -p80%,40%

  # Separate -w and -h
  fzf-tmux -w80% -h40%

  # 80%/40% at position (0, 0)
  fzf-tmux -w80% -h40% -x0 -y0

You can configure key bindings and fuzzy completion to open in tmux
popup window like so:

  FZF_TMUX_OPTS='-p 80%'
4 years ago
Junegunn Choi 888fd35689
[fzf-tmux] Avoid unnecessary recovery of window options
fzf-tmux temporarily turns off remain-on-exit and synchronize-panes
options. We don't have to try to restore the values of the options if
they were already turned off when fzf-tmux was started.
6 years ago
Heinrich Kruger ddd2a109e4 [fzf-tmux] Restore tmux window options (#1272)
Restore the original values of 'remain-on-exit' and 'synchronize-panes'
options when exiting 'fzf-tmux'.
6 years ago
Ricardo González 7f5f6efbac [fzf-tmux] Executes fzf from fzf-tmux with a process name (#1056) 7 years ago
Junegunn Choi 655dfb8328
[fzf-tmux] Remove cat command
Close #1039
7 years ago
Mike Hearn 9b9c67b768 [fzf-tmux] Add pane_height/pane_width fallback (#1037) 7 years ago
Junegunn Choi 329de8f416
[fzf-tmux] Execute trap with bash instead of the default shell
Close #1007
7 years ago
Junegunn Choi 3cf9ae04c7
[fzf-tmux] Fix cleanup of temporary files
Close #935
7 years ago
Kouki Higashikawa 7c8f7d3f20 [fzf-tmux] Close with exit code 130 when tmux pane is killed
Fix #796
7 years ago
五所和哉 bbe696e925 [fzf-tmux] Fix issue with zoomed pane on fish (#891) 7 years ago
Junegunn Choi 1ba7acf4bd
[fzf-tmux] Fix race condition when using -l/-u on zoomed panes
Using a dummy command that works as the barrier.
7 years ago
Junegunn Choi 1448d631a7
Add --height option 7 years ago
Junegunn Choi ac549a853a
[fzf-tmux] Fix bash condition
Fix #702
8 years ago
Junegunn Choi 053af9a1c8
[fzf-tmux/vim/nvim] Do not split small window
Close #699
8 years ago
Bryan Head 9baf7c4874 Make fzf target correct session in group
Fixes #643
Doesn't break #648
8 years ago
Junegunn Choi 22b089e47e
Revert "Unset TMUX before splitting window" (#648)
This reverts commit 4d4447779f.
8 years ago
Bryan Head 4d4447779f Unset TMUX before splitting window
Avoids confusing grouped sessions.
Fixes #643
8 years ago
Junegunn Choi b461a555b8
[fzf-tmux] Add --version and --help flags 8 years ago
Junegunn Choi 0f87b2d1e1
[fzf-tmux] Use double brackets
For consistency and (negligible) performance improvement
8 years ago
Junegunn Choi 0fb5b76c0d
[fzf-tmux] Fail fast if fzf excutable is not found 8 years ago
Junegunn Choi 6a431cbf49
[fzf-tmux] Escape $ in arguments
e.g. fzf-tmux -q '$PATH'

Related: #343
8 years ago
Junegunn Choi 1c86aaf342
[vim/fzf-tmux] Handle fzf project directory with spaces
Close #583
8 years ago
Junegunn Choi cfc0b18eaa
Revert "Change tmux pane title for fzf splits"
This reverts commit f074709fc9.

Close #586. /cc @akashin
8 years ago
Andrey Kashin f074709fc9 Change tmux pane title for fzf splits 8 years ago
Junegunn Choi faccc0a410
[fzf-tmux] Escape backslash in command-line arguments 8 years ago