mirror of
				https://github.com/frebib/dotfiles.git
				synced 2024-06-14 12:57:23 +00:00 
			
		
		
		
	Add executable argument to dsh instead of assuming /bin/sh
This commit is contained in:
		
							
								
								
									
										5
									
								
								aliases
									
									
									
									
									
								
							
							
						
						
									
										5
									
								
								aliases
									
									
									
									
									
								
							| @@ -161,7 +161,8 @@ alias dsh='_dsh exec' | |||||||
| alias drsh='_dsh "run --rm"' | alias drsh='_dsh "run --rm"' | ||||||
| _dsh() { | _dsh() { | ||||||
|     local dowhat="$1" |     local dowhat="$1" | ||||||
|     local user=`echo $2 | cut -d'@' -f1 -s` |     local user=$(echo "$2" | cut -d'@' -f1 -s) | ||||||
|  |     local prog="${@:3:$#}" | ||||||
|     local usercmd="" |     local usercmd="" | ||||||
|     if [ -z "$user" ]; then |     if [ -z "$user" ]; then | ||||||
|         host="$2" |         host="$2" | ||||||
| @@ -170,7 +171,7 @@ _dsh() { | |||||||
|         usercmd="--user=$user " |         usercmd="--user=$user " | ||||||
|     fi |     fi | ||||||
|  |  | ||||||
|     eval "docker $dowhat -ti $usercmd$host /bin/sh" |     eval "docker $dowhat -ti $usercmd$host $prog" | ||||||
| } | } | ||||||
|  |  | ||||||
| alias dm='docker-machine' | alias dm='docker-machine' | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user