Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to autocomplete file paths? #16

Closed
bloudermilk opened this issue Oct 13, 2012 · 9 comments · May be fixed by #37
Closed

How to autocomplete file paths? #16

bloudermilk opened this issue Oct 13, 2012 · 9 comments · May be fixed by #37

Comments

@bloudermilk
Copy link

One of my commands simply accepts a file path as a parameter but I can't seem to figure out how to re-enable native autocompletion. Is this possible?

@bloudermilk
Copy link
Author

Here's the sub in question if it helps: pilot-install.

@bloudermilk
Copy link
Author

@qrush would love to get your advice on this!

@qrush
Copy link
Owner

qrush commented Nov 1, 2012

It doesn't seem like the script linked uses autocompletions at all. Have you read:

https://github.com/37signals/sub#autocompletion

Basically you could have:

# Provide pilot completions
if [ "$1" = "--complete" ]; then
  exec ls
fi

@bloudermilk
Copy link
Author

@qrush I've read referenced documentation and successfully implemented autocompletion for a couple commands already. It seems like if I wanted to do a traditional path autocomplete I would need to have access to the partial argument being completed. Is that right?

@bloudermilk
Copy link
Author

@qrush not sure if this fell off your radar or you've just been busy...

@qrush
Copy link
Owner

qrush commented Nov 30, 2012

Yes, both, and I've been on vacation all this week. I'm really not sure of the best way to do this other than what I provided earlier, sorry.

@bloudermilk
Copy link
Author

No worries, thanks for your help.

@qrush
Copy link
Owner

qrush commented Dec 7, 2012

Hey @bloudermilk does #27 work for you?

@bloudermilk
Copy link
Author

@qrush yes, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants