From 8af309de1f2de285bf4ef9927a82d677141bacc0 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Sun, 21 Sep 2008 10:51:18 +0200 Subject: chpwd splitup --- etc/functions/dirinfo | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 etc/functions/dirinfo (limited to 'etc/functions/dirinfo') 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 +## + +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 -- cgit v1.2.3