dot

packages and services management
Log | Files | Refs | README

commit 8fb6ec1c1a363b69c913b7f6558cc84373e5b1f3
parent 2f0eee130a92fcd3cb4e5efb5f243b4d9e14c1af
Author: josuah <mail@josuah.net>
Date:   Sun, 30 Oct 2016 02:16:36 -0400

Cleanups

Diffstat:
Mbin/buffers | 24++++++++++++------------
Mshell/.profile | 10+++-------
Mvim/.vim/vimrc | 2+-
3 files changed, 16 insertions(+), 20 deletions(-)

diff --git a/bin/buffers b/bin/buffers @@ -42,7 +42,8 @@ get_path() { local type="$1" - find "$HOME/" -type "$type" ! -path '*/.git/*' ! -name '.git' | iomenu + find "$HOME/" -type "$type" ! -path '*/.git/*' ! -name '.git' | + iomenu -l 256 } # @@ -56,7 +57,7 @@ get_command() printf '\033[1A' 1>&2 # get command arguments and the session name - [ -z "$command" ] && command="$(iomenu -c < $CACHE)" + [ -z "$command" ] && command="$(iomenu -c -l 256 < $CACHE)" printf %s "$command" } @@ -66,14 +67,13 @@ get_command() # get_name() { - local command="$1" - local path="$(cd "$2"; pwd)" + local command="$1" path="$(cd "$2"; pwd)" path="~${path#$HOME}" name="$command${path:+ $path}" # set terminal's name - printf '\033]0;%s\007' "$name" + printf '\033]0;%s\007' "$name" 1>&2 # return the result without forbidden characters printf %s "$name" | tr / ! @@ -84,9 +84,7 @@ get_name() # run() { - local command="$1" - local options - local path + local command="$1" options path case "$command" in @@ -139,9 +137,11 @@ run() ;; esac + name="$(get_name "$command" "$path")" + # run new or existing abduco session with this name - TERM='screen' ABDUCO="$command" abduco -e '^z' \ - -A "$(get_name "$command" "$path")" $command $options + TERM='screen' ABDUCO="$command" abduco -e '^z' -A "$name" \ + $command $options } # @@ -190,8 +190,8 @@ main() esac # reset the screen, print reminder of current sessions - #printf '\033[2J\033[0;0f\033[0m\n' - #abduco | tr ! / | sort -t "$TAB" -k 3 | sed 1d + printf '\033[2J\033[0;0f\033[0m\n' + abduco | tr ! / | sort -t "$TAB" -k 3 | sed 1d } main $@ diff --git a/shell/.profile b/shell/.profile @@ -13,14 +13,10 @@ . ~/.config/shell/functions -# VARIABLES -#------------------------------------------------------------------------------- - - # PROMPT #------------------------------------------------------------------------------- -export PS1='$( +PS1='$( code="$?" # Error code @@ -34,8 +30,8 @@ export PS1='$( # Update tmux status line at each new prompt [ "$TMUX" ] && tmux refresh-client -S )' -export PS2=' > ' -export PS3=' > ' +PS2=' > ' +PS3=' > ' # ALIAS diff --git a/vim/.vim/vimrc b/vim/.vim/vimrc @@ -50,7 +50,7 @@ nmap <Leader>b :pwd \| echo '' \| ls \| echo ''<CR>:b nmap <Leader>T :pwd \| echo '' \| tabs \| echo ''<CR>:tab nmap <Leader>c :pwd \| echo '' \| clist \| echo ''<CR> nmap <Leader>C :cwindow<CR>:set nocursorline<CR> -nmap <Leader>t :pwd \| echo '' \| tags \| echo ''<CR>:tag +nmap <Leader>t :pwd \| echo '' \| tags \| echo ''<CR>:tag<space> nmap <Leader>" : echo '' \| registers <CR> nmap <Leader>' : echo '' \| marks <CR>:' nmap <Leader>m :silent make \| redraw! \| clist<CR>