[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnuastro-commits] master e444941 45/62: Auto-completion: Call astfits/a
From: |
Mohammad Akhlaghi |
Subject: |
[gnuastro-commits] master e444941 45/62: Auto-completion: Call astfits/asttable consistently |
Date: |
Thu, 13 May 2021 22:20:52 -0400 (EDT) |
branch: master
commit e444941812fe5c7d2c6282e1cc88b9ddc7a67197
Author: Pedram Ashofteh Ardakani <pedramardakani@pm.me>
Commit: Mohammad Akhlaghi <mohammad@akhlaghi.org>
Auto-completion: Call astfits/asttable consistently
With this commit, the auto-completion script calls for astfits and
asttable only using their stored name in the script beginning. They are
'$_gnuastro_astfits' and '$_gnuastro_asttable'.
---
bin/table/completion.bash | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/bin/table/completion.bash b/bin/table/completion.bash
index b8270c6..b98278e 100644
--- a/bin/table/completion.bash
+++ b/bin/table/completion.bash
@@ -126,7 +126,7 @@ _gnuastro_autocomplete_list_fits_names(){
# characters into '$COMPREPLY'.
local files=($(ls | grep -e "^$word" --color=never))
for f in ${files[*]} ; do
- if astfits "$f" -q &> /dev/null; then COMPREPLY+=("$f"); fi
+ if $_gnuastro_astfits "$f" -q &> /dev/null; then COMPREPLY+=("$f"); fi
done
}
@@ -146,7 +146,7 @@ _gnuastro_autocomplete_expect_number(){
# opened). Note that FITS files have many possible extensions (see the
# 'gal_fits_name_is_fits' function in 'lib/fits.c').
_gnuastro_autocomplete_file_is_fits(){
- if astfits $1 -h0 &> /dev/null; then return 0; else return 1; fi
+ if $_gnuastro_astfits $1 -h0 &> /dev/null; then return 0; else return 1; fi
}
@@ -224,7 +224,7 @@ _gnuastro_autocomplete_plaintext_is_table(){
# properly. We don't want to bother with the other lines, because
# we don't want to waste computational power here.
if awk '!/^#/ && NF>0 {print; exit 0}' $inputfile \
- | asttable &> /dev/null; then
+ | $_gnuastro_asttable &> /dev/null; then
return 0
else
return 1
@@ -275,7 +275,7 @@ _gnuastro_autocomplete_last_table(){
# If this extension of this file is actually a FITS table
# (not an image), then set the 'last_table' variable and
# break out of the loop that parses the tokens.
- if asttable $token -h$last_table_hdu -i &> /dev/null; then
+ if $_gnuastro_asttable $token -h$last_table_hdu -i &>
/dev/null; then
last_table="$token"
break;
fi
- [gnuastro-commits] master acf58c1 58/62: TAB completion: now supported in ConvertType and Convolve, (continued)
- [gnuastro-commits] master acf58c1 58/62: TAB completion: now supported in ConvertType and Convolve, Mohammad Akhlaghi, 2021/05/13
- [gnuastro-commits] master 9ae830f 34/62: Table: Completion, replace double negative, Mohammad Akhlaghi, 2021/05/13
- [gnuastro-commits] master 7f1a203 35/62: Book: Autocompletion for developers example, Mohammad Akhlaghi, 2021/05/13
- [gnuastro-commits] master 6379566 36/62: Book: edits to the Bash auto-completion section, Mohammad Akhlaghi, 2021/05/13
- [gnuastro-commits] master 9335953 44/62: Auto-completion: Faster fits parse, use 'local', Mohammad Akhlaghi, 2021/05/13
- [gnuastro-commits] master 284a32e 51/62: Auto-completion: Debug -i, improve performance, Mohammad Akhlaghi, 2021/05/13
- [gnuastro-commits] master e5707cd 28/62: Table: Completion, all options, update comments, Mohammad Akhlaghi, 2021/05/13
- [gnuastro-commits] master 88806f2 38/62: bin/table/completion.bash: improvements to find good table name, Mohammad Akhlaghi, 2021/05/13
- [gnuastro-commits] master 1bf469f 40/62: /bin/table/completion.bash: consider short opt '-i', Mohammad Akhlaghi, 2021/05/13
- [gnuastro-commits] master e340452 42/62: Auto-completion: Minor polishing of the warning message, Mohammad Akhlaghi, 2021/05/13
- [gnuastro-commits] master e444941 45/62: Auto-completion: Call astfits/asttable consistently,
Mohammad Akhlaghi <=
- [gnuastro-commits] master 04ee1fe 46/62: Auto-completion: Suggest plaintext tables too, Mohammad Akhlaghi, 2021/05/13
- [gnuastro-commits] master 3754f1b 47/62: Auto-completion: Human readable arguments, Mohammad Akhlaghi, 2021/05/13
- [gnuastro-commits] master ea08fdb 49/62: Auto-completion: return value from last table, Mohammad Akhlaghi, 2021/05/13
- [gnuastro-commits] master ece1614 55/62: Auto complete: separated generic functions from Table's recipe, Mohammad Akhlaghi, 2021/05/13
- [gnuastro-commits] master ef351da 56/62: TAB completion: now working for Arithmetic, better infrastructure, Mohammad Akhlaghi, 2021/05/13
- [gnuastro-commits] master d2bf2c2 60/62: TAB completion: updated documentation and polished the code, Mohammad Akhlaghi, 2021/05/13
- [gnuastro-commits] master 4412710 29/62: Table: Completions, add missing options from help, Mohammad Akhlaghi, 2021/05/13
- [gnuastro-commits] master 82e9692 33/62: Book: Update the auto-complete section, Mohammad Akhlaghi, 2021/05/13
- [gnuastro-commits] master abe3ca6 43/62: Auto-completion: Smart list fits files, fix var, Mohammad Akhlaghi, 2021/05/13
- [gnuastro-commits] master a66e8bb 57/62: TAB completion: BuildProgram support added, Mohammad Akhlaghi, 2021/05/13