Compare commits
	
		
			4 Commits
		
	
	
		
			2aaf279c9e
			...
			526e6cae26
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 526e6cae26 | |||
| 1a003a9d72 | |||
| 2b51dfd554 | |||
| d078a852df | 
							
								
								
									
										7
									
								
								bashrc
									
									
									
									
									
								
							
							
						
						
									
										7
									
								
								bashrc
									
									
									
									
									
								
							@@ -28,7 +28,6 @@ _source_dir_files "${BASEDIR}"/libs
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
# Source 3rd party libs if they exists
 | 
					# Source 3rd party libs if they exists
 | 
				
			||||||
_source_file_if_exists "${BASEDIR}/3rd-party/complete-alias/complete_alias"
 | 
					_source_file_if_exists "${BASEDIR}/3rd-party/complete-alias/complete_alias"
 | 
				
			||||||
# _source_file_if_exists "${BASEDIR}/3rd-party/z/z.sh" # FIX: Problème de gestion de la variable PROMPT_COMMAND
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Early customization
 | 
					# Early customization
 | 
				
			||||||
_source_dir_files "${BASEDIR}"/rc.before.d
 | 
					_source_dir_files "${BASEDIR}"/rc.before.d
 | 
				
			||||||
@@ -37,6 +36,12 @@ _source_dir_files "${BASEDIR}"/rc.before.d
 | 
				
			|||||||
_source_dir_files "${BASEDIR}"/rc
 | 
					_source_dir_files "${BASEDIR}"/rc
 | 
				
			||||||
_source_dir_files "${BASEDIR}"/rc.d
 | 
					_source_dir_files "${BASEDIR}"/rc.d
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Source functions definitions
 | 
				
			||||||
 | 
					_source_file_if_exists ~/.bash_functions
 | 
				
			||||||
 | 
					_source_file_if_exists "${BASEDIR}"/functions
 | 
				
			||||||
 | 
					_source_dir_files "${BASEDIR}"/functions
 | 
				
			||||||
 | 
					_source_dir_files "${BASEDIR}"/functions.d
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Source alias definitions
 | 
					# Source alias definitions
 | 
				
			||||||
_source_file_if_exists ~/.bash_aliases
 | 
					_source_file_if_exists ~/.bash_aliases
 | 
				
			||||||
_source_file_if_exists "${BASEDIR}"/aliases
 | 
					_source_file_if_exists "${BASEDIR}"/aliases
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										18
									
								
								functions.d/devenv
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										18
									
								
								functions.d/devenv
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,18 @@
 | 
				
			|||||||
 | 
					#!/bin/bash
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					function devenv() {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  local status
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  # Get LXC container status
 | 
				
			||||||
 | 
					  status=$(lxc info devenv | yq .Status)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  # Start container if not running
 | 
				
			||||||
 | 
					  if [ "${status}" != "RUNNING" ]; then lxc start devenv; fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  # Rename tmux window if inside tmux
 | 
				
			||||||
 | 
					  if [ -n "$TMUX" ]; then tmux rename-window "devenv"; fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  # Login as user xavier
 | 
				
			||||||
 | 
					  lxc exec devenv -- login -f xavier
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -1,5 +1,5 @@
 | 
				
			|||||||
#!/bin/bash
 | 
					#!/bin/bash
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if (command -v keychain &>/dev/null); then
 | 
					if (command -v keychain &>/dev/null); then
 | 
				
			||||||
  eval "$(keychain --eval --noask ~/.ssh/{id_ed25519,id_rsa_native})"
 | 
					  eval "$(keychain --inherit any --quiet --noask ~/.ssh/id_{rsa,ed25519})"
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user