Skip to content

Commit

Permalink
Use colon as path separator in sessionPfads string
Browse files Browse the repository at this point in the history
This change may cause trouble for those who has used that feature in their
config file, but this way it fit $PATH and allow spaces in a path.
  • Loading branch information
loh-tar committed Nov 13, 2022
1 parent f07b1d7 commit 56ec23b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion doc/60_DefaultConfig.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ trouble in case of an update.
# @Xdisplay@ will replaced by number of tty
# verboseLevel="3" # 0=quiet, 1=silent, 2=info, 3=verbose
# theme="" # Ok, it is theme related
# sessionPfads="/usr/share/xsessions /usr/share/wayland-sessions"
# sessionPfads="/usr/share/xsessions:/usr/share/wayland-sessions"
# Yeah, looks like a typo, but use it as written :-)

# Available text (foreground) colors and attributes, protected not to change.
Expand Down
7 changes: 3 additions & 4 deletions src/tbsm
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ declare -r sessionStartDirs=( "${sessionStartDirs[@]}" )
declare -r configDir="${XDG_CONFIG_HOME:-${HOME}/.config}/${myName}"

declare -r installPfad=""
declare sessionPfads="/usr/share/xsessions /usr/share/wayland-sessions"
declare sessionPfads="/usr/share/xsessions:/usr/share/wayland-sessions"
declare runInTTY="yes" # When unset we have no tty, glas is half full
declare XserverArg="@Xdisplay@ -nolisten tcp" # @Xdisplay@ will replaced by number of tty
declare protectedVerbose
Expand Down Expand Up @@ -900,9 +900,8 @@ if [[ -n "${theme}" ]]; then
readConfigFile "themes/${theme}"
fi

# Urgs! Since afdb675 sessionPfads is no longer an array.
# But to satisfy shellcheck elsewhere is that mandatory.
read -ra sessionPfads <<< "$sessionPfads"
# Convert our path string into an array for nicer handling later
IFS=':' read -ra sessionPfads <<< "$sessionPfads"

# FIXME: Do you know a way to "re-eval" strings with variables in it so we can
# simple 'declare' all these on top of file but have effect if a config
Expand Down

0 comments on commit 56ec23b

Please sign in to comment.