shell: add tsh alias
Signed-off-by: Harald Hoyer <harald@hoyer.xyz>
This commit is contained in:
		
							parent
							
								
									4827a3e325
								
							
						
					
					
						commit
						93e8e0fd4a
					
				
					 2 changed files with 8 additions and 0 deletions
				
			
		|  | @ -21,6 +21,7 @@ in | |||
|       enable = true; | ||||
|       initExtra = '' | ||||
|         function msh() { mosh "$@" -- bash -c 'if type -f tmux; then tmux new-session -A -s 0; else screen -R; fi;' ; }; | ||||
|         function tsh() { ssh -t "$@" -- bash -c 'if type -f tmux; then tmux new-session -A -s 0; else screen -R; fi;' ; }; | ||||
|       ''; | ||||
|     }; | ||||
|   }; | ||||
|  |  | |||
|  | @ -24,6 +24,13 @@ in | |||
|             ${pkgs.mosh}/bin/mosh $argv -- tmux new-session -A -s 0 | ||||
|           end | ||||
|         end | ||||
|         function tsh --wraps ssh --description 'ssh with tmux' | ||||
|           if not set -q argv[1] | ||||
|             echo 'Usage: tsh [user@]host [command]' | ||||
|           else | ||||
|             ${pkgs.openssh}/bin/ssh -t $argv -- tmux new-session -A -s 0 | ||||
|           end | ||||
|         end | ||||
|       ''; | ||||
| 
 | ||||
|       plugins = [{ | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue