You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by "ctubbsii (via GitHub)" <gi...@apache.org> on 2023/12/07 19:19:24 UTC

[I] Make sure tab completion is disabled when executing commands from a file [accumulo]

ctubbsii opened a new issue, #4040:
URL: https://github.com/apache/accumulo/issues/4040

   Tab completion adds overhead to set up, but can be very convenient in the Accumulo shell. However, it is useless when running the shell with a file provided as a script for it to execute, or executing a single command, as in any of these options:
   
   ```
     -e | --execute-command
     -f | --execute-file
     -fv | --execute-file-verbose
   ```
   
   Tab completion should be disabled when any of these options are used. However, it occurred to me the other day that it may not be. It would be good to verify that it is, in fact, disabled for these. If it's not, it should be fixed in 2.1 and later.


-- 
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: notifications-unsubscribe@accumulo.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Make sure tab completion is disabled when executing a single command [accumulo]

Posted by "ctubbsii (via GitHub)" <gi...@apache.org>.
ctubbsii closed issue #4040: Make sure tab completion is disabled when executing a single command
URL: https://github.com/apache/accumulo/issues/4040


-- 
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: notifications-unsubscribe@accumulo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Make sure tab completion is disabled when executing commands from a file [accumulo]

Posted by "ctubbsii (via GitHub)" <gi...@apache.org>.
ctubbsii commented on issue #4040:
URL: https://github.com/apache/accumulo/issues/4040#issuecomment-1845992228

   Oh, actually, I just checked and it looks like `-f` and `-fv` commands are "execute at startup". So, tab-completion should still be enabled, because it goes to the command prompt once the script is done executing unless "exit" is called. So, I think we don't need to do anything for those. It's just up to the user to specify `--disable-tab-completion` explicitly when executing the script and exiting. We should still make sure it's disabled for the `-e` case, though.
   
   I was also thinking, it might be better to just deprecate `-e`, since:
   
   ```sh
   $ACCUMULO_HOME/bin/accumulo shell -e "tables"
   ```
   
   is equivalent to:
   
   ```sh
   $ACCUMULO_HOME/bin/accumulo shell -f <(echo -e "tables\nexit")
   ```
   
   If anything, rather than have an "execute single command" option, it'd be better to have a command that executes a script and exits automatically, and implies disabling tab completion. But, backwards compatibility must be considered for any such changes.
   
   For now, for this issue, it's sufficient to just ensure `--disable-tab-completion` is implied when `-e` is used.


-- 
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: notifications-unsubscribe@accumulo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Make sure tab completion is disabled when executing a single command [accumulo]

Posted by "rsingh433 (via GitHub)" <gi...@apache.org>.
rsingh433 commented on issue #4040:
URL: https://github.com/apache/accumulo/issues/4040#issuecomment-1881487245

   I will look at this issue.
   


-- 
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: notifications-unsubscribe@accumulo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Make sure tab completion is disabled when executing a single command [accumulo]

Posted by "ctubbsii (via GitHub)" <gi...@apache.org>.
ctubbsii commented on issue #4040:
URL: https://github.com/apache/accumulo/issues/4040#issuecomment-1887885278

   After looking into this, it seems that no changes are necessary. The processing of the commands from the command-line or from a file, all occur before the prompt appears, which is the first time the auto-completion is set up. If the prompt never appears, in the case of `-e` or if `-f` or `-fv` specify a file with an `exit` command, then the auto-completion is always bypassed.


-- 
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: notifications-unsubscribe@accumulo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org