Skip to content

Commit

Permalink
zshrc: Remove regcheck
Browse files Browse the repository at this point in the history
Signed-off-by: Frank Terbeck <ft@bewatermyfriend.org>
  • Loading branch information
ft authored and mika committed Dec 6, 2011
1 parent 8e9aced commit 0a79afd
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 14 deletions.
4 changes: 0 additions & 4 deletions doc/grmlzshrc.t2t
Expand Up @@ -721,10 +721,6 @@ ZSH_PROFILE_RC above).
: **refunc()**
Reloads functions given as parameters.

: **regcheck()**
Checks whether a regular expression (first parameter) matches a string
(second parameter) using perl.

: **salias()**
Creates an alias whith sudo prepended, if $EUID is not zero. Run "salias -h"
for details. See also xunfunction() below.
Expand Down
10 changes: 0 additions & 10 deletions etc/zsh/zshrc
Expand Up @@ -2842,16 +2842,6 @@ makereadable() {
ps2pdf $output
}

# zsh with perl-regex - use it e.g. via:
# regcheck '\s\d\.\d{3}\.\d{3} Euro' ' 1.000.000 Euro'
#f5# Checks whether a regex matches or not.\\&\quad Example: \kbd{regcheck '.\{3\} EUR' '500 EUR'}
regcheck() {
emulate -L zsh
zmodload -i zsh/pcre
pcre_compile $1 && \
pcre_match $2 && echo "regex matches" || echo "regex does not match"
}

#f5# List files which have been accessed within the last {\it n} days, {\it n} defaults to 1
accessed() {
emulate -L zsh
Expand Down

0 comments on commit 0a79afd

Please sign in to comment.