1
0
Fork 0
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:
Henrik Hautakoski 2024-09-27 17:54:36 +02:00
parent 9571928239
commit 7f2b412279

View file

@ -1,14 +1,16 @@
#!/usr/bin/env bash #!/usr/bin/env bash
FZF="fzf --preview="
if [[ $# -eq 1 ]]; then if [[ $# -eq 1 ]]; then
if [[ "$1" -eq "-a" ]]; then if [[ "$1" -eq "-a" ]]; then
selected=$(tmux list-sessions | fzf | sed 's/: .*//g') selected=$(tmux list-sessions | $FZF | sed 's/: .*//g')
else else
selected=$(realpath $1) selected=$(realpath $1)
fi fi
else else
DIRECTORIES=$(cat ~/.tmuxs | sed "s&^\~&${HOME}&g") 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 fi
if [[ -z $selected ]]; then if [[ -z $selected ]]; then