If sdb does not exists in the path that user inputs, autocomplete for sdb is disasbled
Change-Id: I6828156ccda6d9d0d4653cb7b2d3a515ed850b26
Signed-off-by: ho.namkoong <ho.namkoong@samsung.com>
{
#sdb path is defined in PATH environment variable
COMPREPLY=()
+
+ SDB_PATH=$(eval eval echo \$\{COMP_WORDS\[0\]\})
+
+ if [ ! -f ${SDB_PATH} ];
+ then
+ return 0;
+ fi
+
# cur="${COMP_WORDS[COMP_CWORD]}"
ARGS="autocomplete,${COMP_CWORD}"
ARGS="${ARGS}${IFS}${convertedarg}"
done
- SDB_PATH=$(eval eval echo \$\{COMP_WORDS\[0\]\})
-
next=($("${SDB_PATH}" ${ARGS}))
local IFS=$'\n'
COMPREPLY=(${next})