General tidy-up

This commit is contained in:
Scott Wallace 2023-04-27 14:49:01 +01:00
parent cdd0267527
commit 7f79985cd6
Signed by: scott
GPG key ID: AA742FDC5AFE2A72
3 changed files with 1 additions and 28 deletions

28
.bashrc
View file

@ -18,27 +18,6 @@ pathadd() {
}
#--------------------------------------------------------------------------------
#--------------------------------------------------------------------------------
# Decrypt stored keys
#--------------------------------------------------------------------------------
getkey() {
KEYFILE=~/.keys/${1}
if [ -f "${KEYFILE}" ]; then
if [ -x /usr/bin/security ]; then
PASS=$(/usr/bin/security find-internet-password -l ssh:scott@wallace.sh -gw)
else
read -rsp "Password: " PASS
echo
fi
openssl rsautl -decrypt -inkey ~/.ssh/scott@wallace.sh -passin "pass:${PASS}" -in "${KEYFILE}" 2>/dev/null
else
echo "No such key" >&2
fi
}
#--------------------------------------------------------------------------------
#--------------------------------------------------------------------------------
# The best editor
#--------------------------------------------------------------------------------
@ -82,13 +61,6 @@ export PROMPT_COMMAND=__PROMPT_COMMAND
#--------------------------------------------------------------------------------
# Command alias functions
#--------------------------------------------------------------------------------
function datafart() { curl --data-binary @- datafart.com; } && export -f datafart
function space() { du -ahx --max-depth=1 | sort -h; } && export -f space
if ! alias ll >/dev/null 2>&1; then function ll() { ls -l "${@}"; } && export -f ll; fi
[[ ! -x $(which psgrep 2>/dev/null) ]] && function psgrep() { ps -ef | grep "${@}" | grep -v ${$}; } && export -f psgrep
# [[ -x $(which glances 2>/dev/null) ]] && function top() { glances; } && export -f top
[[ -x $(which tree 2>/dev/null) ]] && alias tree="tree -AQh --du"
GIT_SSH_COMMAND="$(which ssh) -o RemoteCommand=none"
export GIT_SSH_COMMAND
#--------------------------------------------------------------------------------

1
.bashrc.d/space Normal file
View file

@ -0,0 +1 @@
function space() { du -ahx --max-depth=1 | sort -h; } && export -f space

Binary file not shown.