mirror of
https://github.com/pnx/dotfiles
synced 2026-06-16 03:14:55 +02:00
scripts/tmuxs: disable preview in fzf
This commit is contained in:
parent
9571928239
commit
7f2b412279
1 changed files with 4 additions and 2 deletions
|
|
@ -1,14 +1,16 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
FZF="fzf --preview="
|
||||
|
||||
if [[ $# -eq 1 ]]; then
|
||||
if [[ "$1" -eq "-a" ]]; then
|
||||
selected=$(tmux list-sessions | fzf | sed 's/: .*//g')
|
||||
selected=$(tmux list-sessions | $FZF | sed 's/: .*//g')
|
||||
else
|
||||
selected=$(realpath $1)
|
||||
fi
|
||||
else
|
||||
DIRECTORIES=$(cat ~/.tmuxs | sed "s&^\~&${HOME}&g")
|
||||
selected=$(find ${DIRECTORIES} -mindepth 1 -maxdepth 1 -type d | fzf)
|
||||
selected=$(find ${DIRECTORIES} -mindepth 1 -maxdepth 1 -type d | $FZF)
|
||||
fi
|
||||
|
||||
if [[ -z $selected ]]; then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue