< prev index next >

jdk/src/jdk.jline/share/classes/jdk/internal/jline/console/completer/FileNameCompleter.java

Print this page


   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.console.completer;
  10 
  11 import jline.internal.Configuration;
  12 
  13 import java.io.File;
  14 import java.util.List;
  15 
  16 import static jline.internal.Preconditions.checkNotNull;
  17 
  18 /**
  19  * A file name completer takes the buffer and issues a list of
  20  * potential completions.
  21  * <p/>
  22  * This completer tries to behave as similar as possible to
  23  * <i>bash</i>'s file name completion (using GNU readline)
  24  * with the following exceptions:
  25  * <p/>
  26  * <ul>
  27  * <li>Candidates that are directories will end with "/"</li>
  28  * <li>Wildcard regular expressions are not evaluated or replaced</li>
  29  * <li>The "~" character can be used to represent the user's home,
  30  * but it cannot complete to other users' homes, since java does
  31  * not provide any way of determining that easily</li>
  32  * </ul>
  33  *
  34  * @author <a href="mailto:mwp1@cornell.edu">Marc Prud'hommeaux</a>
  35  * @author <a href="mailto:jason@planet57.com">Jason Dillon</a>
  36  * @since 2.3


   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.console.completer;
  10 
  11 import jdk.internal.jline.internal.Configuration;
  12 
  13 import java.io.File;
  14 import java.util.List;
  15 
  16 import static jdk.internal.jline.internal.Preconditions.checkNotNull;
  17 
  18 /**
  19  * A file name completer takes the buffer and issues a list of
  20  * potential completions.
  21  * <p/>
  22  * This completer tries to behave as similar as possible to
  23  * <i>bash</i>'s file name completion (using GNU readline)
  24  * with the following exceptions:
  25  * <p/>
  26  * <ul>
  27  * <li>Candidates that are directories will end with "/"</li>
  28  * <li>Wildcard regular expressions are not evaluated or replaced</li>
  29  * <li>The "~" character can be used to represent the user's home,
  30  * but it cannot complete to other users' homes, since java does
  31  * not provide any way of determining that easily</li>
  32  * </ul>
  33  *
  34  * @author <a href="mailto:mwp1@cornell.edu">Marc Prud'hommeaux</a>
  35  * @author <a href="mailto:jason@planet57.com">Jason Dillon</a>
  36  * @since 2.3


< prev index next >