From 300f94cb0e1121e7796edbedcbc6d686e755be5b Mon Sep 17 00:00:00 2001 From: Spencer Rinehart Date: Tue, 12 Mar 2013 13:11:18 -0400 Subject: Use [ -nt ] instead of stat -f%m to check cache files. --- plugins/phing/phing.plugin.zsh | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'plugins/phing/phing.plugin.zsh') diff --git a/plugins/phing/phing.plugin.zsh b/plugins/phing/phing.plugin.zsh index 8f4adca08..1abf0a954 100644 --- a/plugins/phing/phing.plugin.zsh +++ b/plugins/phing/phing.plugin.zsh @@ -1,10 +1,7 @@ _phing_does_target_list_need_generating () { - if [ ! -f .phing_targets ]; then return 0; - else - accurate=$(stat -f%m .phing_targets) - changed=$(stat -f%m build.xml) - return $(expr $accurate '>=' $changed) - fi + [ ! -f .phing_targets ] && return 0; + [ .phing_targets -nt build.xml ] && return 0; + return 1; } _phing () { -- cgit v1.2.3-70-g09d2 From bdf4f5a347789069dda438e64467344b551fff00 Mon Sep 17 00:00:00 2001 From: Spencer Rinehart Date: Tue, 12 Mar 2013 13:15:05 -0400 Subject: Allow ":" and "-" characters in phing tasks. Tasks that included hyphens or colons were being excluded from completion. This improves the usage for this. --- plugins/phing/phing.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins/phing/phing.plugin.zsh') diff --git a/plugins/phing/phing.plugin.zsh b/plugins/phing/phing.plugin.zsh index 1abf0a954..795f1db85 100644 --- a/plugins/phing/phing.plugin.zsh +++ b/plugins/phing/phing.plugin.zsh @@ -7,7 +7,7 @@ _phing_does_target_list_need_generating () { _phing () { if [ -f build.xml ]; then if _phing_does_target_list_need_generating; then - phing -l |grep -v ":" |grep -v "^$"|grep -v "\-" > .phing_targets + phing -l |grep -v ":$" |grep -v "^-*$" > .phing_targets fi compadd `cat .phing_targets` fi -- cgit v1.2.3-70-g09d2