Merge remote-tracking branch 'lenormf/fix-describe-sessions'

This commit is contained in:
Maxime Coste 2020-02-05 20:40:36 +11:00
commit 14e7b641dc

View File

@ -40,7 +40,12 @@ main() {
script=$(printf 'nop %%sh{ %s }' "${KAK_SCRIPT}" | sed "s,{{outfile}},\"${outfile}\",g") script=$(printf 'nop %%sh{ %s }' "${KAK_SCRIPT}" | sed "s,{{outfile}},\"${outfile}\",g")
for session in "${TMPDIR:-/tmp}/kakoune/${USER}"/*; do sessions_dir="${TMPDIR:-/tmp}/kakoune/${USER}"
if [ -n "${XDG_RUNTIME_DIR}" ]; then
sessions_dir="${XDG_RUNTIME_DIR}/kakoune"
fi
for session in "${sessions_dir}"/*; do
name_session="${session##*/}" name_session="${session##*/}"
if printf '' | socat - UNIX-CONNECT:"${session}",connect-timeout=1 2>/dev/null; then if printf '' | socat - UNIX-CONNECT:"${session}",connect-timeout=1 2>/dev/null; then