Bowrna commented on pull request #20066:
URL: https://github.com/apache/airflow/pull/20066#issuecomment-992320686


   > > 1.) do we need to generate all the script files in pre-commit and add 
them as part of the repository? It may fail like this depending upon the shell 
right.
   > 
   > Hmm. It could indeed be that the script will generate only when you are on 
windows.
   > 
   > > 2. Could we generate the script file on the fly when running `Breeze2 
setup-autocomplete`? This will generate the script file and update that to 
right shell like `.bashrc/.zshrc/fish commands/powershell`. If we are doing it 
this way, then we don't need to generate any script in advance in .pre-commit. 
Am i right in thinking this way?
   > 
   > Yeah. Good thinking! I like it. I thnk that might eventually be a better 
idea than autocomplete generation in pre-commit, especially that it seems that 
those autocomplete scripts do not really depend on the set of "commands" 
available. I thought initially that those autocomplete scripts will contain 
some pre-defined lists of commands, but it does not seem to work this way. I 
think it would be great to check how it works. My worry was that those scripts 
will have to be updated every time we add a new command.
   > 
   > Can you please test if this is the case - i.e.:
   > 
   > 1. install breeze in editable mode (Either with ./Breeze2 bootstrap or 
pipx -e)
   > 2. generate the script and add them to zsh/bash and get them works
   > 3. add a new command to breeze and see if the new command will appear in 
the autocomplete
   > 
   > If this will work without regenerating the script, I am all for 
dynamically adding the script at `breeze setup-autocomplete`- for example 
somewhere in ./build/autocomplete/ directory and adding sourcing of those 
scripts from there.
   
   - [x]  1. Breeze is installed in editable mode. 
   - [x]  2. Script is generated and added to zsh and got it working by running 
`source ~/.zshrc` 
   - [x]  3. Created a new command to breeze and it's working in autocomplete.
   As far as I have seen the generated scripts for bash/zsh/fish, it doesn't 
seem to vary if we add a new command in `breeze.py`. The content of the 
auto-generate activation scripts remains the same. Only if we change the 
command name from `Breeze2` to something different, then we may need to 
regenerate the activation scripts and update in bash/zsh/fish. Not sure about 
how powershell would work in this case.
   
   @potiuk 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to