This is an automated email from the ASF dual-hosted git repository.

sunlan pushed a commit to branch GROOVY_3_0_X
in repository https://gitbox.apache.org/repos/asf/groovy.git


The following commit(s) were added to refs/heads/GROOVY_3_0_X by this push:
     new 9340893  GROOVY-9875: backspace does not work in the SecureCRT 
connecting Linux
9340893 is described below

commit 9340893fd863fb95ac18f05691c0e8a8ed5a8c9d
Author: Daniel Sun <[email protected]>
AuthorDate: Tue Dec 29 18:58:56 2020 +0800

    GROOVY-9875: backspace does not work in the SecureCRT connecting Linux
    
    (cherry picked from commit 849660f9a7ba0dda6343e6f3eff32b4273796914)
---
 src/bin/startGroovy | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/src/bin/startGroovy b/src/bin/startGroovy
index a232f1f..ee4b263 100644
--- a/src/bin/startGroovy
+++ b/src/bin/startGroovy
@@ -61,6 +61,7 @@ cygwin=false
 msys=false
 darwin=false
 nonstop=false
+linux=false
 case "$(uname)" in
   CYGWIN* )
     cygwin=true
@@ -74,6 +75,9 @@ case "$(uname)" in
   NONSTOP* )
     nonstop=true
     ;;
+  Linux* )
+    linux=true
+    ;;
 esac
 
 if [ "$1" = "-cp" ] || [ "$1" = "-classpath" ] || [ "$1" = "--classpath" ] ; 
then
@@ -110,6 +114,11 @@ if [ -z "$JAVA_HOME" ] ; then
     export JAVA_HOME
 fi
 
+# GROOVY-9875: backspace does not work in the SecureCRT connecting Linux
+if $linux ; then
+    export TERM=linux
+fi
+
 # For Cygwin, ensure paths are in UNIX format before anything is touched.
 if $cygwin ; then
     [ -n "$GROOVY_HOME" ] && GROOVY_HOME="$(cygpath --unix "$GROOVY_HOME")"

Reply via email to