Skip to content

Commit

Permalink
zshrc: Remove peval and calc
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 f4d4452 commit 2e9ff8e
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 16 deletions.
8 changes: 0 additions & 8 deletions doc/grmlzshrc.t2t
Expand Up @@ -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).
Expand Down Expand Up @@ -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.

Expand Down
8 changes: 0 additions & 8 deletions etc/zsh/zshrc
Expand Up @@ -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
Expand Down

0 comments on commit 2e9ff8e

Please sign in to comment.