[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnuastro-commits] master 0e382bc 11/62: Table: Completion, suggest colu
From: |
Mohammad Akhlaghi |
Subject: |
[gnuastro-commits] master 0e382bc 11/62: Table: Completion, suggest columns inside fits |
Date: |
Thu, 13 May 2021 22:20:46 -0400 (EDT) |
branch: master
commit 0e382bc52395cfb4c76f6f92bd22c9488672ece0
Author: Pedram Ashofteh Ardakani <pedramardakani@pm.me>
Commit: Mohammad Akhlaghi <mohammad@akhlaghi.org>
Table: Completion, suggest columns inside fits
---
bin/table/completion.sh | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/bin/table/completion.sh b/bin/table/completion.sh
index d17b3a2..be64325 100644
--- a/bin/table/completion.sh
+++ b/bin/table/completion.sh
@@ -22,8 +22,9 @@ _gnuastro_autocomplete_list_fits_files(){
COMPREPLY=($(compgen -f -X "!*.[fF][iI][tT][sS]"));
}
-_gnuastro_autocomplete_column_read(){
- echo "Pass"
+_gnuastro_autocomplete_list_columns(){
+ #
+ COMPREPLY=($(compgen -W "$($ASTTABLE --information gaia.fits | awk -v
regex="^[0-9]+" 'match($0, regex) {print $2}')" -- "$word"))
}
_gnuastro_autocomplete_expect_number(){
@@ -68,6 +69,7 @@ _gnuastro_asttable_completions(){
case "$prev" in
-i|--information) _gnuastro_autocomplete_list_fits_files ;;
+ -c|--column) _gnuastro_autocomplete_list_columns ;;
-b|--noblank) ;;
-h|--hdu) ;;
# The default case populates suggestions with all options available
- [gnuastro-commits] master d0e1362 14/62: Table: Completion, better function name, copyright, (continued)
- [gnuastro-commits] master d0e1362 14/62: Table: Completion, better function name, copyright, Mohammad Akhlaghi, 2021/05/13
- [gnuastro-commits] master 7ad725a 21/62: Table: Completion, fix hdu and fits suggestions, Mohammad Akhlaghi, 2021/05/13
- [gnuastro-commits] master b391ee8 22/62: Table: Completion, bash4+ long option no space, Mohammad Akhlaghi, 2021/05/13
- [gnuastro-commits] master 97d9a1e 09/62: Table: Completion suggests matching words, Mohammad Akhlaghi, 2021/05/13
- [gnuastro-commits] master 9ea367b 16/62: Table: Completion, handle '=', do not append space, Mohammad Akhlaghi, 2021/05/13
- [gnuastro-commits] master 7c95cec 24/62: Table: Completion, better POSIX portability, Mohammad Akhlaghi, 2021/05/13
- [gnuastro-commits] master 19ebe93 26/62: Table: Completion, improve _compgen, put quotes, Mohammad Akhlaghi, 2021/05/13
- [gnuastro-commits] master 7b584a4 31/62: Table: Completion, update shebang, fix formatting, Mohammad Akhlaghi, 2021/05/13
- [gnuastro-commits] master c259040 39/62: bin/table/completion.bash: Fix '--information', Mohammad Akhlaghi, 2021/05/13
- [gnuastro-commits] master 6efd4ff 32/62: Book: Add auto-complete to the developing section, Mohammad Akhlaghi, 2021/05/13
- [gnuastro-commits] master 0e382bc 11/62: Table: Completion, suggest columns inside fits,
Mohammad Akhlaghi <=
- [gnuastro-commits] master 328ab31 19/62: Table: Completion, thoughts on short options, Mohammad Akhlaghi, 2021/05/13
- [gnuastro-commits] master b5c4f29 27/62: Table: Completion, add options, improve get name, Mohammad Akhlaghi, 2021/05/13
- [gnuastro-commits] master 86df9d8 25/62: Table: Completion, custom compgen, Mohammad Akhlaghi, 2021/05/13
- [gnuastro-commits] master 51daecd 30/62: Table: Completion, update copyright, minor edits, Mohammad Akhlaghi, 2021/05/13
- [gnuastro-commits] master e690fc5 37/62: Bash completion: renamed fixed file to completion.bash, Mohammad Akhlaghi, 2021/05/13
- [gnuastro-commits] master 229ac51 41/62: /bin/table/completion.bash: Refactor code, Mohammad Akhlaghi, 2021/05/13
- [gnuastro-commits] master 50026ec 48/62: Auto-completion: Rename boolean query functions, Mohammad Akhlaghi, 2021/05/13
- [gnuastro-commits] master 8150e1c 50/62: Auto-completion: Refactor FITS related functions, Mohammad Akhlaghi, 2021/05/13
- [gnuastro-commits] master afadccf 52/62: Auto-completion: Call ..._last_table where needed, Mohammad Akhlaghi, 2021/05/13
- [gnuastro-commits] master 90f08c2 53/62: Auto-completion: Refactor ..._is_table function, Mohammad Akhlaghi, 2021/05/13