add zsh functions
This commit is contained in:
7
zsh/.local/share/zsh/functions/ssh-keygen-new
Normal file
7
zsh/.local/share/zsh/functions/ssh-keygen-new
Normal file
@@ -0,0 +1,7 @@
|
||||
function ssh-keygen-new() {
|
||||
local key_type="${1:-ed25519}"
|
||||
local key_file="${2:-$HOME/.ssh/id_${key_type}}"
|
||||
local comment="${3:-$(printf '%s@%s' $(whoami) $(hostname))}"
|
||||
|
||||
ssh-keygen -t "$key_type" -f "$key_file" -C "$comment"
|
||||
}
|
||||
Reference in New Issue
Block a user