From fdfa68ac625fc5d0b527b4142752c56a77d5b65b Mon Sep 17 00:00:00 2001 From: Mylloon Date: Sun, 8 Oct 2023 19:28:21 +0200 Subject: [PATCH] better export --- .config/fish/conf.d/alias.fish | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.config/fish/conf.d/alias.fish b/.config/fish/conf.d/alias.fish index 0163923..c4806fb 100644 --- a/.config/fish/conf.d/alias.fish +++ b/.config/fish/conf.d/alias.fish @@ -6,7 +6,9 @@ alias mirrors_update "curl -s 'https://archlinux.org/mirrorlist/?country=FR&coun alias pacman-clean "sudo pacman -Rsn \$(pacman -Qqtd) --noconfirm" alias untgz "tar xvzf" alias paru-rebuild "checkrebuild | awk '{print \$2}' | xargs -r paru -S --rebuild=all --noconfirm" -alias ssh-export "tar czf '$HOME/SSH.tar.gz' $HOME/.ssh" +alias ssh-export "cd $HOME/.ssh && \ + tar cz --exclude='known_hosts*' -X 'environment' -f '$HOME/SSH.tar.gz' * && \ + if not test $PWD -ef $HOME/.ssh; cd -; end; true" alias ssh-fix "sudo chown $USER:$(id -gn) $HOME/.ssh/* && \ sudo chmod u=r,g=,o= $HOME/.ssh/*; \ sudo chmod u=r,g=r,o=r $HOME/.ssh/*.pub; \