Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tab completion does not work with C-Shell #3163

Closed
jessemapel opened this issue Mar 14, 2019 · 8 comments
Closed

Tab completion does not work with C-Shell #3163

jessemapel opened this issue Mar 14, 2019 · 8 comments
Assignees
Labels

Comments

@jessemapel
Copy link
Contributor

jessemapel commented Mar 14, 2019

ISIS version(s) affected: 3.6.2

Description
Using 3.6.2 and the conda environment installation, tab completion does not work for application parameters and files.

How to reproduce

  1. Follow the conda installation instructions for 3.6.2
  2. Activate the conda environment with 3.6.2 installed
  3. enter cam2map and then tab
    1. this should list all of cam2map's paramters
  4. enter cam2map from= and then tab
    1. this should list all of the cube files in the current directory

Additional context
more info from @lwellerastro and possible solution from @scsides here

Related to #1599

@SgStapleton
Copy link
Contributor

Possible Solution: Move tab complete logic from /etc/conda/activate.d/env_vars.csh to it's own script inside the isis3 repo scripts and call it from the env_vars.csh. (Repeat same for bash, but logic needs to be re-written for bash.)

@SgStapleton SgStapleton self-assigned this Apr 9, 2019
@SgStapleton
Copy link
Contributor

As most users are moved/moving to bash, does it make sense to complete this for bash as well and rename this ticket?

@jessemapel
Copy link
Contributor Author

@SgStapleton If they get worked on at the same time, I think that's good

@scsides
Copy link
Contributor

scsides commented Apr 19, 2019

Getting tcsh tab completion going is trivial (a few minutes), Jesse has already done this by hand using my script, so we know what it will take. Getting it working for bash will be significantly more work (hours). The syntax for bash is completely different than the existing tcsh syntax, and will have to be learned before work can begin. There is some overlap though, the simple changes for tcsh will also need to be done for bash.

@jessemapel
Copy link
Contributor Author

@scsides I've manually added your script, but we need to make it automatic or a part of the isis3VarInit script.

@scsides
Copy link
Contributor

scsides commented Apr 19, 2019

Thanks, I clarified it

@SgStapleton
Copy link
Contributor

Sorry I have not been updating on this ticket. I have one simple question for the tcsh process: It looks like the isis3VarInit.py script is writing the bash files for activate and deactivate, but I can't seem to figure out where the .tcsh files are being written? All the other logic should be in place for tcsh to call a script in $CONDA_PREFIX/scripts. It WAS very simple.

The bash is another story entirely. I have been looking into the complete and compgen commands in bash and it is going to need to be handled ENTIRELY different. I have been playing around with it getting some ideas of what can be done, but this is going to be a much bigger time sink.

@SgStapleton
Copy link
Contributor

Once this PR is merged, I will be closing this ticket as there already exists a ticket for bash tab completion: #1599

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants