zshrc: Remove peval and calc
authorFrank Terbeck <ft@bewatermyfriend.org>
Tue, 29 Nov 2011 13:47:02 +0000 (14:47 +0100)
committerMichael Prokop <mika@grml.org>
Tue, 6 Dec 2011 13:50:47 +0000 (14:50 +0100)
Signed-off-by: Frank Terbeck <ft@bewatermyfriend.org>
doc/grmlzshrc.t2t
etc/zsh/zshrc

index db4239b..3792c17 100644 (file)
@@ -609,10 +609,6 @@ Example usages:
 % ls -l *(e:'nt /reference/file':)
 ```
 
-: **peval()**
-Evaluates a perl expression; useful as command line
-calculator, therefore also available as "calc".
-
 : **profile()**
 Runs a command in $SHELL with profiling enabled (See startup variable
 ZSH_PROFILE_RC above).
@@ -785,10 +781,6 @@ available packages are fetched from the location(s) specified in
 /etc/apt/sources.list. An update should always be performed before an
 upgrade or dist-upgrade; run by sudo, if necessary.
 
-: **calc** (//peval//)
-Evaluates a perl expression (see peval() above); useful as a command line
-calculator.
-
 : **CH** (//./configure --help//)
 Lists available compilation options for building program from source.
 
index d60a208..933f7ab 100644 (file)
@@ -2218,14 +2218,6 @@ hex() {
     [[ -n "$1" ]] && printf "%x\n" $1 || { print 'Usage: hex <number-to-convert>' ; return 1 }
 }
 
-# calculate (or eval at all ;-)) with perl => p[erl-]eval
-# hint: also take a look at zcalc -> 'autoload zcalc' -> 'man zshmodules | less -p MATHFUNC'
-peval() {
-    [[ -n "$1" ]] && CALC="$*" || print "Usage: calc [expression]"
-    perl -e "print eval($CALC),\"\n\";"
-}
-functions peval &>/dev/null && alias calc=peval
-
 # spawn a minimally set up mksh - useful if you want to umount /usr/.
 minimal-shell() {
     emulate -L zsh