Add repl plug in vim, update zsh, starship

This commit is contained in:
Smirnov Alexander 2021-05-16 12:13:21 +03:00
parent 04331d3e94
commit 5cf28d635b
5 changed files with 31 additions and 28 deletions

20
bin/gpe
View file

@ -1,18 +1,20 @@
#!/usr/bin/env bash
# For working this script set in $GPG_KEY you gpg key
# For working this script set $GPG_KEY with gpg key
## Functions
function encrypt() {
encrypt() {
gpg -ea -r $GPG_KEY $@
}
function decrypt() {
local fn="$1"
if [ ${fn: -4} == ".asc" ]
then gpg -d -o ${fn%%.asc} $@
elif [ ${fn: -4} == ".gpg" ]
then gpg -d -o ${fn%%.gpg} $@
fi
decrypt() {
local f="$1"
if [ ${f: -4} == ".asc" ]
then gpg -d -o ${f%%.asc} $@
elif [ ${f: -4} == ".gpg" ]
then gpg -d -o ${f%%.gpg} $@
fi
}
## Case's
case "$1" in
enc|e) shift; encrypt $@ ;;
dec|d) shift; decrypt $@ ;;