Skip to content

Commit

Permalink
Docs: update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Set27 committed Aug 17, 2024
1 parent 283fc0c commit 2685a5b
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ TTY-Prompt-files is extension for [tty-prompt](https://github.com/piotrmurach/tt

## Usage

**For now**, library support selection **only** non hidden **files** (directories is currently not supported).

```rb
prompt = TTY::Prompt.new

Expand All @@ -17,10 +15,10 @@ After element is selected, output will be a element full path.
`select_element_from_file_system` has 3 parameters:

```rb
prompt.select_element_from_file_system((pattern: "*", path: ".", text: ""))
prompt.select_element_from_file_system(pattern: "*", path: ".", text: "")
```

`pattern` is determining for what file will be output based on matching the pattern.\
`pattern` is determining for what file will be output based on matching the pattern. If you want to display hidden files, use `"{.[^\.]*,*}"` pattern.\
`path` is determining path of the directory, can be relative or absolute. **Note**: relative **should not** end with `/`.\
`text` is text user will see along with elements.

Expand Down

0 comments on commit 2685a5b

Please sign in to comment.