mirror of
				https://github.com/tmux-plugins/tpm.git
				synced 2025-11-04 08:36:05 +00:00 
			
		
		
		
	Manually expand tilde and $HOME in TMUX_SHARED_MANAGER_PATH
Tilde char and `$HOME` in `TMUX_SHARED_MANAGER_PATH` couldn't be used because they are just plain strings. Fixing the problem by manually expanding them.
This commit is contained in:
		@@ -4,6 +4,8 @@
 | 
				
			|||||||
- if the plugin is not downloaded do not source it
 | 
					- if the plugin is not downloaded do not source it
 | 
				
			||||||
- remove `PLUGINS.md`, an obsolete list of plugins
 | 
					- remove `PLUGINS.md`, an obsolete list of plugins
 | 
				
			||||||
- update readme with instructions about uninstalling plugins
 | 
					- update readme with instructions about uninstalling plugins
 | 
				
			||||||
 | 
					- tilde char and `$HOME` in `TMUX_SHARED_MANAGER_PATH` couldn't be used because
 | 
				
			||||||
 | 
					  they are just plain strings. Fixing the problem by manually expanding them.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
### v1.0.0, 2014-08-05
 | 
					### v1.0.0, 2014-08-05
 | 
				
			||||||
- update readme because of github organization change to
 | 
					- update readme because of github organization change to
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -5,7 +5,10 @@ SHARED_TPM_PATH=""
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
# sets a "global variable" for the current file
 | 
					# sets a "global variable" for the current file
 | 
				
			||||||
shared_set_tpm_path_constant() {
 | 
					shared_set_tpm_path_constant() {
 | 
				
			||||||
	SHARED_TPM_PATH=$(tmux show-environment -g TMUX_PLUGIN_MANAGER_PATH | cut -f2 -d=)
 | 
						local string_path="$(tmux show-environment -g TMUX_PLUGIN_MANAGER_PATH | cut -f2 -d=)"
 | 
				
			||||||
 | 
						# NOTE: manually expanding tilde or `$HOME` variable. Avoids using `eval` as
 | 
				
			||||||
 | 
						# described here http://stackoverflow.com/a/5748307/777337
 | 
				
			||||||
 | 
						SHARED_TPM_PATH="$(echo "$string_path" | sed "s,^\$HOME,$HOME," | sed "s,^~,$HOME,")"
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
shared_get_tpm_plugins_list() {
 | 
					shared_get_tpm_plugins_list() {
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user