Bash auto-completion for Linux platforms

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: Bash auto-completion for Linux platforms

Re: Bash auto-completion for Linux platforms

by Graf Zahl » Sat Mar 24, 2018 4:14 am

Anything up here. I think this can be closed after lying dead for 8 months.

Re: Bash auto-completion for Linux platforms

by Rachael » Wed Jul 19, 2017 11:41 am

Have you tried PM'ing Blzut3 about this?

He could update his packages with this.

Re: Bash auto-completion for Linux platforms

by Caligari87 » Mon Jun 12, 2017 8:19 pm

Got generalized directory/file completion working, updated the script in the OP. It's not as fancy as it could be (such as only allowing file autocomplete for options that accept it) but it gets the job done.

8-)

Re: Bash auto-completion for Linux platforms

by Caligari87 » Mon Jun 12, 2017 4:48 pm

I've discovered that the autocomplete script above doesn't work for filenames/directories, so I'm trying to figure out the appropriate fix. If anyone has any experience with bash scripting and autocompletion, help appreciated.

8-)

Bash auto-completion for Linux platforms

by Caligari87 » Fri Jun 09, 2017 3:09 pm

Not sure where the right place to put this is, as it's Linux-specific and I'm not sure how installation paths are determined in the GitHub source. Hope that's not a problem.

In short, this file will provide command-line auto-completion for gzdoom when running in a (ba)sh terminal. I built it from a template at this page. Per that page, on Debian-based platforms at least, this file (named simply "gzdoom") may be placed or softlinked into "/etc/bash_completion.d/". I've done that on my Linux Mint system and it works like a charm.

UPDATED: autocompletes directories/files now
Spoiler:
I used the wiki page on [wiki]Command line parameters[/wiki] to get the options I included, minus the Zandronum-specific section. There's probably additional possibilities which could be added, both static and context-sensitive.

8-)

Top