mirror of
https://github.com/zsh-users/zsh-completions.git
synced 2026-12-03 22:48:48 +08:00
Change cache name to use application root directory name.
This commit is contained in:
1 parent
9cab90cf96
commit
4f16845159
1 file changed
+4
-2
+4
-2
@@ -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
|
||||
|
||||
Reference in new issue
Block a user