commit cec685eacdb0350dda90fa1ce1dbac1917447355
parent d8bfc205c44cb5a750103713e039c80acc2ec010
Author: Jacob R. Edwards <jacobouno@protonmail.com>
Date: Thu, 1 Apr 2021 19:04:31 -0700
Slim and clean shell modules
- Assume plan9port is installed
- Merge aliases, fs, and xorg into the new simple module
- Remove `x' and `z' functions
- Rename the sed function to esed, to act like egrep is to grep
Diffstat:
7 files changed, 32 insertions(+), 39 deletions(-)
diff --git a/local/ksh/.config/ksh.kshrc b/local/ksh/.config/ksh.kshrc
@@ -12,4 +12,4 @@ PS4='4> '
mkdir -p "$(dirname $HISTFILE)"
eval "$(sed 's/^/alias -d /' <"$XDG_CONFIG_HOME/dalias")"
. include
-include aliases cd etc fs hist mpc openbsd private xorg
+include aliases cd history mpc openbsd private
diff --git a/local/shell/.local/share/shell/aliases b/local/shell/.local/share/shell/aliases
@@ -1,21 +0,0 @@
-# simple shell functions
-
-ap() apropos "$@"
-curl() command curl -sS "$@"
-date() command date "${@:-+%F %T %z}"
-doas() command doas -- "$@"
-dsu() doas su "$@"
-fn() functions "$@"
-grep() egrep "$@"
-reload() . "${ENV:?unset}"
-esed() sed -E "$@"
-tolower() tr '[:upper:]' '[:lower:]'
-toupper() tr '[:lower:]' '[:upper:]'
-
-c() command "$@"
-d() doas "$@"
-e() egrep "$@"
-f() $EDITOR "$@"
-g() git "$@"
-l() $PAGER "$@"
-t() tmux "$@"
diff --git a/local/shell/.local/share/shell/fs b/local/shell/.local/share/shell/fs
@@ -1,6 +0,0 @@
-# filesystem shell functions
-
-ls() command ls -1A "$@"
-lc() { ls "$@" | rs ;}
-sfind() find . -maxdepth 1 "$@"
-fp() f `which "${@:?No path specified}" 2>/dev/null`
diff --git a/local/shell/.local/share/shell/hist b/local/shell/.local/share/shell/hist
@@ -1,5 +0,0 @@
-# history shell functions
-
-hm() { eval "$(hs "$@" | dmenu)" ;}
-hs() egrep "${@:-.}" "$HISTFILE"
-k() r
diff --git a/local/shell/.local/share/shell/history b/local/shell/.local/share/shell/history
@@ -0,0 +1,5 @@
+# history shell functions
+
+hl() cat "$HISTFILE"
+hs() { hl | egrep "$@"; }
+k() r
diff --git a/local/shell/.local/share/shell/simple b/local/shell/.local/share/shell/simple
@@ -0,0 +1,26 @@
+# simple shell functions
+
+ap() apropos "$@"
+curl() command curl -sS "$@"
+date() command date "${@:-+%F %T %z}"
+doas() command doas -- "$@"
+dsu() doas su "$@"
+dump() grab -out "$@"
+esed() sed -E "$@"
+fn() functions "$@"
+fp() f `which "${@:?No path specified}" 2>/dev/null`
+grab() xclip -selection clipboard "$@"
+grep() egrep "$@"
+ls() 9 ls "$@"
+reload() . "${ENV:?unset}"
+sfind() find . -maxdepth 1 "$@"
+tolower() tr '[:upper:]' '[:lower:]'
+toupper() tr '[:lower:]' '[:upper:]'
+
+c() command "$@"
+d() doas "$@"
+e() egrep "$@"
+f() $EDITOR "$@"
+g() git "$@"
+l() $PAGER "$@"
+t() tmux "$@"
diff --git a/local/shell/.local/share/shell/xorg b/local/shell/.local/share/shell/xorg
@@ -1,6 +0,0 @@
-# xorg shell functions
-
-dump() grab -out "$@"
-grab() xclip -selection clipboard "$@"
-x() startx "$@"
-z() zathura "$@"