Skip to content


Subversion checkout URL

You can clone with
Download ZIP


How to autocomplete file paths? #16

bloudermilk opened this Issue · 9 comments

2 participants


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?


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


@qrush would love to get your advice on this!


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

Basically you could have:

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

@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?


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


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.


No worries, thanks for your help.

@chrisjaure chrisjaure referenced this issue from a commit in chrisjaure/sub
@chrisjaure chrisjaure fall through to default bash completion
When there are no completions for a command, fall through to default bash completion. Fixes #16.

I also added the patch from #12.

Hey @bloudermilk does #27 work for you?


@qrush yes, thank you!

@bloudermilk bloudermilk closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.