zshrc: add default values to changed() and new()
[grml-etc-core.git] / etc / zsh / zshrc
index 04645d7..d8bb453 100644 (file)
@@ -3496,16 +3496,16 @@ regcheck() {
     pcre_match $2 && echo "regex matches" || echo "regex does not match"
 }
 
-#f5# List files which have been changed within the last {\it n} days
+#f5# List files which have been changed within the last {\it n} days, {\it n} defaults to 1
 changed() {
     emulate -L zsh
-    print -l *(c-$1)
+    print -l *(c-${1:1})
 }
 
-#f5# List files which have been modified within the last {\it n} days
+#f5# List files which have been modified within the last {\it n} days, {\it n} defaults to 1
 new() {
     emulate -L zsh
-    print -l *(m-$1)
+    print -l *(m-${1:1})
 }
 
 #f5# Grep in history