Package: org.codehaus.groovy.tools.shell.completion

## [Groovy] Class FileNameCompleter

- org.codehaus.groovy.tools.shell.completion.FileNameCompleter

- All Implemented Interfaces and Traits:
    Completer

      class FileNameCompleter

  PATCHED copy from jline 2.12, with https://github.com/jline/jline2/issues/90 (no trailing blank) NOTE: we hope to work with the jline project to have this functionality absorbed into a future jline release and then remove this file, so keep that in mind if you are thinking of changing this file. A file name completer takes the buffer and issues a list of potential completions.

  This completer tries to behave as similar as possible to bash's file name completion (using GNU readline) with the following exceptions:

  - Candidates that are directories will end with "/"
  - Wildcard regular expressions are not evaluated or replaced
  - The "~" character can be used to represent the user's home, but it cannot complete to other users' homes, since java does not provide any way of determining that easily
  Authors:
    Marc Prud'hommeaux
    Jason Dillon
  Since:
    2.3

- - ### Constructor Summary

    Constructors
    Constructor and description
    `FileNameCompleter ()`
    `FileNameCompleter (boolean blankSuffix)`
    `FileNameCompleter (boolean blankSuffix, boolean handleLeadingHyphen)`

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `int` | `complete(String buffer, int cursor, List<CharSequence> candidates)`
    `` | `protected File` | `getUserDir()`
    `` | `protected File` | `getUserHome()`
    `` | `protected int` | `matchFiles(String buffer, String translated, File[] files, List<CharSequence> candidates, def hyphenChar)`
    `` | `protected CharSequence` | `render(CharSequence name, String hyphenChar)`
    `` | `protected String` | `separator()`

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class Object` | `wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll`

- - ### Constructor Detail

    - #### FileNameCompleter()

    - #### FileNameCompleter(boolean blankSuffix)

    - #### FileNameCompleter(boolean blankSuffix, boolean handleLeadingHyphen)

  - ### Method Detail

    - #### int complete(String buffer, int cursor, List<CharSequence> candidates)

    - #### protected File getUserDir()

    - #### protected File getUserHome()

    - #### protected int matchFiles(String buffer, String translated, File[] files, List<CharSequence> candidates, def hyphenChar)

    - #### protected CharSequence render(CharSequence name, String hyphenChar)

    - #### protected String separator()