From e9a3cf348106c16732378607884ea4ae29c79bb0 Mon Sep 17 00:00:00 2001 From: Axel Beckert Date: Wed, 25 Jun 2014 12:20:59 +0200 Subject: [PATCH] Automatically create shortcuts to host and host group directories --- zsh.d/55-hash | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/zsh.d/55-hash b/zsh.d/55-hash index 4edc5fa..0264462 100644 --- a/zsh.d/55-hash +++ b/zsh.d/55-hash @@ -9,7 +9,6 @@ if [[ "$NISDOMAINNAME" = "phys.ethz.ch" ]]; then hash -d configs=/pub/debian-local/configs hash -d byhost=/pub/debian-local/configs/byHost hash -d bygroup=/pub/debian-local/configs/byGroup - hash -d SERVER=/pub/debian-local/configs/byGroup/SERVER # All our current and probably future distributions for d in etch lenny squeeze wheezy jessie karmic lucid maverick natty oneiric precise quantal raring saucy trusty utopic; do @@ -17,6 +16,12 @@ if [[ "$NISDOMAINNAME" = "phys.ethz.ch" ]]; then hash -d $d=/pub/debian-local/configs/$d fi done + + # Create ~$HOST and ~$HOSTGROUP shortcuts + for h in /pub/debian-local/configs/byHost/*/ /pub/debian-local/configs/byGroup/*/; do + name=${h:t} + hash -d $name=$h + done fi if [[ -d /usr/share/doc/debian-policy ]]; then -- 2.1.4