General tidy-up
This commit is contained in:
parent
cdd0267527
commit
7f79985cd6
28
.bashrc
28
.bashrc
|
@ -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
1
.bashrc.d/space
Normal file
|
@ -0,0 +1 @@
|
|||
function space() { du -ahx --max-depth=1 | sort -h; } && export -f space
|
Binary file not shown.
Loading…
Reference in a new issue