X-Git-Url: https://src.twobees.de/?a=blobdiff_plain;f=stow%2Foh-my-zsh%2F.oh-my-zsh%2Fplugins%2Fcolored-man-pages%2Fcolored-man-pages.plugin.zsh;fp=stow%2Foh-my-zsh%2F.oh-my-zsh%2Fplugins%2Fcolored-man-pages%2Fcolored-man-pages.plugin.zsh;h=0000000000000000000000000000000000000000;hb=1a8e170bbe5c6641a26ab1ce2e6ce6c5c1faa4cd;hp=981992d88e01a9f6484a25b80955bb36590047c8;hpb=475ba35502579302593f4735c853c49ef1845dcb;p=dotfiles.git diff --git a/stow/oh-my-zsh/.oh-my-zsh/plugins/colored-man-pages/colored-man-pages.plugin.zsh b/stow/oh-my-zsh/.oh-my-zsh/plugins/colored-man-pages/colored-man-pages.plugin.zsh deleted file mode 100644 index 981992d..0000000 --- a/stow/oh-my-zsh/.oh-my-zsh/plugins/colored-man-pages/colored-man-pages.plugin.zsh +++ /dev/null @@ -1,53 +0,0 @@ -# Requires colors autoload. -# See termcap(5). - -# Set up once, and then reuse. This way it supports user overrides after the -# plugin is loaded. -typeset -AHg less_termcap - -# bold & blinking mode -less_termcap[mb]="${fg_bold[red]}" -less_termcap[md]="${fg_bold[red]}" -less_termcap[me]="${reset_color}" -# standout mode -less_termcap[so]="${fg_bold[yellow]}${bg[blue]}" -less_termcap[se]="${reset_color}" -# underlining -less_termcap[us]="${fg_bold[green]}" -less_termcap[ue]="${reset_color}" - -# Handle $0 according to the standard: -# https://zdharma-continuum.github.io/Zsh-100-Commits-Club/Zsh-Plugin-Standard.html -0="${${ZERO:-${0:#$ZSH_ARGZERO}}:-${(%):-%N}}" -0="${${(M)0:#/*}:-$PWD/$0}" - -# Absolute path to this file's directory. -typeset -g __colored_man_pages_dir="${0:A:h}" - -function colored() { - local -a environment - - # Convert associative array to plain array of NAME=VALUE items. - local k v - for k v in "${(@kv)less_termcap}"; do - environment+=( "LESS_TERMCAP_${k}=${v}" ) - done - - # Prefer `less` whenever available, since we specifically configured - # environment for it. - environment+=( PAGER="${commands[less]:-$PAGER}" ) - - # See ./nroff script. - if [[ "$OSTYPE" = solaris* ]]; then - environment+=( PATH="${__colored_man_pages_dir}:$PATH" ) - fi - - command env $environment "$@" -} - -# Colorize man and dman/debman (from debian-goodies) -function man \ - dman \ - debman { - colored $0 "$@" -}