From f1005a112b5cb847d70593235f65f3901a23f48c Mon Sep 17 00:00:00 2001 From: Frank Terbeck Date: Mon, 28 Nov 2011 22:29:34 +0100 Subject: [PATCH] zshrc: Move readme() to its own file Signed-off-by: Frank Terbeck --- etc/zsh/zshrc | 14 -------------- usr_share_grml/zsh/functions/readme | 11 +++++++++++ 2 files changed, 11 insertions(+), 14 deletions(-) create mode 100644 usr_share_grml/zsh/functions/readme diff --git a/etc/zsh/zshrc b/etc/zsh/zshrc index 4c48269..3e02570 100644 --- a/etc/zsh/zshrc +++ b/etc/zsh/zshrc @@ -3218,20 +3218,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 -- 2.1.4