diff options
author | Daniel Friesel <derf@derf.homelinux.org> | 2008-09-21 10:51:18 +0200 |
---|---|---|
committer | Daniel Friesel <derf@derf.homelinux.org> | 2008-09-21 10:51:18 +0200 |
commit | 8af309de1f2de285bf4ef9927a82d677141bacc0 (patch) | |
tree | 63ceee2f12d459c8e907bfaf27b3e6ec3e6c2bd1 /etc/functions/dirinfo | |
parent | cb4ae4ff87273ed07975c5f09c65b862e46928c0 (diff) |
chpwd splitup
Diffstat (limited to 'etc/functions/dirinfo')
-rw-r--r-- | etc/functions/dirinfo | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/etc/functions/dirinfo b/etc/functions/dirinfo new file mode 100644 index 0000000..eb4fda3 --- /dev/null +++ b/etc/functions/dirinfo @@ -0,0 +1,21 @@ +## vim:ft=zsh +## Collect some directory information for the prompt +## Written 2008 by Daniel Friesel <derf@derf.homelinux.org> +## + +typeset string + +if [[ -r .todo ]] { + if [[ ${#$(todo)} -gt 0 ]] { + string+='todo* ' + } else { + string+='todo ' + } +} +[[ -f .fehindex.jpg ]] && string+='feh ' +[[ -d .hg ]] && string+='hg ' +[[ -d .git ]] && string+='git ' +[[ -d .svn ]] && string+='svn ' +[[ -f Makefile || -f makefile ]] && string+='make ' + +echo $string |