mirror of
				https://github.com/sammy-ette/Hilbish
				synced 2025-08-10 02:52:03 +00:00 
			
		
		
		
	feat: replace ~ in preloadPath and sampleConfPath with homedir
This commit is contained in:
		
							parent
							
								
									822b2876e9
								
							
						
					
					
						commit
						4caeb7ec91
					
				
							
								
								
									
										2
									
								
								main.go
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								main.go
									
									
									
									
									
								
							@ -40,6 +40,8 @@ var (
 | 
				
			|||||||
func main() {
 | 
					func main() {
 | 
				
			||||||
	homedir, _ = os.UserHomeDir()
 | 
						homedir, _ = os.UserHomeDir()
 | 
				
			||||||
	curuser, _ = user.Current()
 | 
						curuser, _ = user.Current()
 | 
				
			||||||
 | 
						preloadPath = strings.Replace(preloadPath, "~", homedir, 1)
 | 
				
			||||||
 | 
						sampleConfPath = strings.Replace(sampleConfPath, "~", homedir, 1)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if defaultConfDir == "" {
 | 
						if defaultConfDir == "" {
 | 
				
			||||||
		// we'll add *our* default if its empty (wont be if its changed comptime)
 | 
							// we'll add *our* default if its empty (wont be if its changed comptime)
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user