dot

packages and services management
Log | Files | Refs | README

commit 869c5f65931097ac74473684a9c760ebe3a909c6
parent 4377a603116e76c8ff62beec07efaa1eec83d3d6
Author: Josuah Demangeonā  ā µ <mail@josuah.net>
Date:   Sun, 19 Mar 2017 02:19:30 +0100

re-organised .profile a bit

Diffstat:
M.profile | 13+++++++------
Mbin/io-run | 4++++
2 files changed, 11 insertions(+), 6 deletions(-)

diff --git a/.profile b/.profile @@ -3,21 +3,18 @@ [ "$CONFIG" ] || { +# sources 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:$PLAN9/bin" export ENV="$HOME/.profile" export MAIL="$HOME/mail/INBOX" -export PATH="$CONFIG/bin:$PATH" # info -export NAME='Josuah Demangeon' -export EMAIL='mail@josuah.net' -export TZ='Europe/Paris' +export NAME='Josuah Demangeon' EMAIL='mail@josuah.net' TZ='Europe/Paris' # default commands export EDITOR='ex' VISUAL='ex' EXRC="$HOME/.exrc" @@ -64,6 +61,10 @@ alias c='cd "$(io-path)"' alias myip='curl icanhazip.com' alias lines='find . -name "*.[ch]" | xargs wc -l | sort -g' alias ix='curl -F "f:1=<-" ix.io' +alias count='echo "$(( + $(git diff | grep "^+" | wc -l) - + $(git diff | grep "^-" | wc -l) +))"' if [ "$TERM" = 'linux' ] diff --git a/bin/io-run b/bin/io-run @@ -26,9 +26,13 @@ main() mkdir -p "$CACHE/io" cache + + printf '\033[s\033[H' 1>&2 cmd="${1:-$(iomenu < "$CACHE/io/run")}" + printf '\033[u' 1>&2 [ "$cmd" ] || exit 1 + exec $cmd }