aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMitchell Riedstra <mitch@riedstra.dev>2026-01-16 18:26:34 -0500
committerMitchell Riedstra <mitch@riedstra.dev>2026-01-16 18:26:34 -0500
commit4ce60dcb98a6ba4834fd05c62faee108dbf2a13a (patch)
treeae32bebcdd86ab35f890efed18bb4da7678f5036
parent2b1cc8a5be7fb65a6b4ceec56133daf92cc79ebe (diff)
downloaddotfiles-4ce60dcb98a6ba4834fd05c62faee108dbf2a13a.tar.gz
dotfiles-4ce60dcb98a6ba4834fd05c62faee108dbf2a13a.tar.xz
Clean up some of the unused cruft in kshrc
-rw-r--r--kshrc79
1 files changed, 1 insertions, 78 deletions
diff --git a/kshrc b/kshrc
index 10d3cf7..86c3107 100644
--- a/kshrc
+++ b/kshrc
@@ -148,23 +148,12 @@ set_ksh_competion() {
if [ -r ~/.passsword-store ] ; then
#shellcheck disable=SC2046
- set -A complete_pass -- show find otp grep \
- insert edit generate rm mv cp \
- $(showPasswordStore ~/.password-store)
-
- #shellcheck disable=SC2046
set -A complete_dpw_1 -- \
show copy type list ls mv cp rm edit otp fnd find insert
set -A complete_dpw_2 -- $(dpw list)
-
- #shellcheck disable=SC2046
- set -A complete_passenv -- \
- $(showPasswordStore ~/.password-store)
-
#shellcheck disable=SC2046
- set -A complete_dpwenv -- \
- $(showPasswordStore ~/.password-store)
+ set -A complete_dpwenv -- $(dpw list)
fi
@@ -175,8 +164,6 @@ set_ksh_competion() {
#shellcheck disable=SC2046
set -A complete_rsync -- $(showsshhosts | awk '{print $1}')
- set -A complete_setPrompt -- date time basic
-
}
# Usage debugstarttls $ipaddr:$port
@@ -216,12 +203,6 @@ path_list() {
echo "$PATH" | tr ':' '\n'
}
-set_nocaps() {
- setxkbmap -option ctrl:nocaps
- setxkbmap -option shift:breaks_caps
- setxkbmap -option numpad:microsoft
-}
-
# Usage: dir_oct:file_oct path
setperms() {
_perm="$1"; shift
@@ -258,20 +239,6 @@ showsshhosts() {
cat ~/.ssh/config ~/.ssh/inc/* 2>/dev/null | awk '/^[hH]ost /{$1=""; print $0}'
}
-showPasswordStore() {
-_passDir="$1" ; shift
-
-find "$_passDir" -type f -iname '*.gpg' \
-| while read -r _line; do
- _line="${_line##"$_passDir"}"
- _line="${_line#/}"
- _line="${_line%.gpg}"
- echo "$_line"
-done
-
-unset _passDir
-}
-
set_title() {
printf '\033]0;'"%s"'\007' "$1"
}
@@ -280,29 +247,6 @@ set_my_title() {
set_title "$(id -un)@$(hostname 2>/dev/null || cat /etc/hostname 2>/dev/null || cat /etc/myname 2>/dev/null)"
}
-_sys_memory() {
- ! [ -e "$(command -v vmstat)" ] && return
- if [ "$(uname)" = "Linux" ] ; then
- vmstat | tail -n1 | awk '{print $4/1024}' | sed -e's/\..*$//g'
- elif [ "$(uname)" = "FreeBSD" ] ; then
- vmstat | tail -n1 | awk '{print $5/1024}' | sed -e's/\..*$//g'
- elif [ "$(uname)" = "OpenBSD" ] ; then
- vmstat | sed -n '$p' | awk '{print $4}' | sed 's/M$//'
- fi
-}
-
-_sys_load() {
- # Works on BSD too, neat.
- uptime | sed -E 's/^.*load averages?: ([0-9]+\.[0-9]+).*$/\1/g'
-}
-
-_sys_uptime() {
- # Took awhile to figure out, but this works on BSD as well
- uptime | sed -E -e's/^.*up[ ]+//g' -e's/^([^,]*),.*/\1/g' \
- -e's/^([^ ]+)[ ]*(.).*/\1\2/g'
-}
-
-
timestamp() {
date +%m.%d.%y_%H.%M.%S
}
@@ -386,15 +330,6 @@ checkSSHAgentGPG() {
export SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)"
}
-# calls pass and dumps the contents of the password into your environment
-passenv() {
- _f="$(mktemp)"
- pass "$@" > "$_f"
- #shellcheck disable=SC1090
- . "$_f"
- rm -f "$_f"
-}
-
# calls dpw ( https://git.riedstra.dev/mitch/dpw ) and dumps the contents of the
# password into your environment
dpwenv() {
@@ -502,17 +437,6 @@ gpgTmpDir() {
set +x
}
-setcolorterminal() {
- case $TERM in
- xterm*)
- export TERM=xterm-256color
- ;;
- screen*)
- export TERM=screen-256color
- ;;
- esac
-}
-
setlscolors() {
if [ "$(uname)" = "Linux" ] ; then
export LS_COLORS='di=36;40:ln=1;31;40:so=32;40:pi=33;40:ex=1;32;40:bd=34;46:cd=34;43:su=0;41:sg=0;46:tw=0;42:ow=0;43:'
@@ -609,7 +533,6 @@ fi
setcolor() {
colormanpages
- setcolorterminal
setcoloraliases
setlscolors
}