[Top][All Lists]

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

[gnuastro-commits] master 0420521 04/62: Completion: bug fix in catching

From: Mohammad Akhlaghi
Subject: [gnuastro-commits] master 0420521 04/62: Completion: bug fix in catching the options
Date: Thu, 13 May 2021 22:20:45 -0400 (EDT)

branch: master
commit 0420521b7f478a8aa2d27916ff45e8d953634eb6
Author: Pedram Ashofteh Ardakani <>
Commit: Mohammad Akhlaghi <>

    Completion: bug fix in catching the options
    Until now, the completion would catch only the options introduced in the
    `--help` command of the `astcosmiccal` program that started with [a-z]
    characters. With this commit, options that start with the uppercase
    letters will be caught too. Furthermore, options that included numbers,
    such as `--H0` are counted in too.
 bin/cosmiccal/astcosmiccal-completion.bash | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bin/cosmiccal/astcosmiccal-completion.bash 
index 50c1aed..e22723a 100644
--- a/bin/cosmiccal/astcosmiccal-completion.bash
+++ b/bin/cosmiccal/astcosmiccal-completion.bash
@@ -23,7 +23,7 @@ _astcosmiccal_completions(){
         # Show all options in CosmicCalculator:
         COMPREPLY=($(compgen -W "$(astcosmiccal --help | \
-                             awk 'match($0, /--[a-z]+/) {print substr($0, 
+                             awk 'match($0, /--([A-Z]|[a-z]|[0-9])*/) {print 
substr($0, RSTART, RLENGTH)}') " \
                              -- "$word"));

reply via email to

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