[tmux] Fix session management debug printing
Fixes printing messages only needed for debug. Names session ending with .session instead of the deprecated .config
This commit is contained in:
parent
7d414b294c
commit
3b710baecc
1 changed files with 1 additions and 2 deletions
|
@ -92,7 +92,6 @@ _set_session_vars() {
|
||||||
# set up session name and config file - if passed in as arguments
|
# set up session name and config file - if passed in as arguments
|
||||||
if [ "$#" -eq 2 ]; then
|
if [ "$#" -eq 2 ]; then
|
||||||
if ! _file_exists "$1" && ! _file_exists "${session_dir}${1}"; then
|
if ! _file_exists "$1" && ! _file_exists "${session_dir}${1}"; then
|
||||||
echo "sess dir: ${session_dir}${1}"
|
|
||||||
echo "$0: can not source configuration file: '${1}' does not exist."
|
echo "$0: can not source configuration file: '${1}' does not exist."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
@ -109,7 +108,7 @@ _set_session_vars() {
|
||||||
if [ -z "$session_name" ]; then
|
if [ -z "$session_name" ]; then
|
||||||
# only if we have a filename should we append it to the session name
|
# only if we have a filename should we append it to the session name
|
||||||
if [ -n "$session_file" ]; then
|
if [ -n "$session_file" ]; then
|
||||||
fname=/$(basename "$session_file" .conf)
|
fname=/$(basename "$session_file" .session)
|
||||||
fi
|
fi
|
||||||
# default to parent directory name / config file name for the session
|
# default to parent directory name / config file name for the session
|
||||||
session_name=$(basename "$PWD" | sed 's/[^a-zA-Z0-9\-]//g' | tr . -)"$fname"
|
session_name=$(basename "$PWD" | sed 's/[^a-zA-Z0-9\-]//g' | tr . -)"$fname"
|
||||||
|
|
Loading…
Reference in a new issue