commit 75854d7c37fa32fa3a30385577d7f88a7341391d
parent 98c1e46e14f16f2a41d9ae912844d5a2a0769578
Author: Alex Balgavy <EMAIL>
Date: Thu, 6 Jun 2019 15:53:32 +0200
commonprofile: move otp to separate script
I need the bash version of read.
Former-commit-id: 4ce3c1d8c16cfa00d567a92155c7702ab39faa04
Diffstat:
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/scripts/otp b/scripts/otp
@@ -0,0 +1,3 @@
+#!/usr/bin/env bash
+# Generate OTP passwords (google authenticator alternative)
+read -sp "Key: " k && oathtool --totp --base32 "$k"
diff --git a/shell/commonprofile b/shell/commonprofile
@@ -156,7 +156,6 @@ todos() { if [ -z "$1" ]; then 1="."; fi; grep -rnw "$1" -e "TODO"; } # Fi
find_in_files() { grep -rnw "$1" -e "$2"; } # Search for text in files
hr() { for ((i=0; i<$(tput cols); i++)); do echo -n "#"; done; echo; } # Insert a <hr> in the terminal
vimq() { vim -q <($(fc -nl -1)); } # Load results of last command (often ag) in vim quickfix
-otp() { command read -sp "Key: " k && oathtool --totp --base32 "$k"; } # Generate OTP passwords (google authenticator alternative)
# Pip3 upgrade packages
pip3_upgrade() { pip3 list --outdated | cut -d ' ' -f1 | xargs -n1 pip3 install -U; }