tmux attach session preview with syntax highlighting
This commit is contained in:
parent
61407b51f5
commit
e3ef76a626
@ -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
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user