From a18acc07446a01294761c8150e3507db6186ea57 Mon Sep 17 00:00:00 2001 From: Random936 Date: Tue, 7 Jan 2025 14:37:09 -0800 Subject: [PATCH] Moved bw functions to .functions.zsh; temp fix for punycode deprecation --- dotfiles/.functions.zsh | 13 +++++++++++++ home/modules/zsh.nix | 3 --- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/dotfiles/.functions.zsh b/dotfiles/.functions.zsh index 0ed7a20..3bbb833 100644 --- a/dotfiles/.functions.zsh +++ b/dotfiles/.functions.zsh @@ -17,3 +17,16 @@ bw-init() { bw unlock --raw > $HOME/.bw_session bw-load } + +bw-copy() { + bw-load && NODE_OPTIONS="--no-deprecation" bw get password "$1" | xsel --clipboard -i +} + +bw-clear() { + echo -n "" | xsel --clipboard +} + +bw-ssh() { + pass=$(bw-load && NODE_OPTIONS="--no-deprecation" bw get password "$1") + sshpass -p "$pass" ssh ${@:2} +} diff --git a/home/modules/zsh.nix b/home/modules/zsh.nix index a7ce6af..b4bec6b 100644 --- a/home/modules/zsh.nix +++ b/home/modules/zsh.nix @@ -47,9 +47,6 @@ function ..... { cd ../../../../.. } function ...... { cd ../../../../../.. } function ....... { cd ../../../../../../.. } - function bw-copy { bw-load && bw get password "$1" | xsel --clipboard -i } - function bw-clear { echo -n "" | xsel --clipboard } - function bw-ssh { sshpass -p "$(bw-load && bw get password "$1")" ssh ''${@:2} } if [[ "$(uname)" == "Darwin" ]]; then source <(/opt/homebrew/bin/brew shellenv)