From 16e9ec67e0c4dbe11464ffc13a49f82bddabfa9e Mon Sep 17 00:00:00 2001 From: Carsten Hey Date: Mon, 15 Mar 2010 00:04:24 +0100 Subject: [PATCH] zshrc: add function changed() Signed-off-by: Carsten Hey --- doc/grmlzshrc.t2t | 4 ++++ etc/zsh/zshrc | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/doc/grmlzshrc.t2t b/doc/grmlzshrc.t2t index a1f6195..1837a98 100644 --- a/doc/grmlzshrc.t2t +++ b/doc/grmlzshrc.t2t @@ -456,6 +456,10 @@ If the original cdrecord is not installed, issues a warning to the user to use the wodim binary instead. Wodim is the debian fork of Joerg Schillings cdrecord. +: **changed()** +Lists files in current directory, which have been changed within the +last N days. N is an integer required as first and only argument. + : **check_com()** Returns true if given command exists either as program, function, alias, builtin or reserved word. If the option -c is given, only returns true, diff --git a/etc/zsh/zshrc b/etc/zsh/zshrc index efc2bc8..04645d7 100644 --- a/etc/zsh/zshrc +++ b/etc/zsh/zshrc @@ -3496,6 +3496,12 @@ 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 +changed() { + emulate -L zsh + print -l *(c-$1) +} + #f5# List files which have been modified within the last {\it n} days new() { emulate -L zsh -- 2.1.4