[Top][All Lists]

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

[gnuastro-commits] master 9ae830f 34/62: Table: Completion, replace doub

From: Mohammad Akhlaghi
Subject: [gnuastro-commits] master 9ae830f 34/62: Table: Completion, replace double negative
Date: Thu, 13 May 2021 22:20:50 -0400 (EDT)

branch: master
commit 9ae830f918eb6856cf238578c5cbe2e86487a911
Author: Pedram Ashofteh Ardakani <>
Commit: Mohammad Akhlaghi <>

    Table: Completion, replace double negative
    Until now, complete had the 'nospace' option by default, and it would
    turn it off whenever there were no '=' signs in the 'COMPREPLY'. With
    this commit, the 'nospace' option is off by default. It is only turned
    on when there is a '=' sign in the 'COMPREPLY'. The logic might be a bit
    more clear now.
 bin/table/ | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/bin/table/ b/bin/table/
index 1fd98d0..339dfb8 100644
--- a/bin/table/
+++ b/bin/table/
@@ -297,11 +297,11 @@ _gnuastro_asttable_completions(){
         *) _gnuastro_autocomplete_list_options $PROG_ADDRESS ;;
-    if [[ ! "${COMPREPLY[@]}" =~ "=" ]]; then
+    if [[ "${COMPREPLY[@]}" =~ "=" ]]; then
         # Do not append 'space' character to the end of line in case there
         # is a long option present in the suggestions. Please note that
         # long options always have a '=' suffix.
-        compopt +o nospace
+        compopt -o nospace
     # Be verbose in debugging mode, where $db is set to '0'.
@@ -327,7 +327,7 @@ EOF
-complete -F _gnuastro_asttable_completions -o nospace asttable
+complete -F _gnuastro_asttable_completions asttable

reply via email to

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