X-Git-Url: https://src.twobees.de/?a=blobdiff_plain;f=stow%2Foh-my-zsh%2F.oh-my-zsh%2Fplugins%2Fzsh-navigation-tools%2Fn-panelize;fp=stow%2Foh-my-zsh%2F.oh-my-zsh%2Fplugins%2Fzsh-navigation-tools%2Fn-panelize;h=0000000000000000000000000000000000000000;hb=1a8e170bbe5c6641a26ab1ce2e6ce6c5c1faa4cd;hp=e2b567f2ef32538bd61ab86bb07a4be54bcad438;hpb=475ba35502579302593f4735c853c49ef1845dcb;p=dotfiles.git diff --git a/stow/oh-my-zsh/.oh-my-zsh/plugins/zsh-navigation-tools/n-panelize b/stow/oh-my-zsh/.oh-my-zsh/plugins/zsh-navigation-tools/n-panelize deleted file mode 100644 index e2b567f..0000000 --- a/stow/oh-my-zsh/.oh-my-zsh/plugins/zsh-navigation-tools/n-panelize +++ /dev/null @@ -1,68 +0,0 @@ -# Copy this file into /usr/share/zsh/site-functions/ -# and add 'autoload n-panelize` to .zshrc -# -# This function somewhat reminds the panelize feature from Midnight Commander -# It allows browsing output of arbitrary command. Example usage: -# v-panelize ls /usr/local/bin -# -# Uses n-list - -emulate -L zsh - -setopt extendedglob -zmodload zsh/curses - -local IFS=" -" - -unset NLIST_COLORING_PATTERN - -[ -f ~/.config/znt/n-list.conf ] && builtin source ~/.config/znt/n-list.conf -[ -f ~/.config/znt/n-panelize.conf ] && builtin source ~/.config/znt/n-panelize.conf - -local list -local selected - -NLIST_REMEMBER_STATE=0 - -if [ -t 0 ]; then - # Check if there is proper input - if [ "$#" -lt 1 ]; then - echo "Usage: n-panelize {command} [option|argument] ... or command | n-panelize" - return 1 - fi - - # This loop makes script faster on some Zsh's (e.g. 5.0.8) - repeat 1; do - list=( `"$@"` ) - done - - # TODO: $? doesn't reach user - [ "$?" -eq 127 ] && return $? -else - # Check if can reattach to terminal - if [[ ! -c /dev/tty && ! -t 2 ]]; then - echo "No terminal available (no /dev/tty)" - return 1 - fi - - # This loop makes script faster on some Zsh's (e.g. 5.0.8) - repeat 1; do - list=( "${(@f)"$(<&0)"}" ) - done - - if [[ ! -c /dev/tty ]]; then - exec <&2 - else - exec