shell: add tsh alias
Signed-off-by: Harald Hoyer <harald@hoyer.xyz>
This commit is contained in:
parent
4827a3e325
commit
93e8e0fd4a
|
@ -21,6 +21,7 @@ in
|
||||||
enable = true;
|
enable = true;
|
||||||
initExtra = ''
|
initExtra = ''
|
||||||
function msh() { mosh "$@" -- bash -c 'if type -f tmux; then tmux new-session -A -s 0; else screen -R; fi;' ; };
|
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
|
${pkgs.mosh}/bin/mosh $argv -- tmux new-session -A -s 0
|
||||||
end
|
end
|
||||||
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 = [{
|
plugins = [{
|
||||||
|
|
Loading…
Reference in a new issue