gnuastro-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnuastro-commits] master a66e8bb 57/62: TAB completion: BuildProgram su


From: Mohammad Akhlaghi
Subject: [gnuastro-commits] master a66e8bb 57/62: TAB completion: BuildProgram support added
Date: Thu, 13 May 2021 22:20:55 -0400 (EDT)

branch: master
commit a66e8bb5c845a2e3d7577eb5d44cda8b2de840f3
Author: Mohammad Akhlaghi <mohammad@akhlaghi.org>
Commit: Mohammad Akhlaghi <mohammad@akhlaghi.org>

    TAB completion: BuildProgram support added
    
    With this commit, TAB completion has been implemented for BuildProgram. In
    the process some further cleaning up (and generalization) has been added:
    
     - The file keeping built variables from program source now has a '.built'
       suffix instead of the old '-arith.tmp' suffix. Because in other
       programs, it may happen that it is needed in other non-arithmetic
       situtations.
    
     - Since the completion script is now also installed, the final
       installation message (that was under 'install-exec-local', and would
       thus be printed before the installation of the completion script) is no
       under 'install-data-hook'. So the final message now appears at the end
       of installation again.
    
     - The mistakenly commented parts of not suggesting Arithmetic options has
       been corrected (the lines aren't commented any more).
    
     - Within BuildProgram's source, I noticed that we weren't hiding the
       '--wcslinearmatrix' option (which doesn't apply to this program!). So it
       has been hidden.
    
     - The '_gnuastro_autocomplete_first_in_arguments' function has been
       generalized to easily allow different "first" files using a 'case'
       statement.
    
     - The '_gnuastro_autocomplete_compreply_directories' function has been
       added to allow easy suggestion of directories (when an option expects a
       directory).
    
     - The '_gnuastro_autocomplete_compreply_files_certain' function now
       replaces '_gnuastro_autocomplete_compreply_fits_images' and
       '_gnuastro_autocomplete_compreply_tables': the type of the desired files
       are now given as an argument.
---
 Makefile.am                                        |  26 ++--
 bin/arithmetic/astarithmetic-complete.bash         |  56 ++++----
 bin/buildprog/Makefile.am                          |   3 +-
 .../astbuildprog-complete.bash}                    |  97 ++++++-------
 bin/buildprog/ui.c                                 |   1 +
 bin/completion.bash.in                             | 155 ++++++++++++++-------
 bin/table/asttable-complete.bash                   |   8 +-
 7 files changed, 194 insertions(+), 152 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 17555a4..0760a73 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -183,10 +183,10 @@ EXTRA_DIST = COPYING.FDL genauthors .dir-locals.el 
.version \
 pkgdata_DATA = bin/completion.bash
 bin/completion.bash: $(top_srcdir)/bin/completion.bash.in
         # Delete any existing output file.
-       rm -f $@ $@-arith.tmp $@.tmp
+       rm -f $@ $@.built $@.tmp
 
-        # Extract the arithmetic library operators into a '-arith.tmp' file (
-       echo "" > $@-arith.tmp
+        # Extract the arithmetic library operators into a '.built' file.
+       echo "" > $@.built
        for op in $$($(AWK) '/^gal_arithmetic_operator_string/{parse=1} \
                             /^\}/{parse=0} \
                             parse==1 && /GAL_ARITHMETIC_OP/{print $$NF}' \
@@ -194,12 +194,12 @@ bin/completion.bash: $(top_srcdir)/bin/completion.bash.in
                            | $(SED) -e's|"||g' -e's|;||'); do \
            ops="$$ops $$op"; \
        done; \
-       echo "_gnuastro_autocomplete_compreply_arithmetic_lib(){" >> 
$@-arith.tmp; \
-       echo "arithmetic_lib_operators=\"$$ops\"" >> $@-arith.tmp; \
-       echo "}" >> $@-arith.tmp
+       echo "_gnuastro_autocomplete_compreply_arithmetic_lib(){" >> $@.built; \
+       echo "arithmetic_lib_operators=\"$$ops\"" >> $@.built; \
+       echo "}" >> $@.built
 
-        # Extract the arithmetic program operators.
-       echo "" >> $@-arith.tmp
+        # Extract the arithmetic program operators into the '.built' file.
+       echo "" >> $@.built
        for op in $$($(AWK) '/^arithmetic_set_operator/{parse=1} \
                             /^\}/{parse=0} \
                             parse==1 && /strcmp\(string/{print $$NF}' \
@@ -207,16 +207,16 @@ bin/completion.bash: $(top_srcdir)/bin/completion.bash.in
                            | $(SED) -e's|"||g' -e's|))||'); do \
            ops="$$ops $$op"; \
        done; \
-       echo "_gnuastro_autocomplete_compreply_arithmetic_prog(){" >> 
$@-arith.tmp; \
-       echo "arithmetic_prog_operators=\"$$ops\"" >> $@-arith.tmp; \
-       echo "}" >> $@-arith.tmp
+       echo "_gnuastro_autocomplete_compreply_arithmetic_prog(){" >> $@.built; 
\
+       echo "arithmetic_prog_operators=\"$$ops\"" >> $@.built; \
+       echo "}" >> $@.built
 
         # Copy the low-level common functions to all programs, then put the
         # arithmetic functions inside of it. We are keeping the arithmetic
         # operators separate to help in debugging when necessary (they can
         # be 'source'd into each program's completion script).
        cp $(top_srcdir)/bin/completion.bash.in $@.tmp
-       cat $@-arith.tmp >> $@.tmp
+       cat $@.built >> $@.tmp
 
         # Copy each program's source.
        for f in $(MAYBE_ARITHMETIC_COMPLETE) \
@@ -326,7 +326,7 @@ check-local:
 ## Note that the '\' characters in the GNU head here are not printed on the
 ## command line. So we have to consider them. The ASCII GNU head is taken
 ## from: https://www.gnu.org/graphics/gnu-ascii.html
-install-exec-local:
+install-data-hook:
        @if [ x$(GUIDEMESSAGE) = xyes ]; then                                   
     \
         echo;                                                                  
     \
         echo 
"==================================================================="; \
diff --git a/bin/arithmetic/astarithmetic-complete.bash 
b/bin/arithmetic/astarithmetic-complete.bash
index 1bac637..bbaff18 100644
--- a/bin/arithmetic/astarithmetic-complete.bash
+++ b/bin/arithmetic/astarithmetic-complete.bash
@@ -27,14 +27,14 @@
 #
 # See the description in 'bin/completion.bash.in'.
 #source /PATH/TO/GNUASTRO/SRC/bin/completion.bash.in
-#source /PATH/TO/GNUASTRO/BUILD/bin/completion.bash-arith.tmp
+#source /PATH/TO/GNUASTRO/BUILD/bin/completion.bash.built
 
 
 
 
 
 #######################################################################
-############         Only for Table (this program)         ############
+############       Only for Arithmetic (this program)      ############
 #######################################################################
 
 # Dealing with arguments: Arithmetic only takes array/image files.
@@ -45,34 +45,34 @@ _gnuastro_autocomplete_astarithmetic_arguments(){
     local arithmetic_prog_operators=""
 
     # Print all accessible images.
-    _gnuastro_autocomplete_compreply_fits_images "$argument"
+    _gnuastro_autocomplete_compreply_files_certain image "$argument"
 
     # If atleast one image has already been given, an then print the
     # arithmetic operators with the file names.
-#    if _gnuastro_autocomplete_first_in_arguments image; then
-#
-#        # Get the list of operators as variables.
-#        _gnuastro_autocomplete_compreply_arithmetic_lib
-#        _gnuastro_autocomplete_compreply_arithmetic_prog
-#
-#        # Limit the operators to those that start with the already given
-#        # portion.
-#        if [ x"$argument" = x ]; then
-#            for f in $arithmetic_lib_operators $arithmetic_prog_operators; do
-#                COMPREPLY+=("$f");
-#            done
-#        else
-#            # We aren't using 'grep' because it can confuse the '--XXX' with
-#            # its own options on some systems (and placing a '--' before the
-#            # search string may not be portable).
-#            for f in $(echo $arithmetic_lib_operators 
$arithmetic_prog_operators \
-#                           | awk '{for(i=1;i<=NF;++i) \
-#                                     if($i ~ /^'$argument'/) print $i}'); do
-#                COMPREPLY+=("$f");
-#            done
-#        fi
-#
-#    fi
+    if _gnuastro_autocomplete_first_in_arguments image; then
+
+        # Get the list of operators as variables.
+        _gnuastro_autocomplete_compreply_arithmetic_lib
+        _gnuastro_autocomplete_compreply_arithmetic_prog
+
+        # Limit the operators to those that start with the already given
+        # portion.
+        if [ x"$argument" = x ]; then
+            for f in $arithmetic_lib_operators $arithmetic_prog_operators; do
+                COMPREPLY+=("$f");
+            done
+        else
+            # We aren't using 'grep' because it can confuse the '--XXX' with
+            # its own options on some systems (and placing a '--' before the
+            # search string may not be portable).
+            for f in $(echo $arithmetic_lib_operators 
$arithmetic_prog_operators \
+                           | awk '{for(i=1;i<=NF;++i) \
+                                     if($i ~ /^'$argument'/) print $i}'); do
+                COMPREPLY+=("$f");
+            done
+        fi
+
+    fi
 }
 
 
@@ -97,7 +97,7 @@ _gnuastro_autocomplete_astarithmetic_option_value(){
             ;;
 
         -w|--wcsfile)
-            _gnuastro_autocomplete_compreply_fits_images "$current"
+            _gnuastro_autocomplete_compreply_files_certain image "$current"
             ;;
 
         --interpmetric)
diff --git a/bin/buildprog/Makefile.am b/bin/buildprog/Makefile.am
index cd29e8d..8636ae9 100644
--- a/bin/buildprog/Makefile.am
+++ b/bin/buildprog/Makefile.am
@@ -45,7 +45,8 @@ astbuildprog_LDADD = 
$(top_builddir)/bootstrapped/lib/libgnu.la \
 astbuildprog_SOURCES = main.c ui.c buildprog.c
 
 # Extra files that must be distributed in the tarball.
-EXTRA_DIST = main.h authors-cite.h args.h ui.h buildprog.h astbuildprog.conf.in
+EXTRA_DIST = main.h authors-cite.h args.h ui.h buildprog.h \
+             astbuildprog-complete.bash astbuildprog.conf.in
 
 
 
diff --git a/bin/arithmetic/astarithmetic-complete.bash 
b/bin/buildprog/astbuildprog-complete.bash
similarity index 57%
copy from bin/arithmetic/astarithmetic-complete.bash
copy to bin/buildprog/astbuildprog-complete.bash
index 1bac637..ef82c4d 100644
--- a/bin/arithmetic/astarithmetic-complete.bash
+++ b/bin/buildprog/astbuildprog-complete.bash
@@ -1,5 +1,5 @@
-# Bash autocompletion to Gnuastro's Arithmetic program. See the comments
-# above 'bin/completion.bash.in' for more.
+# Bash autocompletion to Gnuastro's BuildProgram. See the comments above
+# 'bin/completion.bash.in' for more.
 #
 # Original author:
 #     Mohammad Akhlaghi <mohammad@akhlaghi.org>
@@ -27,52 +27,35 @@
 #
 # See the description in 'bin/completion.bash.in'.
 #source /PATH/TO/GNUASTRO/SRC/bin/completion.bash.in
-#source /PATH/TO/GNUASTRO/BUILD/bin/completion.bash-arith.tmp
+#source /PATH/TO/GNUASTRO/BUILD/bin/completion.bash.built
 
 
 
 
 
 #######################################################################
-############         Only for Table (this program)         ############
+############     Only for BuildProgram (this program)      ############
 #######################################################################
 
-# Dealing with arguments: Arithmetic only takes array/image files.
-_gnuastro_autocomplete_astarithmetic_arguments(){
+# Fill the replies with available C compilers
+_gnuastro_autocomplete_compreply_c_compiler(){
+    for f in gcc clang cc $CC; do
+        if which $f &> /dev/null; then COMPREPLY+=("$f"); fi
+    done
+}
 
-    # Local variables to be filled by functions.
-    local arithmetic_lib_operators=""
-    local arithmetic_prog_operators=""
 
-    # Print all accessible images.
-    _gnuastro_autocomplete_compreply_fits_images "$argument"
 
-    # If atleast one image has already been given, an then print the
-    # arithmetic operators with the file names.
-#    if _gnuastro_autocomplete_first_in_arguments image; then
-#
-#        # Get the list of operators as variables.
-#        _gnuastro_autocomplete_compreply_arithmetic_lib
-#        _gnuastro_autocomplete_compreply_arithmetic_prog
-#
-#        # Limit the operators to those that start with the already given
-#        # portion.
-#        if [ x"$argument" = x ]; then
-#            for f in $arithmetic_lib_operators $arithmetic_prog_operators; do
-#                COMPREPLY+=("$f");
-#            done
-#        else
-#            # We aren't using 'grep' because it can confuse the '--XXX' with
-#            # its own options on some systems (and placing a '--' before the
-#            # search string may not be portable).
-#            for f in $(echo $arithmetic_lib_operators 
$arithmetic_prog_operators \
-#                           | awk '{for(i=1;i<=NF;++i) \
-#                                     if($i ~ /^'$argument'/) print $i}'); do
-#                COMPREPLY+=("$f");
-#            done
-#        fi
-#
-#    fi
+
+
+# Dealing with arguments: BuildProgram currently only takes C source files.
+_gnuastro_autocomplete_astbuildprog_arguments(){
+    local given_file=""
+    if _gnuastro_autocomplete_first_in_arguments source_c; then
+        _gnuastro_autocomplete_compreply_options_all ""
+    else
+        _gnuastro_autocomplete_compreply_files_certain source_c "$argument"
+    fi
 }
 
 
@@ -80,9 +63,10 @@ _gnuastro_autocomplete_astarithmetic_arguments(){
 
 
 # Fill option value (depends on option).
-_gnuastro_autocomplete_astarithmetic_option_value(){
+_gnuastro_autocomplete_astbuildprog_option_value(){
 
     # Internal variables.
+    local junk=1
     local fits_file=""
     local given_hdu=""
     local given_file=""
@@ -91,29 +75,28 @@ _gnuastro_autocomplete_astarithmetic_option_value(){
     # with similar operations, keep the order within the '|'s.
     case "$option_name" in
 
-        -h|--hdu|-g|--globalhdu|-w|--wcshdu)
-            _gnuastro_autocomplete_given_file image ""
-            _gnuastro_autocomplete_compreply_hdus image "$given_file"
-            ;;
-
-        -w|--wcsfile)
-            _gnuastro_autocomplete_compreply_fits_images "$current"
+        -a|--la)
+            _gnuastro_autocomplete_compreply_files_certain source_la "$current"
             ;;
 
-        --interpmetric)
-            for v in radial manhattan; do COMPREPLY+=("$v"); done
+        -c|--cc)
+            _gnuastro_autocomplete_compreply_c_compiler
             ;;
 
-        --tableformat)
-            _gnuastro_autocomplete_compreply_tableformat
+        -I|--includedir|-L|--linkdir)
+            _gnuastro_autocomplete_compreply_directories "$current"
             ;;
 
-        --wcslinearmatrix)
-            for v in cd pc; do COMPREPLY+=("$v"); done
+        -l|--linklib|-t|--tag|-W|--warning)
+            # There is no easy way to guess which libraries the user wants
+            # to link with, or the tag, or the warning level.
+            junk=1
             ;;
 
-        --numthreads)
-            _gnuastro_autocomplete_compreply_numthreads
+        -O|--optimize)
+            for f in $(printf "0\n1\n2\n3" | grep ^"$current"); do
+                COMPREPLY+=("$f");
+            done
             ;;
 
     esac
@@ -123,7 +106,7 @@ _gnuastro_autocomplete_astarithmetic_option_value(){
 
 
 
-_gnuastro_autocomplete_astarithmetic(){
+_gnuastro_autocomplete_astbuildprog(){
 
     # The installation directory of Gnuastro. The '@PREFIX@' part will be
     # replaced automatically during 'make install', with the user's given
@@ -166,7 +149,7 @@ _gnuastro_autocomplete_astarithmetic(){
     # If 'option_name_complete==1', then we are busy filling in the option
     # value.
     if [ $option_name_complete = 1 ]; then
-        _gnuastro_autocomplete_astarithmetic_option_value
+        _gnuastro_autocomplete_astbuildprog_option_value
 
     # When 'option_name' is not empty (and not yet complete), we are busy
     # filling in the option name.
@@ -175,7 +158,7 @@ _gnuastro_autocomplete_astarithmetic(){
 
     # In the case of "none-of-the-above", it is an argument.
     else
-        _gnuastro_autocomplete_astarithmetic_arguments
+        _gnuastro_autocomplete_astbuildprog_arguments
     fi
 }
 
@@ -186,4 +169,4 @@ _gnuastro_autocomplete_astarithmetic(){
 # Define the completion specification, or COMPSPEC: -o bashdefault: Use
 # Bash default completions if nothing is found.  -F function: Use this
 # 'function' to generate the given program's completion.
-complete -o bashdefault -F _gnuastro_autocomplete_astarithmetic astarithmetic
+complete -o bashdefault -F _gnuastro_autocomplete_astbuildprog astbuildprog
diff --git a/bin/buildprog/ui.c b/bin/buildprog/ui.c
index 56d635e..3172968 100644
--- a/bin/buildprog/ui.c
+++ b/bin/buildprog/ui.c
@@ -126,6 +126,7 @@ ui_initialize_options(struct buildprogparams *p,
         case GAL_OPTIONS_KEY_NUMTHREADS:
         case GAL_OPTIONS_KEY_TABLEFORMAT:
         case GAL_OPTIONS_KEY_STDINTIMEOUT:
+        case GAL_OPTIONS_KEY_WCSLINEARMATRIX:
           cp->coptions[i].flags=OPTION_HIDDEN;
           cp->coptions[i].mandatory=GAL_OPTIONS_NOT_MANDATORY;
           break;
diff --git a/bin/completion.bash.in b/bin/completion.bash.in
index dbe0ea6..ac07be2 100644
--- a/bin/completion.bash.in
+++ b/bin/completion.bash.in
@@ -419,9 +419,10 @@ _gnuastro_autocomplete_is_table(){
 
 
 
-# If a table is already given in the previous tokens, return successfully
-# (with zero), and will put its name in 'given_file'. Otherwise, return a
-# failure (1) and 'given_file' will be untouched.
+# If a certain file (image, table, or certain other files) is already given
+# in the previous tokens, return successfully (with zero), and will put its
+# name in 'given_file'. Otherwise, return a failure (1) and 'given_file'
+# will be untouched.
 _gnuastro_autocomplete_first_in_arguments(){
 
     # Inputs
@@ -451,20 +452,31 @@ _gnuastro_autocomplete_first_in_arguments(){
             # checked.
             if _gnuastro_autocomplete_string_is_valued_option $previous; then
                 local just_a_place_holder=1
-            else
 
-                # Based on the mode, do the proper check.
-                if [ $mode = table ]; then
-                    if _gnuastro_autocomplete_is_table $word; then
-                        given_file=$word
-                        return 0;
-                    fi
-                else
-                    if _gnuastro_autocomplete_fits_has_image $word; then
-                        given_file=$word
-                        return 0;
-                    fi
-                fi
+            # Previous word was not a valued option, do the operation based
+            # on the mode.
+            else
+                case "$mode" in
+                    table)
+                        if _gnuastro_autocomplete_is_table $word; then
+                            given_file=$word
+                            return 0;
+                        fi
+                        ;;
+                    image)
+                        if _gnuastro_autocomplete_fits_has_image $word; then
+                            given_file=$word
+                            return 0;
+                        fi
+                        ;;
+                    source_c)
+                        if $(echo $word | grep "\.c$" &> /dev/null) \
+                                && [ -f $word ]; then
+                            given_file=$word
+                            return 0;
+                        fi
+                        ;;
+                esac
             fi
         fi
 
@@ -662,30 +674,6 @@ _gnuastro_autocomplete_compreply_file(){
 
 
 
-# Add all the FITS files that contain an image in the location pointed to
-# by first argument into the completion replies.
-_gnuastro_autocomplete_compreply_fits_images(){
-
-    # Get list of matching files.
-    #   with '-d' we are telling 'ls' to not go into sub-directories.
-    local files=($(ls -d "$1"* 2> /dev/null))
-
-    # Parse the list of files and add it when it is a directory or it can
-    # be read as a table.
-    for f in ${files[*]} ; do
-        if [ -d "$f" ]; then
-            COMPREPLY+=("$f/")
-            compopt -o nospace
-        elif _gnuastro_autocomplete_fits_has_image "$f"; then
-            _gnuastro_autocomplete_compreply_file "$1" "$f"
-        fi
-    done
-}
-
-
-
-
-
 # Add all the HDUs that contain a table/image in the first argument (a FITS
 # file) into the completion replies.
 #
@@ -704,22 +692,91 @@ _gnuastro_autocomplete_compreply_hdus(){
 
 
 
-# Add all the tables in the location pointed to by first argument into the
-# completion replies.
-_gnuastro_autocomplete_compreply_tables(){
+# Fill the replies with certain files.
+_gnuastro_autocomplete_compreply_directories(){
+
+    # For easy reading.
+    local arg=$1
+
+    # Get the list of directories (all ending with '/', with '-d' we are
+    # telling 'ls' to not go into sub-directories).
+    local directs=($(ls -d "$arg"*/ 2> /dev/null))
+
+    # If a directory exists at all.
+    if [ x"${directs[0]}" != x ]; then
+
+        # If there is only one match.
+        if [ x"${directs[1]}" = x ]; then
+
+            # If there are sub-directories, then keep the ending '/' and
+            # don't add space (the user may want to add sub-directories).
+            if $(ls -d "${directs[0]}"/*/ &> /dev/null); then
+                COMPREPLY+=("$d")
+                compopt -o nospace
+
+            # There are no sub-directories. In this case, remove the ending
+            # '/' and let Bash add a space after the matched name.
+            else
+                COMPREPLY+=($(echo "${directs[0]}" | sed -e's|/$||'))
+            fi
+
+        # More than one match: go over all the matches and add them. we
+        # should avoid printing a space (so the sub-directories continue in
+        # the same token). Also RECALL THAT '$d' ALREADY ENDS WITH A '/'
+        # HERE.
+        else
+            for d in ${directs[*]}; do
+                COMPREPLY+=("$d")
+                compopt -o nospace
+            done
+        fi
+    fi
+}
+
+
+
+
+
+# Fill the replies with certain files.
+_gnuastro_autocomplete_compreply_files_certain(){
+
+    # For easy reading.
+    local arg=$2
+    local mode=$1
 
-    # Get list of matching files.
-    #   with '-d' we are telling 'ls' to not go into sub-directories.
-    local files=($(ls -d "$1"* 2> /dev/null))
+    # Get list of matching files (with '-d' we are telling 'ls' to not go
+    # into sub-directories).
+    local files=($(ls -d "$arg"* 2> /dev/null))
 
     # Parse the list of files and add it when it is a directory or it can
     # be read as a table.
-    for f in ${files[*]} ; do
+    for f in ${files[*]}; do
         if [ -d "$f" ]; then
             COMPREPLY+=("$f/")
             compopt -o nospace
-        elif _gnuastro_autocomplete_is_table "$f"; then
-            _gnuastro_autocomplete_compreply_file "$1" "$f"
+        else
+            case "$mode" in
+                image)
+                    if _gnuastro_autocomplete_fits_has_image "$f"; then
+                        _gnuastro_autocomplete_compreply_file "$arg" "$f"
+                    fi
+                    ;;
+                table)
+                    if _gnuastro_autocomplete_is_table "$f"; then
+                        _gnuastro_autocomplete_compreply_file "$arg" "$f"
+                    fi
+                    ;;
+                source_c)
+                    if $(echo $f | grep "\.c$" &> /dev/null); then
+                        _gnuastro_autocomplete_compreply_file "$arg" "$f"
+                    fi
+                    ;;
+                source_la)
+                    if $(echo $f | grep "\.la$" &> /dev/null); then
+                        _gnuastro_autocomplete_compreply_file "$arg" "$f"
+                    fi
+                    ;;
+            esac
         fi
     done
 }
diff --git a/bin/table/asttable-complete.bash b/bin/table/asttable-complete.bash
index 941402a..d68c6dd 100644
--- a/bin/table/asttable-complete.bash
+++ b/bin/table/asttable-complete.bash
@@ -28,7 +28,7 @@
 #
 # See the description in 'bin/completion.bash.in'.
 #source /PATH/TO/GNUASTRO/SRC/bin/completion.bash.in
-#source /PATH/TO/GNUASTRO/BUILD/bin/completion.bash-arith.tmp
+#source /PATH/TO/GNUASTRO/BUILD/bin/completion.bash.built
 
 
 
@@ -45,7 +45,7 @@ _gnuastro_autocomplete_asttable_arguments(){
     if _gnuastro_autocomplete_first_in_arguments table; then
         _gnuastro_autocomplete_compreply_options_all ""
     else
-        _gnuastro_autocomplete_compreply_tables "$argument"
+        _gnuastro_autocomplete_compreply_files_certain table "$argument"
     fi
 }
 
@@ -100,7 +100,7 @@ _gnuastro_autocomplete_asttable_option_value(){
             ;;
 
         -L|--catcolumnfile)
-            _gnuastro_autocomplete_compreply_tables "$current"
+            _gnuastro_autocomplete_compreply_files_certain table "$current"
             ;;
 
         --searchin)
@@ -113,7 +113,7 @@ _gnuastro_autocomplete_asttable_option_value(){
             ;;
 
         -w|--wcsfile)
-            _gnuastro_autocomplete_compreply_fits_images "$current"
+            _gnuastro_autocomplete_compreply_files_certain image "$current"
             ;;
 
         -W|--wcshdu)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]