zshrc: Move readme() to its own file
[grml-etc-core.git] / usr_share_grml / zsh / functions / readme
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