This commit is contained in:
Peder Bergebakken Sundt 2025-01-29 10:25:35 +01:00
parent 5250262df5
commit ef9b182254
2 changed files with 5 additions and 1 deletions

View File

@ -107,7 +107,6 @@ in
home.shellAliases.grep = "grep --color";
home.shellAliases.diff = "diff -u --color"; # eyo
home.shellAliases.ip = "ip -br -color";
home.shellAliases.rssh = "ssh -l root";
home.shellAliases.watch = "watch -c "; # colors
home.shellAliases.sudo = "sudo "; # support aliases
home.shellAliases.xargs = "xargs "; # support aliases

View File

@ -1,9 +1,14 @@
{ pkgs, ... }:
{
home.shellAliases.tssh = "ssh -t";
home.shellAliases.rssh = "ssh -l root";
programs.bash.initExtra = ''
# ssh autocomplete
if test -f ~/.ssh/config; then
complete -W "$(cat ~/.ssh/config | grep "^Host " | cut -d" " -f2- | grep -v '\*')" ssh
complete -W "$(cat ~/.ssh/config | grep "^Host " | cut -d" " -f2- | grep -v '\*')" tssh
complete -W "$(cat ~/.ssh/config | grep "^Host " | cut -d" " -f2- | grep -v '\*')" rssh
complete -W "$(cat ~/.ssh/config | grep "^Host " | cut -d" " -f2- | grep -v '\*')" scp
complete -W "$(cat ~/.ssh/config | grep "^Host " | cut -d" " -f2- | grep -v '\*')" remote-init