schlitt.info - php, photography and private stuff ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :Author: Tobias Schlitt :Date: Wed, 19 Nov 2008 23:29:46 +0100 :Revision: 1 :Copyright: CC by-nc-sa ====================================== Bash completion for the PEAR Installer ====================================== :Description: I always wanted to have the PEAR commands get auto completed on my bash. Here is how it works: I always wanted to have the PEAR commands get auto completed on my bash. Here is how it works: :: complete -W "`pear 2>&1 | awk '{ORS=" "} /[a-zA-Z-]+ / {print $1}'`" -f pear Simply run the command in your shell and/or add it to e.g. your .bashrc. You will have autocompletion for all PEAR Installer commands and for filenames in paralell. Usually I'd have expected to get the stuff working using complete's "-C" option, this did not work for me, I got a list of all possible commands when typing , but neither a correct completion suggestion nor a completion. .. Local Variables: mode: rst fill-column: 79 End: vim: et syn=rst tw=79 Trackbacks ========== - Auto-complete for PEAR commandline on Sat, 04 Jun 2005 12:19:17 +0200 in PHP kitchen First of all let me reiterate that if you're not taking advantage of the PEAR commandline installer you're missing out on one of the best aspects of PHP.Now, thanks to Tobias, using PEAR at the commandline has become easier than every with auto-complete e - code completion für apt-get on Sat, 04 Jun 2005 15:31:44 +0200 in codeschmie.de Nachdem ich die code completion für PEAR gesehen hatte, hab ich das gleich mal für das Tool nachgebaut, das ich noch häufiger verwende: apt-get Also einfach das hier in die ~/.bashrc und apt-get TAB komplettiert complete -W "`apt-get 2>&1 | awk '{ORS= Comments ========