File tree Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -15,8 +15,26 @@ _tpm_path() {
15
15
16
16
_CACHED_TPM_PATH=" $( _tpm_path) "
17
17
18
+ # Get the absolute path to the users configuration file of TMux.
19
+ # This includes a prioritized search on different locations.
20
+ #
21
+ _get_user_tmux_conf () {
22
+ # Define the different possible locations.
23
+ xdg_location=" $XDG_CONFIG_HOME /tmux/tmux.conf"
24
+ default_location=" $HOME /.tmux.conf"
25
+
26
+ # Search for the correct configuration file by priority.
27
+ if [ -f " $xdg_location " ]; then
28
+ echo " $xdg_location "
29
+
30
+ else
31
+ echo " $default_location "
32
+ fi
33
+ }
34
+
18
35
_tmux_conf_contents () {
19
- cat /etc/tmux.conf ~ /.tmux.conf 2> /dev/null
36
+ user_config=$( _get_user_tmux_conf)
37
+ cat /etc/tmux.conf " $user_config " 2> /dev/null
20
38
if [ " $1 " == " full" ]; then # also output content from sourced files
21
39
local file
22
40
for file in $( _sourced_files) ; do
You can’t perform that action at this time.
0 commit comments