dot

packages and services management
Log | Files | Refs | README

commit 4377a603116e76c8ff62beec07efaa1eec83d3d6
parent bc883795c36fffc4bb3f87effb2686277f6d640e
Author: Josuah Demangeonā  ā µ <mail@josuah.net>
Date:   Sun, 19 Mar 2017 00:15:47 +0100

replaced $FILTER with hardcoded iomenu

Diffstat:
M.profile | 19+++++++------------
Mbin/io-abduco | 4++--
Mbin/io-edit | 2+-
Mbin/io-man | 2+-
Mbin/io-mblaze | 2+-
Mbin/io-path | 17+++++++++--------
Mbin/io-run | 2+-
Mbin/io-setfont | 2+-
8 files changed, 23 insertions(+), 27 deletions(-)

diff --git a/.profile b/.profile @@ -7,13 +7,12 @@ export CONFIG="$(dirname "$(readlink ~/.profile)")" # build(1) package manager runtime variables [ "$CONFIG" ] && . "$CONFIG/bin/build" +export PLAN9="$HOME/9" # paths -export PATH="$CONFIG/bin:$PATH" export ENV="$HOME/.profile" export MAIL="$HOME/mail/INBOX" -export PLAN9="$HOME/9" -export PATH="$PATH:$PLAN9/bin" +export PATH="$CONFIG/bin:$PATH" # info export NAME='Josuah Demangeon' @@ -21,13 +20,9 @@ export EMAIL='mail@josuah.net' export TZ='Europe/Paris' # default commands -export EDITOR='ex' -export VISUAL='ex' EXRC="$HOME/.exrc" -export PAGER='less' -export MANPAGER='less -R' -export DVTM_PAGER='less -R' +export EDITOR='ex' VISUAL='ex' EXRC="$HOME/.exrc" +export PAGER='less' MANPAGER='less -R' DVTM_PAGER='less -R' export BROWSER='firefox' -export FILTER='iomenu' } @@ -58,12 +53,12 @@ alias ..='cd ..' alias j='jobs' # iomenu -alias a='FILTER="iomenu -l 10" io-abduco' +alias a='io-abduco' alias r='io-run' -alias e='FILTER="iomenu -l 10" io-edit' +alias e='io-edit' alias f='find ! -path "*/.git/*" -type f | iomenu -l 255' alias d='find ! -path "*/.git/*" -type d | iomenu -l 255' -alias c='cd "$(find -maxdepth 1 -type d | sed "s|^./||" | iomenu)"' +alias c='cd "$(io-path)"' # utilities alias myip='curl icanhazip.com' diff --git a/bin/io-abduco b/bin/io-abduco @@ -1,4 +1,4 @@ -# Prompt for an abduco session to attach to with $FILTER +# Prompt for an abduco session to attach if [ "$ABDUCO" ] then @@ -6,7 +6,7 @@ then exit 1 fi -name="$(abduco | tail -n +2 | $FILTER | sed -r 's/[^\t]*\t[^\t]*\t//')" +name="$(abduco | tail -n +2 | iomenu -l 10 | sed -r 's/[^\t]*\t[^\t]*\t//')" [ "$SSH_CLIENT$SSH_TTY$SSH_CONNECTION" ] && e='^\' || e='^Z' diff --git a/bin/io-edit b/bin/io-edit @@ -13,7 +13,7 @@ path() pwd )/${1##*/}" else - [ -f "$CACHE/io/files" ] && tac "$CACHE/files" | $FILTER + [ -f "$CACHE/io/files" ] && tac "$CACHE/files" | iomenu -l 10 fi | tee -a "$CACHE/io/files" } diff --git a/bin/io-man b/bin/io-man @@ -2,5 +2,5 @@ mandoc -a "$( IFS=':' - find $MANPATH ! -type d -name '*.[0-9]' | sort -u | $FILTER + find $MANPATH ! -type d -name '*.[0-9]' | sort -u | iomenu -l 255 )" diff --git a/bin/io-mblaze b/bin/io-mblaze @@ -5,7 +5,7 @@ choice="$( mlist "$dir" | mpick :u | msort -d | mthread | mscan -f '%D %24f %u%t%2i%120S' - done | $FILTER + done | iomenu -l 255 )" [ "$choice" ] || exit 0 diff --git a/bin/io-path b/bin/io-path @@ -1,17 +1,18 @@ # prompt for a path recursively -if [ -d "$1" ] +if [ "$1" = '.' ] then - cd "$1" -else - printf '%s/%s' "$PWD" "$1" + printf '%s' "$PWD" exit 0 -fi -if [ "$1" = '.' ] +elif [ -d "$1" ] then - printf '%s' "$PWD" + cd "$1" + +elif [ "$#" -gt 0 ] +then + printf '%s/%s' "$PWD" "$1" exit 0 fi -$0 "$(find . -maxdepth 1 | sed 's|^./||' | $FILTER)" || exit 1 +$0 "$(find . -maxdepth 1 | sed 's|^./||' | iomenu)" || exit 1 diff --git a/bin/io-run b/bin/io-run @@ -26,7 +26,7 @@ main() mkdir -p "$CACHE/io" cache - cmd="${1:-$($FILTER < "$CACHE/io/run")}" + cmd="${1:-$(iomenu < "$CACHE/io/run")}" [ "$cmd" ] || exit 1 exec $cmd diff --git a/bin/io-setfont b/bin/io-setfont @@ -1,4 +1,4 @@ -# set tty font using "$FILTER" +# set tty font using iomenu -l 255 setfont "$( while IFS='' read dir