tmux attach session preview with syntax highlighting

This commit is contained in:
thek4n 2024-11-08 11:34:35 +03:00
parent 61407b51f5
commit e3ef76a626

View File

@ -8,6 +8,7 @@ export FZF_DEFAULT_OPTS="\
${FZF_DEFAULT_OPTS} ${FZF_DEFAULT_OPTS}
--color='border:green,label:green' --color='border:green,label:green'
--border-label=' Start session ' --border-label=' Start session '
--preview='highlight -O ansi '${TMUX_SESSIONS}/{1}''
--pointer='> ' --pointer='> '
--marker='' --marker=''
--bind --bind
@ -30,7 +31,7 @@ do
done done
readonly sessions readonly sessions
session_file="$(echo "${sessions}" | fzf +m --preview-window 70% --preview "cat '${TMUX_SESSIONS}/{1}'" | awk '{printf $1}')" session_file="$(echo "${sessions}" | fzf | awk '{printf $1}')"
readonly session_file readonly session_file
if [ -n "${session_file}" ]; then if [ -n "${session_file}" ]; then