Giter Club home page Giter Club logo

go-input-autocomplete's People

Contributors

hemantjoshi11 avatar joaodanielrufino avatar marcosfelipebc avatar rascaltwo avatar timlucca avatar wheeskyjack avatar yandiaszup avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

go-input-autocomplete's Issues

Relative path support

This program does not handle relative path. It is necessary to create this feature.

Path: panic: runtime error: while pressing tab as input

Hi,

I have pressed tab once input was asked. go-input-autocomplete was crashed with the following error.

`$ go run cmd/main.go
Path: panic: runtime error: index out of range [0] with length 0

goroutine 1 [running]:
github.com/JoaoDanielRufino/go-input-autocomplete.autocomplete.unixAutocomplete(0x5115a0, 0x5e1088, 0x0, 0x0, 0x1000000010000, 0x9, 0x0, 0x0)
/media/sf_gopath/src/go-input-autocomplete/autocomplete.go:35 +0x56c
github.com/JoaoDanielRufino/go-input-autocomplete.Autocomplete(0x0, 0x0, 0x0, 0xc0000942a0, 0xc0000a2ddf, 0x1)
/media/sf_gopath/src/go-input-autocomplete/autocomplete.go:20 +0x77
github.com/JoaoDanielRufino/go-input-autocomplete.(*Input).Autocomplete(0xc0000a2ee8, 0x0, 0x0)
/media/sf_gopath/src/go-input-autocomplete/input.go:65 +0x3c
github.com/JoaoDanielRufino/go-input-autocomplete.keyboardListener(0xc0000a2ee8, 0xc0000b4020, 0x0)
/media/sf_gopath/src/go-input-autocomplete/input_autocomplete.go:28 +0xf1
github.com/JoaoDanielRufino/go-input-autocomplete.Read(0x4f068d, 0x6, 0x0, 0x0, 0x0, 0x0)
/media/sf_gopath/src/go-input-autocomplete/input_autocomplete.go:50 +0xd4
main.main()
/media/sf_gopath/src/go-input-autocomplete/cmd/main.go:9 +0x3a
exit status 2
`

Absolute path bug

You can not autocomplete the first directory, it throws an error, it is working only after the first directory informed. For example if you are starting with /ho, on linux, it does not autocomplete to /home/.

Tab cycles through all possible suggestions

To make it more user friendly tab should show or cycle through all possible suggestions to the provided path. Example:
I have a directory with files:
test1, test2
When I type test and press tab it should show test1, when I press it again it should show test2, again and it should show test1 back again.

Windows support

This program only handles Linux autocompletion. It is necessary to create the autocompletion for windows as well

Darwin autocompletion

This program only handles linux autocompletion. It is necessary to create Darwin autocompletion as well

[issue] Parse input spaces properly

Tab autocomplete works with directories with spaces but only when spaces are not typed directly. Example:
On Windows I want to autocomplete "C:\Program Files", I have to type "C:\Program" and press tab. When I type "C:\Program<space>F" and press tab, it won't autocomplete. Issue also exists on Linux.

[feature] allow up and down arrow keys to select perticular subdirectory for traversal

Hi @JoaoDanielRufino ,
currently autocomplete doesn't give flexibility of listing sub-directories of given directory. This may pose little inconvenience to user if she doesn't already know the name of sub-directory. So , proposal is along with tab key, we should support up/down arrow keys, which will display the sub-directories name one by one. This will help user in selecting particular sub-directory more easily.
What you say?
Regards.

Add tests

Add tests to increase coverage of the code

Improvement on case sensitive

Like bash/cmd if you have a directory that starts with an uppercase letter and if you type it's name starting with a lowercase, the autocompletion handle the case sensitive. This program is not handling it, you need to type the uppercase letter in order to autocomplete.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.