ctubbsii commented on a change in pull request #1910:
URL: https://github.com/apache/accumulo/pull/1910#discussion_r583717807



##########
File path: assemble/bin/accumulo
##########
@@ -58,6 +58,18 @@ function main() {
     echo "$CLASSPATH"
     exit 0
   fi
+  
+  # Set up path variable for default import config file
+  export jShellPath="$conf/jshell-init.jsh"
+  
+  if [[ $cmd == "jshell" ]]; then
+    shift
+    if [[ -f "$jShellPath" ]]; then
+      exec "$cmd" --startup DEFAULT "$jShellPath" "$@"

Review comment:
       I just learned that we can actually specify more than one `--startup` 
option, so if we don't want to customize the `java.*` imports for now, and just 
want the defaults, we can do:
   
   ```suggestion
         exec "$cmd" --startup DEFAULT --startup "$jShellPath" "$@"
   ```
   
   This preserves proper `/reset` and `/reload` behavior without mixing and 
matching `[options]` and `[load-files]` parameter, but saves us the work of 
generating `java.*` imports ourselves. However, it does leave the Scanner 
conflict in place, which is probably acceptable for now.




----------------------------------------------------------------
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.

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


Reply via email to