|
@@ -0,0 +1,66 @@
|
|
|
+###############################################################################
|
|
|
+#
|
|
|
+# Copyright (C) 2011 HPCC Systems.
|
|
|
+#
|
|
|
+# All rights reserved. This program is free software: you can redistribute it and/or modify
|
|
|
+# it under the terms of the GNU Affero General Public License as
|
|
|
+# published by the Free Software Foundation, either version 3 of the
|
|
|
+# License, or (at your option) any later version.
|
|
|
+#
|
|
|
+# This program is distributed in the hope that it will be useful,
|
|
|
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
+# GNU Affero General Public License for more details.
|
|
|
+#
|
|
|
+# You should have received a copy of the GNU Affero General Public License
|
|
|
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
+###############################################################################
|
|
|
+
|
|
|
+# Bash completion file for eclcc
|
|
|
+#
|
|
|
+# To test, run ". ./eclcc" and then test completion on eclcc
|
|
|
+# File must be copied/linked from /etc/bash_completion.d/ to work seamlessly
|
|
|
+# You must have ". /etc/bash_completion" on your bashrc file (you probably have it)
|
|
|
+
|
|
|
+_eclcc()
|
|
|
+{
|
|
|
+ local cur prev opts
|
|
|
+ COMPREPLY=()
|
|
|
+ cur="${COMP_WORDS[COMP_CWORD]}"
|
|
|
+ prev="${COMP_WORDS[COMP_CWORD-1]}"
|
|
|
+ opts="--help --verbose --version -v -S -E -q -g -wu -Wc, -I -L -o -target -main -syntax -manifest -shared -specs -logfile -factivitiesPerCpp=N -fapplyInstantEclTransformations -fapplyInstantEclTransformationsLimit -fcheckAsserts -fmaxCompileThreads=N -fnoteRecordSizeInGraph -fpickBestEngine -fshowActivitySizeInGraph -fshowMetaInGraph -fshowRecordCountInGraph -fspanMultipleCpp"
|
|
|
+
|
|
|
+
|
|
|
+ # Dash options
|
|
|
+ if [[ ${cur} == -* ]] ; then
|
|
|
+ COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
|
|
+ return 0
|
|
|
+ fi
|
|
|
+
|
|
|
+ # Options with parameters
|
|
|
+ case "${prev}" in
|
|
|
+ -I|-L)
|
|
|
+ local files=$(find . -maxdepth 1)
|
|
|
+ COMPREPLY=( $(compgen -W "${files}" -- ${cur}) )
|
|
|
+ return 0
|
|
|
+ ;;
|
|
|
+ -o|-logfile|-specs)
|
|
|
+ local files=$(find . -maxdepth 1)
|
|
|
+ COMPREPLY=( $(compgen -W "${files}" -- ${cur}) )
|
|
|
+ return 0
|
|
|
+ ;;
|
|
|
+ -target)
|
|
|
+ local targets="roxie thor hthor"
|
|
|
+ COMPREPLY=( $(compgen -W "${targets}" -- ${cur}) )
|
|
|
+ return 0
|
|
|
+ ;;
|
|
|
+ *)
|
|
|
+ ;;
|
|
|
+ esac
|
|
|
+
|
|
|
+ # ECL source filename
|
|
|
+ local files=$(find . -maxdepth 1)
|
|
|
+ COMPREPLY=( $(compgen -W "${files}" -- ${cur}) )
|
|
|
+ return 0
|
|
|
+}
|
|
|
+complete -F _eclcc eclcc
|