dot

packages and services management
Log | Files | Refs | README

commit a50ed32b76c3582e155e9f9c876d20cbc93d1586
parent 521086fc7ff285d2837b2822f86013a603fe58d6
Author: josuah <mail@josuah.net>
Date:   Tue, 25 Oct 2016 12:48:17 -0400

Merge branch 'master' of http://github.com/josuah/Config

Diffstat:
Mbin/buffers | 18+++++++++++-------
1 file changed, 11 insertions(+), 7 deletions(-)

diff --git a/bin/buffers b/bin/buffers @@ -24,20 +24,24 @@ COMMAND # # Update the cache and get the command to run. # -get_command() +commands() { # Get or create the cache file - cache="${XDG_CACHE_HOME:-$HOME/.cache}" - mkdir -p "$cache" - cache="$cache/dmenu_run" + cache="${XDG_CACHE_HOME:-$HOME/.cache}/dmenu_run" + mkdir -p "${cache%/*}" # Get the command name from cache or stest - if IFS=':' stest -dqr -n "$cache" $PATH + # + IFS=':' + + if stest -dqr -n "$cache" $PATH then stest -flx $PATH | sort -u | tee "$cache" else tee < "$cache" - fi | iomenu + fi + + unset IFS } # @@ -67,7 +71,7 @@ run() printf '\033[1A' 1>&2 # Get command arguments and the session name - [ -z "$cmd" ] && cmd="$(get_command)" + [ -z "$cmd" ] && cmd="$(commands | iomenu)" case "$cmd" in