(I have gone ahead and created a ~/.jline.rc containing jline.terminal=auto since writing this issue.)
My issue is my control keys do not work, and what can I do to work around this issue.
Here is a description of what I've done.
I am running
java -cp target/jline-2.11-SNAPSHOT-tests.jar:target/jline-2.11-SNAPSHOT.jar -Djline.internal.Log.debug=true jline.example.Example none
in my ~/jline2 directory, where I installed jline2. My control keys (ctrl+a, ctrl+e, ctrl+u and Backspace) do not work.
I am logging into an Ubuntu 12.04 system with bash as the shell and using a VanDyke SecureCrt terminal emulator product. I have made no recent settings changes to my emulator.
First, I notice I have no ~/.jline.rc file
[DEBUG] Loading properties from: file:/home/cnorton/.jline.rc
[DEBUG] Unable to read configuration from: file:/home/cnorton/.jline.rc
java.io.FileNotFoundException: /home/cnorton/.jline.rc (No such file or directory)
After the stack trace, here is the rest of the output.
[DEBUG] Creating terminal; type=auto
[DEBUG] Config: speed 38400 baud; rows 34; columns 117; line = 0;
intr = ^C; quit = ^; erase = ^?; kill = ^U; eof = ^D; eol = ;
eol2 = ; swtch = ; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R;
werase = ^W; lnext = ^V; flush = ^O; min = 1; time = 0;
-parenb -parodd cs8 -hupcl -cstopb cread clocal -crtscts
-ignbrk brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon -ixoff
-iuclc -ixany imaxbel -iutf8
opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt
echoctl echoke
[DEBUG] Created Terminal: jline.UnixTerminal@1d520c4
[DEBUG] Registering shutdown-hook: Thread[JLine Shutdown Hook,5,main]
[DEBUG] Adding shutdown-hook task: jline.TerminalSupport$1@1e9cb75
[DEBUG] Ansi supported: true
[DEBUG] Echo enabled: false
[DEBUG] NonBlockingInputStream start
[DEBUG] Loaded user configuration: file:/home/cnorton/.inputrc
prompt> [DEBUG] Running all shutdown-hook tasks
[DEBUG] Running task: jline.TerminalSupport$1@1e9cb75
[DEBUG] Removing shutdown-hook: Thread[JLine Shutdown Hook,5,main]
Here is some more debugging output from running
export JLINE_LOGGING=trace && lein trampoline run
in a cloned directory
git clone git://github.com/trptcolin/reply.git
Please note the control keys work.
cnorton@steamboy:~/reply$ export JLINE_LOGGING=trace && lein trampoline run
REPL-y 0.2.0-SNAPSHOT
Clojure 1.4.0
Exit: Control+D or (exit) or (quit)
Commands: (user/help)
Docs: (doc function-name-here)
(find-doc "part-of-name-here")
Source: (source function-name-here)
(user/sourcery function-name-here)
Javadoc: (javadoc java-object-or-class-here)
Examples from clojuredocs.org: [clojuredocs or cdoc](user/clojuredocs name-here)
(user/clojuredocs "ns-here" "name-here")
[DEBUG] Loading properties from: file:/home/cnorton/.jline.rc
[DEBUG] Loaded properties:
[DEBUG] jline.terminal=unix
[TRACE]
java.lang.Throwable: CREATE MARKER
at jline.TerminalFactory.create(TerminalFactory.java:50)
at jline.TerminalFactory.get(TerminalFactory.java:159)
at jline.console.ConsoleReader.(ConsoleReader.java:226)
at jline.console.ConsoleReader.(ConsoleReader.java:218)
at jline.console.ConsoleReader.(ConsoleReader.java:210)
at reply.reader.simple_jline$setup_console_reader.invoke(simple_jline.clj:39)
at reply.reader.simple_jline$get_input_line.invoke(simple_jline.clj:74)
at reply.reader.simple_jline$safe_read_line$fn__941.invoke(simple_jline.clj:101)
at clojure.lang.Atom.swap(Atom.java:37)
at clojure.core$swap_BANG_.invoke(core.clj:2108)
at reply.reader.simple_jline$safe_read_line.invoke(simple_jline.clj:99)
at reply.eval_modes.nrepl$safe_read_line.invoke(nrepl.clj:55)
at reply.eval_modes.nrepl$parsed_forms.invoke(nrepl.clj:88)
at reply.eval_modes.nrepl$run_repl.invoke(nrepl.clj:139)
at reply.eval_modes.nrepl$main.invoke(nrepl.clj:227)
at reply.main$launch_nrepl$fn__3187.invoke(main.clj:63)
at clojure.core$with_redefs_fn.invoke(core.clj:6585)
at reply.main$launch_nrepl.invoke(main.clj:62)
at reply.main$launch.invoke(main.clj:79)
at reply.main$_main.doInvoke(main.clj:89)
at clojure.lang.RestFn.invoke(RestFn.java:397)
at clojure.lang.Var.invoke(Var.java:411)
at clojure.lang.AFn.applyToHelper(AFn.java:159)
at clojure.lang.Var.applyTo(Var.java:532)
at reply.ReplyMain.main(ReplyMain.java:14)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at clojure.lang.Reflector.invokeMatchingMethod(Reflector.java:93)
at clojure.lang.Reflector.invokeStaticMethod(Reflector.java:207)
at clojure.lang.Reflector.invokeStaticMethod(Reflector.java:200)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at clojure.lang.Reflector.invokeMatchingMethod(Reflector.java:93)
at clojure.lang.Reflector.invokeStaticMethod(Reflector.java:207)
at user$eval5.invoke(NO_SOURCE_FILE:1)
at clojure.lang.Compiler.eval(Compiler.java:6511)
at clojure.lang.Compiler.eval(Compiler.java:6501)
at clojure.lang.Compiler.eval(Compiler.java:6477)
at clojure.core$eval.invoke(core.clj:2797)
at clojure.main$eval_opt.invoke(main.clj:297)
at clojure.main$initialize.invoke(main.clj:316)
at clojure.main$null_opt.invoke(main.clj:349)
at clojure.main$main.doInvoke(main.clj:427)
at clojure.lang.RestFn.invoke(RestFn.java:421)
at clojure.lang.Var.invoke(Var.java:419)
at clojure.lang.AFn.applyToHelper(AFn.java:163)
at clojure.lang.Var.applyTo(Var.java:532)
at clojure.main.main(main.java:37)
[DEBUG] Creating terminal; type=unix
[TRACE] Running: [sh,-c,stty -a < /dev/tty]
[TRACE] Result: speed 38400 baud; rows 34; columns 117; line = 0;
intr = ^C; quit = ^; erase = ^?; kill = ^U; eof = ^D; eol = ;
eol2 = ; swtch = ; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R;
werase = ^W; lnext = ^V; flush = ^O; min = 1; time = 0;
-parenb -parodd cs8 -hupcl -cstopb cread clocal -crtscts
-ignbrk brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon -ixoff
-iuclc -ixany imaxbel -iutf8
opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt
echoctl echoke
[DEBUG] Config: speed 38400 baud; rows 34; columns 117; line = 0;
intr = ^C; quit = ^; erase = ^?; kill = ^U; eof = ^D; eol = ;
eol2 = ; swtch = ; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R;
werase = ^W; lnext = ^V; flush = ^O; min = 1; time = 0;
-parenb -parodd cs8 -hupcl -cstopb cread clocal -crtscts
-ignbrk brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon -ixoff
-iuclc -ixany imaxbel -iutf8
opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt
echoctl echoke
[DEBUG] Created Terminal: jline.UnixTerminal@74a7af
[DEBUG] Registering shutdown-hook: Thread[JLine Shutdown Hook,5,main]
[DEBUG] Adding shutdown-hook task: jline.TerminalSupport$1@183e6d4
[DEBUG] Ansi supported: true
[TRACE] Running: [sh,-c,stty -icanon min 1 -icrnl -inlcr < /dev/tty]
[TRACE] Result:
[TRACE] Running: [sh,-c,stty -echo < /dev/tty]
[TRACE] Result:
[DEBUG] Echo enabled: false
[DEBUG] NonBlockingInputStream start
[DEBUG] Loaded user configuration: file:/home/cnorton/.inputrc
[TRACE] Loading history from: /home/cnorton/.jline-reply.history
user=> [TRACE] Running: [sh,-c,stty intr undef < /dev/tty]
[TRACE] Result:
[TRACE] Keystroke: 1
[TRACE] Binding: BEGINNING_OF_LINE
[TRACE] Keystroke: 5
[TRACE] Binding: END_OF_LINE
[TRACE] Keystroke: 21
[TRACE] Binding: UNIX_LINE_DISCARD
[TRACE] Keystroke: 127
[TRACE] Binding: BACKWARD_DELETE_CHAR