Weblog entry #78 for Steve

Bash completion package
Posted by Steve on Wed 15 Feb 2006 at 11:38
Tags: none.

Today I started to get annoyed when my bash completion code wasn't available upon my laptop.

To fix this I've created a simple Debian package called steve-completion - with the intention that I'll move all my custom completion code into it. This should make my environments more sane and uniform.

Right now I've just added support for completion of upload targets to dupload, and completion of the options for the pyzor package. Over the next few days I'll add my other code.

To avoid naming conflicts the files are named /etc/bash_completion.d/foo.steve. I dislike the Steve-suffix, but I dont want to trample on files which may be made available by package maintainers. (Assuming I get round to filing wishlist bugs.)

This is comparible to the steve-base virtual package I made/use which exists solely as a package to pull in dependencies such as screen, sudo, etc. (These are packages which I miss when they are not available.)

I wonder how many other people have similar packages? I know I got the idea from mdz ..

 

Comments on this Entry

Posted by Steve (82.41.xx.xx) on Wed 15 Feb 2006 at 13:15
[ Send Message | View Steve's Scratchpad | View Weblogs ]

For reference:

Note to self: Post something about wildcard dns + intelligent redirection?

Steve

[ Parent | Reply to this comment ]

Posted by flyboy (66.92.xx.xx) on Wed 15 Feb 2006 at 22:58
[ Send Message ]
This is very cool.

I had a similar need: I was tired of moving to a new job (which happened far too often in the bad-old days after the crash a few years ago!), and finding myself staring at an empty computer, without all my favorite scripts and configurations.

I solved the problem by creating a SVN repository on my server at home, and putting everything in there.

But this idea of creating an actual Debian package is even more cool. That way you can have the installation of all of the pieces taken care of more automatically.

Thanks for sharing that idea!

[ Parent | Reply to this comment ]

Posted by redbeard (64.218.xx.xx) on Fri 17 Feb 2006 at 16:24
[ Send Message | View redbeard's Scratchpad | View Weblogs ]
This is awesome. I'm guessing some of the basic "make your own Debian packages" would help with setting this sort of thing up? I've got a Subversion repository with a lot of my configuration files and handy dandy scripts but a Debian package would be much nicer.

I've got a note on my scratchpad (and I'll probably blog on it once the idea is more fully formed) on what I'm thinking of.

[ Parent | Reply to this comment ]

Posted by Steve (82.41.xx.xx) on Fri 17 Feb 2006 at 18:13
[ Send Message | View Steve's Scratchpad | View Weblogs ]

If you've read the two part guide by bdf then you should understand the simple package I made easily.

The code is in CVS as mentioned above and provided you have the required packages installed (dpkg-dev, fakeroot, and devscripts) you should be able to build a package of the code by simply typing "make package", or "debuild".

Steve

[ Parent | Reply to this comment ]

Posted by opk (62.52.xx.xx) on Fri 17 Feb 2006 at 19:09
[ Send Message ]
If you like programmable completion under, you should consider giving zsh a go. It comes with completion functions for many many commands and they work a lot better than bash's.

[ Parent | Reply to this comment ]

Posted by Steve (82.41.xx.xx) on Fri 17 Feb 2006 at 19:11
[ Send Message | View Steve's Scratchpad | View Weblogs ]

Thanks for the suggestion, you're not alone in saying that zsh has better completion than bash.

To be honest I'm unlikely to switch shells since I'm very comfortable with Bash - and it is available on all the systems I use without any extra installation.

When it comes to completion there are many local scripts that I wish to add support for, so even if I did switch to zsh I would need to centralise my completion-additions.

Steve

[ Parent | Reply to this comment ]

User Login

Username:

Password:

[ Advanced Login ]

Register Account

Quick Site Search