config

OpenBSD system configuration
git clone git://jacobedwards.org/config
Log | Files | Refs | README

commit 95860d8adebb4eb90152f4167594f9652f6eb1bc
parent 82658bb662c20de3f4034d7288d889192565e88e
Author: Jacob R. Edwards <jacobouno@protonmail.com>
Date:   Thu, 31 Dec 2020 13:34:00 -0800

Fix and improve ets

- Use rc(1)'s eval builtin to process the selection allowing the use
  of variables.

- Pass ets the goto shell function's arguments.

- Use more m4 defines and shorten them to a single character.

Diffstat:
Mmodules/ets/.config/ets | 24++++++++++++++----------
Mmodules/scripts/.local/bin/ets | 6+++---
Mmodules/shell/.config/shell/cd | 3+--
3 files changed, 18 insertions(+), 15 deletions(-)

diff --git a/modules/ets/.config/ets b/modules/ets/.config/ets @@ -1,11 +1,15 @@ -define(SRC,~/own/src) +define(H,$HOME) +define(O,H/own) +define(S,O/src) +define(C,S/c) +define(L,H/.local) -/etc/ssh ssh config -SRC programming projects -SRC/awk/kjv2 awk bible processor -SRC/c c projects -SRC/c/gopher/gawk gopher client -~/.local/var/mpd/m3u mpd m3u playlists -~/own/config system configurations -~/own/src/fork software forks -~/own/text/note random notes +/etc/ssh ssh config +C c projects +C/gopher/gawk gopher client +L/var/mpd/m3u mpd m3u playlists +O/config unix stow configurations +O/text/note random notes +S programming projects +S/awk/kjv2 awk bible processor +S/fork software forks diff --git a/modules/scripts/.local/bin/ets b/modules/scripts/.local/bin/ets @@ -2,6 +2,6 @@ #! ets -- evaluated tag selection if (test $#* -eq 0) { - filter = dmenu; -} else filter = egrep $* -m4 -D'~'=$HOME $XDG_CONFIG_HOME/goto | column -ts' ' | $filter | cut -f1 -d' ' + fn filter { dmenu $* }; +} else fn filter { egrep $* }; +eval echo `{ m4 $XDG_CONFIG_HOME/`{ basename $0 } | column -ts' ' | filter $* | cut -f1 -d' ' } diff --git a/modules/shell/.config/shell/cd b/modules/shell/.config/shell/cd @@ -21,5 +21,4 @@ cdr() { cd ${d:?No match} } -# chdir to goto script result -goto() { cd `command goto` ;} +goto() { cd "`ets $*`" ;}