Permalink
Browse files

Updating autocomplete to use the local makelos copy if exists

  • Loading branch information...
1 parent f227919 commit 34b93adb72abd2f35858665d3b8c63b55c560449 @bermi bermi committed Jun 19, 2011
Showing with 11 additions and 2 deletions.
  1. +10 −1 README.markdown
  2. +1 −1 akelos_utils/makelos/makelos.php
View
@@ -241,6 +241,9 @@ with the following code
_makelos()
{
local cur colonprefixes arguments
+ local -a makelos_cmd
+ cvsroots=( $CVSROOT )
+
COMPREPLY=()
cur=${COMP_WORDS[COMP_CWORD]}
# Work-around bash_completion issue where bash
@@ -250,7 +253,13 @@ with the following code
# work-around for the same issue.
colonprefixes=${cur%"${cur##*:}"}
arguments=("${COMP_WORDS[@]:1}")
- COMPREPLY=( $(compgen -W '$($1 makelos:autocomplete \
+ if [ -f makelos ]
+ then
+ makelos_cmd="./makelos"
+ else
+ makelos_cmd="makelos"
+ fi
+ COMPREPLY=( $(compgen -W '$($makelos_cmd makelos:autocomplete \
${arguments[@]})' -- $cur))
local i=${#COMPREPLY[*]}
while [ $((--i)) -ge 0 ]; do
@@ -149,7 +149,7 @@ private function _castValue($value) {
$_config_file = AK_BASE_DIR.DS.'config'.DS.'config.php';
- if(!is_file($_config_file) || !include($_config_file)){
+ if(!is_file($_config_file) || !include_once($_config_file)){
defined('AK_ENVIRONMENT') || define('AK_ENVIRONMENT', 'testing');
if(!is_file(AK_BASE_DIR.DS.'config'.DS.'environment.php') || !include(AK_BASE_DIR.DS.'config'.DS.'environment.php')){
defined('AK_SKIP_ENV_CONFIG') || define('AK_SKIP_ENV_CONFIG', true);

0 comments on commit 34b93ad

Please sign in to comment.