mirror of
https://github.com/Crocmagnon/dotfiles.git
synced 2024-11-21 22:18:07 +01:00
unlock bw
This commit is contained in:
parent
6b992478fc
commit
0342ab1ed7
5 changed files with 33 additions and 50 deletions
|
@ -1,3 +1,10 @@
|
|||
function bwunlock
|
||||
set -g BW_SESSION (bw unlock --raw)
|
||||
set -x NODE_OPTIONS "--no-deprecation"
|
||||
|
||||
if not bw login --check
|
||||
set -gx BW_SESSION (bw login --raw)
|
||||
end
|
||||
if not bw unlock --check
|
||||
set -gx BW_SESSION (bw unlock --raw)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,11 +1,4 @@
|
|||
function chezmoiapply
|
||||
set -x NODE_OPTIONS "--no-deprecation"
|
||||
|
||||
if not bw login --check
|
||||
set -x BW_SESSION (bw login --raw)
|
||||
end
|
||||
if not bw unlock --check
|
||||
set -x BW_SESSION (bw unlock --raw)
|
||||
end
|
||||
bwunlock
|
||||
chezmoi apply
|
||||
end
|
||||
|
|
|
@ -1,10 +1,4 @@
|
|||
function chezmoiupdate
|
||||
set -x NODE_OPTIONS "--no-deprecation"
|
||||
if not bw login --check
|
||||
set -x BW_SESSION (bw login --raw)
|
||||
end
|
||||
if not bw unlock --check
|
||||
set -x BW_SESSION (bw unlock --raw)
|
||||
end
|
||||
bwunlock
|
||||
chezmoi update
|
||||
end
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
function fetchkeys
|
||||
if not bw login --check
|
||||
set -x BW_SESSION (bw login --raw)
|
||||
end
|
||||
if not bw unlock --check
|
||||
set -x BW_SESSION (bw unlock --raw)
|
||||
end
|
||||
bwunlock
|
||||
set key_item (bw list items --search "SSH Main" | jq ".[0]" --raw-output)
|
||||
set key_item_id (echo $key_item | jq ".id" --raw-output)
|
||||
set key1 (echo $key_item | jq ".attachments[0]" --raw-output)
|
||||
|
|
|
@ -1,11 +1,5 @@
|
|||
function upgrade --wraps=topgrade
|
||||
set -x NODE_OPTIONS "--no-deprecation"
|
||||
if not bw login --check
|
||||
set -x BW_SESSION (bw login --raw)
|
||||
end
|
||||
if not bw unlock --check
|
||||
set -x BW_SESSION (bw unlock --raw)
|
||||
end
|
||||
bwunlock
|
||||
{{- if get . "sudo" }}
|
||||
sudo ls >/dev/null
|
||||
{{- end }}
|
||||
|
|
Loading…
Reference in a new issue