diff --git a/isis/scripts/isis3VarInit.py b/isis/scripts/isis3VarInit.py index adc1ba68bb..2e90ef7521 100755 --- a/isis/scripts/isis3VarInit.py +++ b/isis/scripts/isis3VarInit.py @@ -113,6 +113,8 @@ def mkdir( p ): setenv ISISROOT {} setenv ISIS3DATA {} setenv ISIS3TESTDATA {} + +source $CONDA_PREFIX/scripts/tabCompletion.csh """.format(os.environ['CONDA_PREFIX'], args.data_dir, args.test_dir) a.write(script) print( 'Wrote '+activate_vars_csh ) diff --git a/isis/scripts/tabCompletion.csh b/isis/scripts/tabCompletion.csh new file mode 100644 index 0000000000..28b360e24c --- /dev/null +++ b/isis/scripts/tabCompletion.csh @@ -0,0 +1,25 @@ +#!/bin/csh + + +# Setup tab completion +if ( -f $ISISROOT/bin/isiscomplete ) then + set newBinaries = `/bin/ls $ISISROOT/bin/xml | grep -v qt.conf | sed s%\.xml%%` + set i = 0 + set loop = 0 + set chunk = "" + foreach app ($newBinaries) + @ i = $i + 1 + @ loop = $loop + 1 + set chunk = "$chunk $app" + if ( "$i" == 100 || "$loop" == $#newBinaries) then + eval `$ISISROOT/bin/isiscomplete $chunk` + set i = 1 + set chunk = "" + endif + end + unset i + unset loop + unset chunk + unset app + unset newBinaries +endif