From: Frank Terbeck Date: Mon, 28 Nov 2011 21:29:34 +0000 (+0100) Subject: zshrc: Move readme() to its own file X-Git-Url: https://git.grml.org/?a=commitdiff_plain;h=4222103884ac723313949b910a3da71a7d1f451a;p=grml-etc-core.git zshrc: Move readme() to its own file Signed-off-by: Frank Terbeck --- diff --git a/etc/zsh/zshrc b/etc/zsh/zshrc index f36ba40..0e1c46f 100644 --- a/etc/zsh/zshrc +++ b/etc/zsh/zshrc @@ -3217,20 +3217,6 @@ vman() { man "$@" | col -b | view -c 'set ft=man nomod nolist' - } -# function readme() { $PAGER -- (#ia3)readme* } -#f5# View all README-like files in current directory in pager -readme() { - emulate -L zsh - setopt extendedglob - local files - files=(./(#i)*(read*me|lue*m(in|)ut|lies*mich)*(NDr^/=p%)) - if (($#files)) ; then - $PAGER $files - else - print 'No README files.' - fi -} - # TODO: So, this is the third incarnation of this function!? #f5# Reload given functions refunc() { diff --git a/usr_share_grml/zsh/functions/readme b/usr_share_grml/zsh/functions/readme new file mode 100644 index 0000000..5400113 --- /dev/null +++ b/usr_share_grml/zsh/functions/readme @@ -0,0 +1,11 @@ +# View all README-like files in current directory in pager +emulate -L zsh + +setopt extendedglob +local files +files=(./(#i)*(read*me|lue*m(in|)ut|lies*mich)*(NDr^/=p%)) +if (($#files)) ; then + $PAGER $files +else + print 'No README files.' +fi