zshrc: Move readme() to its own file
authorFrank Terbeck <ft@bewatermyfriend.org>
Mon, 28 Nov 2011 21:29:34 +0000 (22:29 +0100)
committerMichael Prokop <mika@grml.org>
Tue, 6 Dec 2011 13:50:45 +0000 (14:50 +0100)
Signed-off-by: Frank Terbeck <ft@bewatermyfriend.org>
etc/zsh/zshrc
usr_share_grml/zsh/functions/readme [new file with mode: 0644]

index 4c48269..3e02570 100644 (file)
@@ -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 (file)
index 0000000..5400113
--- /dev/null
@@ -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