update sops functions

This commit is contained in:
Amarpreet Minhas 2024-12-28 17:43:43 -05:00
parent 1c50bbd263
commit 5717a8e24b

View file

@ -2,14 +2,10 @@
# Check if the shell is non-interactive
if [[ $- != *i* ]]; then
# Shell is non-interactive. Be done now!
return
fi
# Ignore duplicate commands and commands starting with a space for Bash history
HISTCONTROL=ignoredups:ignorespace
# Bash History file size
HISTSIZE=100000
HISTFILESIZE=2000000
@ -55,5 +51,6 @@ bash ~/.motd
# quick writing funcs
function unlock() { export SOPS_AGE_KEY=$(age -d ${HOME}/.age/privkey.age); }
function write() { SOPS_AGE_KEY=${SOPS_AGE_KEY} sops $1; }
function j() { SOPS_AGE_KEY=${SOPS_AGE_KEY} sops ${HOME}/journal/$(date +%Y%m%d).txt; }
function write() { SOPS_AGE_KEY=${SOPS_AGE_KEY} EDITOR='vim -c "Goyo"' sops $1; }
function j() { SOPS_AGE_KEY=${SOPS_AGE_KEY} EDITOR='vim -c "Goyo"' sops ${HOME}/journal/$(date +%Y%m%d).txt; }
function lock() { unset SOPS_AGE_KEY; }