dot

packages and services management
Log | Files | Refs | README

commit bc883795c36fffc4bb3f87effb2686277f6d640e
parent 14a15485d988fec75f4ba9e9840851ce4fc80b2b
Author: Josuah Demangeonā  ā µ <mail@josuah.net>
Date:   Sat, 18 Mar 2017 16:19:20 +0100

added io-path

Diffstat:
M.profile | 11++++++-----
Abin/io-path | 17+++++++++++++++++
2 files changed, 23 insertions(+), 5 deletions(-)

diff --git a/.profile b/.profile @@ -50,6 +50,7 @@ PS3=': ' # core +alias p='io-path' alias l='ls -lhF' alias la='ls -lhFA' alias cl='printf "\033[H\033[2J"' @@ -57,12 +58,12 @@ alias ..='cd ..' alias j='jobs' # iomenu -alias a='io-abduco' +alias a='FILTER="iomenu -l 10" io-abduco' alias r='io-run' -alias e='io-edit' -alias f='find ! -path "*/.git/*" -type f | iomenu' -alias d='find ! -path "*/.git/*" -type d | iomenu' -alias c='cd "$(find ! -path "*/.git/*" -type d | iomenu)"' +alias e='FILTER="iomenu -l 10" 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)"' # utilities alias myip='curl icanhazip.com' diff --git a/bin/io-path b/bin/io-path @@ -0,0 +1,17 @@ +# prompt for a path recursively + +if [ -d "$1" ] +then + cd "$1" +else + printf '%s/%s' "$PWD" "$1" + exit 0 +fi + +if [ "$1" = '.' ] +then + printf '%s' "$PWD" + exit 0 +fi + +$0 "$(find . -maxdepth 1 | sed 's|^./||' | $FILTER)" || exit 1