Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I want to learn how to write bash completion scripts. Which tutorial would you recommend for a newbie?

share|improve this question

closed as too broad by Braiam, slm, Ramesh, jasonwryan, strugee Jun 1 at 21:04

There are either too many possible answers, or good answers would be too long for this format. Please add details to narrow the answer set or to isolate an issue that can be answered in a few paragraphs.If this question can be reworded to fit the rules in the help center, please edit the question.

2  
What do you mean by "bash completion tutorial"? Please explain. –  Patkos Csaba Dec 10 '10 at 21:14
1  
the explanation is needed on the word "tutorial", what do you actually need? –  phunehehe Dec 11 '10 at 0:26
2  
@Tshepang: I guess you mean you want to learn how to write bash completion routines? Using bash completion is pretty easy, you just hit the tab key. –  intuited Dec 11 '10 at 4:45
8  
You may want to check out the link I provide in my answer here: unix.stackexchange.com/questions/1800/custom-autocomplete –  Steven D Dec 11 '10 at 5:45
    
so this will become a duplicate I guess –  phunehehe Dec 11 '10 at 16:56

2 Answers 2

There aren't that many bash completion tutorials around, but this one is pretty good:

Introduction to Bash Completion

  • Part 1 is for general knowledge
  • Part 2 covers creating scripts in /etc/bash_completion.d/
share|improve this answer

I would start by looking at the library of bash completions already put together by the folks here:

http://bash-completion.alioth.debian.org/

They also have a mailing list:

http://lists.alioth.debian.org/mailman/listinfo/bash-completion-devel

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.