1 /* 2 * Copyright (c) 2002-2012, the original author or authors. 3 * 4 * This software is distributable under the BSD license. See the terms of the 5 * BSD license in the documentation provided with this software. 6 * 7 * http://www.opensource.org/licenses/bsd-license.php 8 */ 9 package jline; 10 11 import jline.internal.Log; 12 import jline.internal.TerminalLineSettings; 13 14 /** 15 * Terminal that is used for unix platforms. Terminal initialization 16 * is handled by issuing the <em>stty</em> command against the 17 * <em>/dev/tty</em> file to disable character echoing and enable 18 * character input. All known unix systems (including 19 * Linux and Macintosh OS X) support the <em>stty</em>), so this 20 * implementation should work for an reasonable POSIX system. 21 * 22 * @author <a href="mailto:mwp1@cornell.edu">Marc Prud'hommeaux</a> 23 * @author <a href="mailto:dwkemp@gmail.com">Dale Kemp</a> 24 * @author <a href="mailto:jason@planet57.com">Jason Dillon</a> 25 * @author <a href="mailto:jbonofre@apache.org">Jean-Baptiste Onofré</a> 26 * @since 2.0 27 */ 28 public class UnixTerminal 29 extends TerminalSupport 30 { 31 private final TerminalLineSettings settings = new TerminalLineSettings(); 32 33 public UnixTerminal() throws Exception { 34 super(true); 35 } 36 37 protected TerminalLineSettings getSettings() { 38 return settings; 39 } 40 41 /** 42 * Remove line-buffered input by invoking "stty -icanon min 1" 43 * against the current terminal. 44 */ 45 @Override | 1 /* 2 * Copyright (c) 2002-2012, the original author or authors. 3 * 4 * This software is distributable under the BSD license. See the terms of the 5 * BSD license in the documentation provided with this software. 6 * 7 * http://www.opensource.org/licenses/bsd-license.php 8 */ 9 package jdk.internal.jline; 10 11 import jdk.internal.jline.internal.Log; 12 import jdk.internal.jline.internal.TerminalLineSettings; 13 14 /** 15 * Terminal that is used for unix platforms. Terminal initialization 16 * is handled by issuing the <em>stty</em> command against the 17 * <em>/dev/tty</em> file to disable character echoing and enable 18 * character input. All known unix systems (including 19 * Linux and Macintosh OS X) support the <em>stty</em>), so this 20 * implementation should work for an reasonable POSIX system. 21 * 22 * @author <a href="mailto:mwp1@cornell.edu">Marc Prud'hommeaux</a> 23 * @author <a href="mailto:dwkemp@gmail.com">Dale Kemp</a> 24 * @author <a href="mailto:jason@planet57.com">Jason Dillon</a> 25 * @author <a href="mailto:jbonofre@apache.org">Jean-Baptiste Onofr\u00E9</a> 26 * @since 2.0 27 */ 28 public class UnixTerminal 29 extends TerminalSupport 30 { 31 private final TerminalLineSettings settings = new TerminalLineSettings(); 32 33 public UnixTerminal() throws Exception { 34 super(true); 35 } 36 37 protected TerminalLineSettings getSettings() { 38 return settings; 39 } 40 41 /** 42 * Remove line-buffered input by invoking "stty -icanon min 1" 43 * against the current terminal. 44 */ 45 @Override |