mirror of
				https://github.com/tmux-plugins/tpm.git
				synced 2025-11-04 00:16:05 +00:00 
			
		
		
		
	Refactoring
This commit is contained in:
		@@ -1,6 +1,7 @@
 | 
				
			|||||||
# Changelog
 | 
					# Changelog
 | 
				
			||||||
 | 
					
 | 
				
			||||||
### master
 | 
					### master
 | 
				
			||||||
 | 
					- refactor `shared_set_tpm_path_constant` function
 | 
				
			||||||
 | 
					
 | 
				
			||||||
### v2.0.0, 2015-07-07
 | 
					### v2.0.0, 2015-07-07
 | 
				
			||||||
- enable overriding default key bindings
 | 
					- enable overriding default key bindings
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -7,9 +7,9 @@ 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() {
 | 
				
			||||||
	local string_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
 | 
						# manually expanding tilde or `$HOME` variable.
 | 
				
			||||||
	# described here http://stackoverflow.com/a/5748307/777337
 | 
						string_path="${string_path/#\~/$HOME}"
 | 
				
			||||||
	SHARED_TPM_PATH="$(echo "$string_path" | sed "s,^\$HOME,$HOME," | sed "s,^~,$HOME,")"
 | 
						SHARED_TPM_PATH="${string_path/#\$HOME/$HOME}"
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
_tmux_conf_contents() {
 | 
					_tmux_conf_contents() {
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user