]> git.madduck.net Git - etc/zsh.git/commitdiff

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

Add warnings for unsupported repo types
authormartin f. krafft <madduck@madduck.net>
Tue, 6 May 2008 20:58:20 +0000 (21:58 +0100)
committermartin f. krafft <madduck@madduck.net>
Tue, 6 May 2008 20:58:20 +0000 (21:58 +0100)
.zsh/zshrc/85_vcs_prompt

index d99251141f5e69c55e1f9106caa5b52f82882724..814fed8dcacd457b7588bc224e25ec3a11569d55 100644 (file)
@@ -67,8 +67,9 @@ __vcs_set_prompt_variables()
 {
   local pre branch post
   local MAXLEN=25
+  local repotype="${1:-$(__vcs_get_repo_type)}"
 
-  case "${1:-$(__vcs_get_repo_type)}" in
+  case "$repotype" in
     git)
       local reporoot="$(__git_get_repo_root)"
       set -- $(__get_prompt_path_components "$reporoot")
@@ -80,6 +81,10 @@ __vcs_set_prompt_variables()
       pre="${(%)pre}"
       ;;
     *)
+      case "$repotype" in
+        NONE) :;;
+        *) warn "$repotype repositories not (yet) supported in the prompt";;
+      esac
       local p="%${MAXLEN}<..<%~%<<"
       #TODO find a better way so we don't have to nuke $psvar, but since the
       #     %(nv.true.false) check for prompts checks element count, not