From 4f1684515938da2bb1c1821ab2b12edac5d29cc4 Mon Sep 17 00:00:00 2001 From: Kazuya Takeshima Date: Thu, 27 Jun 2013 19:39:01 +0900 Subject: [PATCH] Change cache name to use application root directory name. --- src/_rails | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/_rails b/src/_rails index 614f84f..ac494c2 100644 --- a/src/_rails +++ b/src/_rails @@ -180,10 +180,12 @@ __rails_generate_commands() { ) _describe -t rails_generators 'rails generator' rails_generators + local application_directory + __rails_setup_application_directory local cache_name - local -a all_generators - cache_name="rails_${$(pwd)##*/}_all_generators" + cache_name="rails/${application_directory##*/}/all_generators" if ! _retrieve_cache ${cache_name}; then + local -a all_generators all_generators=($(_call_program rails_generators rails generate 2> /dev/null | awk '/^ [a-zA-Z_]+/{ print $1 }')) _store_cache ${cache_name} all_generators fi