From e26e71bd2e7ad384a38e5a39eb9b3466ce93523f Mon Sep 17 00:00:00 2001 From: "Christoph J. Scherr" Date: Mon, 4 Sep 2023 09:41:11 +0200 Subject: [PATCH] fix zsh function --- home/.zsh-server/zshrc | 4 ++++ home/.zsh/zshrc | 1 + 2 files changed, 5 insertions(+) diff --git a/home/.zsh-server/zshrc b/home/.zsh-server/zshrc index 3e7b45d..ef9ceed 100644 --- a/home/.zsh-server/zshrc +++ b/home/.zsh-server/zshrc @@ -29,6 +29,10 @@ alias gls=/bin/ls function largefiles () { exec 2>/dev/null; du -ah "$@" | grep -P "^\d+(G|T|P|E)\s" } function midfiles () { exec 2>/dev/null; du -ah "$@" | grep -P "^\d+(M|G|T|P|E)\s" } function smallfiles () { exec 2>/dev/null; du -ah "$@" | grep -P "^\d+(B|K)\s" } +function cachekeys () { exec 2>/dev/null; + eval $(ssh-agent) + ssh-add ~/.ssh/id_rsa +} function newpass() { LC_ALL=C tr -dc '[:alnum:]' < /dev/urandom | head -c${1:-$0} } diff --git a/home/.zsh/zshrc b/home/.zsh/zshrc index 35cb642..1741d69 100644 --- a/home/.zsh/zshrc +++ b/home/.zsh/zshrc @@ -40,6 +40,7 @@ function smallfiles () { exec 2>/dev/null; du -ah "$@" | grep -P "^\d+(B|K)\s" } function cachekeys () { exec 2>/dev/null; eval $(ssh-agent) ssh-add ~/.ssh/id_rsa +} function newpass() { LC_ALL=C tr -dc '[:alnum:]' < /dev/urandom | head -c${1:-$0} }