projects
/
grml-etc-core.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
7cae82a
)
support zsh profiling via $ZSH_PROFILE_RC and profile()
author
Michael Prokop
<mika@grml.org>
Fri, 5 Jan 2007 18:36:19 +0000
(19:36 +0100)
committer
Michael Prokop
<mika@grml.org>
Fri, 5 Jan 2007 18:36:19 +0000
(19:36 +0100)
debian/changelog
patch
|
blob
|
history
etc/zsh/zshrc
patch
|
blob
|
history
diff --git
a/debian/changelog
b/debian/changelog
index
cb3ea12
..
e98402f
100644
(file)
--- a/
debian/changelog
+++ b/
debian/changelog
@@
-7,6
+7,7
@@
grml-etc-core (0.2.15) unstable; urgency=low
- improved host completion (thanks for some code, Kai Wilke!)
- added apache2-ssl-certificate() as Debian does not ship
the script anymore *grml*
- improved host completion (thanks for some code, Kai Wilke!)
- added apache2-ssl-certificate() as Debian does not ship
the script anymore *grml*
+ - support zsh profiling via $ZSH_PROFILE_RC and profile()
- added alias 0 which does nothing else than 'return 0' (I like
a clean prompt without error return codes inside but don't
want to miss the feature itself, so just press 0<cr> and that's
- added alias 0 which does nothing else than 'return 0' (I like
a clean prompt without error return codes inside but don't
want to miss the feature itself, so just press 0<cr> and that's
diff --git
a/etc/zsh/zshrc
b/etc/zsh/zshrc
index
116d35a
..
aa1fddf
100644
(file)
--- a/
etc/zsh/zshrc
+++ b/
etc/zsh/zshrc
@@
-3,7
+3,7
@@
# Authors: grml-team (grml.org), (c) Michael Prokop <mika@grml.org>
# Bug-Reports: see http://grml.org/bugs/
# License: This file is licensed under the GPL v2.
# Authors: grml-team (grml.org), (c) Michael Prokop <mika@grml.org>
# Bug-Reports: see http://grml.org/bugs/
# License: This file is licensed under the GPL v2.
-# Latest change: Fre Jän 05
00:00:23
CET 2007 [mika]
+# Latest change: Fre Jän 05
19:35:27
CET 2007 [mika]
################################################################################
# This file is sourced only for interactive shells. It
# should contain commands to set up aliases, functions,
################################################################################
# This file is sourced only for interactive shells. It
# should contain commands to set up aliases, functions,
@@
-12,6
+12,13
@@
# Global Order: zshenv, zprofile, zshrc, zlogin
################################################################################
# Global Order: zshenv, zprofile, zshrc, zlogin
################################################################################
+# zsh profiling {{{
+# just execute 'ZSH_PROFILE_RC=1 zsh' and run 'zprof' to get the details
+ if [[ -n $ZSH_PROFILE_RC ]] ; then
+ zmodload zsh/zprof
+ fi
+# }}}
+
# {{{ check for version/system
# check for versions (compatibility reasons)
if autoload is-at-least && is-at-least 2>/dev/null ; then
# {{{ check for version/system
# check for versions (compatibility reasons)
if autoload is-at-least && is-at-least 2>/dev/null ; then
@@
-256,7
+263,7
@@
fi
# autoload zsh modules when they are referenced
is4 && for opt mod in a stat \
a zpty \
# autoload zsh modules when they are referenced
is4 && for opt mod in a stat \
a zpty \
- a
zprof \
+ a
p
zprof \
ap mapfile ; do
zmodload -${opt} zsh/${mod} ${mod}
done ; unset opt mod
ap mapfile ; do
zmodload -${opt} zsh/${mod} ${mod}
done ; unset opt mod
@@
-947,6
+954,11
@@
If you want to use xinit anyway please call \"/usr/bin/xinit\"."
_uchange() { _files -W /usr/share/doc -/ }
compdef _uchange uchange
_uchange() { _files -W /usr/share/doc -/ }
compdef _uchange uchange
+# zsh profiling
+ profile () {
+ ZSH_PROFILE_RC=1 $SHELL "$@"
+ }
+
# edit alias via zle:
edalias() {
[ -z "$1" ] && { echo "Usage: edalias <alias_to_edit>" ; return 1 } || vared aliases'[$1]' ;
# edit alias via zle:
edalias() {
[ -z "$1" ] && { echo "Usage: edalias <alias_to_edit>" ; return 1 } || vared aliases'[$1]' ;