apt-iselect: interactive apt-cache search tool

This is small wrapper for apt-cache search and apt-get install which uses iselect to search and install packages. If you have wml installed, you know (and like) iselect :-).

Special care has been taken to make this tool easy and fast to use (several times faster than aptitude for this task). Because of that design decision you can:

It will also automatically use sudo if it's installed. If not, it will ask for root password and use su. It will also automatically install iselect if it's not already installed.

It's written to be secure (using mktemp to create files) and nice to your system (it catches signals and clean up after itself).

Usage

Type in your command prompt:
dpavlin@llin:~$ apt-iselect tetris
Using sudo, please enter your password:
Searching apt-cache for "tetris"...

Select package which you want to install...
select package
You may also select more than one package using space and then press enter to view details of all those packages.

Install package by selecting Package: line...
install package

That's it...

dpavlin@llin:~$ apt-iselect tetris
Searching apt-cache for "tetris"...
disabling proxy...
Reading Package Lists... Done
Building Dependency Tree... Done
The following NEW packages will be installed:
  cuyo
0 packages upgraded, 1 newly installed, 0 to remove and 79 not upgraded.
Need to get 0B/801kB of archives.
After unpacking 2245kB of additional disk space will be used.
Selecting previously deselected package cuyo.
(Reading database ... 99014 files and directories currently installed.)
Unpacking cuyo (from .../archives/cuyo_1.7.0-1_i386.deb) ...
Setting up cuyo (1.7.0-1) ...

dpavlin@llin:~$

ChangeLog

2003-08-02 first version
2003-08-03 using mktemp to create temp files, auto-install iselect
2003-08-04 catch signals so temp files are not left behind, added enter new search at end of results, autoconfig
2003-08-06 changed delimiter to \s/ to prevent conflict with e-mails
2003-08-15 automatically run apt-get update if there is no package list (e.g. changing apt/sources.list without update), cut lines to 80 chars before sending to iselect (bug workaround)
2003-08-31 changed delimiters to {}, q on detail page brings back list of results, highlighted search word(s) in package details
2003-09-01 changed script to work with any POSIX complient shell, and not only bash (thanks to Ulrich Doehner for bug report and suggestions), added support to use su if sudo is not installed, fixed search with more than one word (thanks to Tobias Gruetzmacher who reported this bug)
2003-09-04 moved do_sudo before first call (fixes bug when trying to install iselect)
2003-10-09 allow multi-selection of packages to view details
2003-11-13 fix for RedHat 9.0 mktemp bug suggested by Dobes Vandermeer
2004-07-27 allow multi-selection of packages to install
2004-12-04 add quick install options
2004-12-06 fixed multi-word search

Known limitations

Number of search results is limited to 1020. That's because iselect has limit of 1024 lines, and I use 4 lines for new search and spacing.

Download

-= Download script and install it anywhere on your system.
apt-iselect 5.0 Kb

If you don't like this tool, you might like apteryx. I don't like text GUIs, so apt-iselect is my favorite (and I wrote it after all...)