confOS/.config/fish/functions/ssh-export.fish

14 lines
333 B
Fish

function ssh-export
# Save the entry directory
set entry_directory "$PWD"
# Create the archive
set output_file "$HOME/ssh_keys.zip"
cd "$HOME/.ssh"
zip "$output_file" * -x 'known_hosts*' -x environment
# Returns to the entry directory
cd "$entry_directory"
echo "Exported at $output_file."
end