feat: Améliore la gestion pour sourcer le contenu des sous-répertoires (*.d)
This commit is contained in:
		
							
								
								
									
										5
									
								
								libs.deprecated/basedir.bash
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										5
									
								
								libs.deprecated/basedir.bash
									
									
									
									
									
										Executable file
									
								
							@@ -0,0 +1,5 @@
 | 
			
		||||
#!/bin/bash
 | 
			
		||||
 | 
			
		||||
function basedir() {
 | 
			
		||||
  (cd "$(dirname \"$-2\")" && pwd)
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										9
									
								
								libs.deprecated/path.bash
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								libs.deprecated/path.bash
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,9 @@
 | 
			
		||||
#!/bin/bash
 | 
			
		||||
 | 
			
		||||
_path_add() {
 | 
			
		||||
    if [ -d "$1" ] && [[ ":$PATH:" != *":$1:"* ]]; then
 | 
			
		||||
        PATH="${PATH:+"$PATH:"}$1"
 | 
			
		||||
    fi
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
# Source : https://superuser.com/questions/39751/add-directory-to-path-if-its-not-already-there
 | 
			
		||||
							
								
								
									
										9
									
								
								libs.deprecated/prompt_command.bash
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								libs.deprecated/prompt_command.bash
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,9 @@
 | 
			
		||||
#!/bin/bash
 | 
			
		||||
 | 
			
		||||
_prompt_command_add() {
 | 
			
		||||
    if [ -n "$1" ] && [[ ":$PROMPT_COMMAND:" != *":$1:"* ]]; then
 | 
			
		||||
        PROMPT_COMMAND="${PROMPT_COMMAND:+"$PROMPT_COMMAND;"}$1"
 | 
			
		||||
    fi
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export PROMPT_COMMAND
 | 
			
		||||
		Reference in New Issue
	
	Block a user