Re: Bash-completion with triggers

2011-04-10 Thread David Paleino
A quick update... On Thu, 7 Apr 2011 15:16:20 +0200, Raphael Hertzog wrote: The trigger is going to happen very often (like the man-db one) and with a 10s impact it's very noticable... I think the time spent was the major objection, so I stripped it down to... $ time ./update-bash-completion

Re: Bash-completion with triggers

2011-04-10 Thread Eugene V. Lyubimkin
On 2011-04-10 11:56, David Paleino wrote: I think the time spent was the major objection, so I stripped it down to... $ time ./update-bash-completion bash-completion: updating completion symlinks... done. real 0m0.225s user 0m0.148s sys 0m0.020s $ Very good! Now, with that time

Re: Bash-completion with triggers

2011-04-10 Thread David Paleino
On Sun, 10 Apr 2011 13:11:57 +0300, Eugene V. Lyubimkin wrote: On 2011-04-10 11:56, David Paleino wrote: Now, with that time spent, I suppose the objections against triggers would be fewer and less important. Am I wrong? :) I must say I'm a bit uncomfortable with APT-hooks, since the

Re: Bash-completion with triggers

2011-04-10 Thread Ansgar Burchardt
Hi, David Paleino da...@debian.org writes: I've implemented a new revision of bash-completion, which uses debtriggers(5) to load only relevant completions, and symlink them when something touches /usr/bin/, /usr/games/, /usr/sbin/, /sbin/, /bin/, and so on. zsh supports autoloading of

Re: Bash-completion with triggers

2011-04-10 Thread David Paleino
On Sun, 10 Apr 2011 12:24:11 +0200, Ansgar Burchardt wrote: David Paleino da...@debian.org writes: I've implemented a new revision of bash-completion, which uses debtriggers(5) to load only relevant completions, and symlink them when something touches /usr/bin/, /usr/games/, /usr/sbin/,

Re: Bash-completion with triggers

2011-04-10 Thread Josselin Mouette
Le dimanche 10 avril 2011 à 12:54 +0200, David Paleino a écrit : Also, we're currently targetting bash = 3.2, so we need to take care of backwards compatibility. For 2.0, we're probably bumping that requirement to = 4.1, so we can use newer bash features, which will hopefully make things

Re: Bash-completion with triggers

2011-04-10 Thread David Paleino
On Sun, 10 Apr 2011 14:55:12 +0200, Josselin Mouette wrote: Le dimanche 10 avril 2011 à 12:54 +0200, David Paleino a écrit : Also, we're currently targetting bash = 3.2, so we need to take care of backwards compatibility. For 2.0, we're probably bumping that requirement to = 4.1, so we

Re: Bash-completion with triggers

2011-04-10 Thread David Paleino
On Sun, 10 Apr 2011 15:25:09 +0200, David Paleino wrote: On Sun, 10 Apr 2011 14:55:12 +0200, Josselin Mouette wrote: Le dimanche 10 avril 2011 à 12:54 +0200, David Paleino a écrit : Also, we're currently targetting bash = 3.2, so we need to take care of backwards compatibility. For

Re: Bash-completion with triggers

2011-04-08 Thread Goswin von Brederlow
Eugene V. Lyubimkin jac...@debian.org writes: On 2011-04-07 18:15, Goswin von Brederlow wrote: Dpkg::Post-Invoke would be the right (best available) one. That would call your trigger after every dpkg invocation [...] This is not true, 'Dpkg::*-Invoke' script chain are called once

Bash-completion with triggers

2011-04-07 Thread David Paleino
-completion using triggers to watch the aforementioned directories? I have a package ready, and would upload it to experimental before going to unstable. Kindly, David -- . ''`. Debian developer | http://wiki.debian.org/DavidPaleino : :' : Linuxer #334216 --|-- http://www.hanskalabs.net

Re: Bash-completion with triggers

2011-04-07 Thread David Paleino
Hello Goswin, re-putting debian-devel in the loop, since I believe you forgot it. On Thu, 07 Apr 2011 12:20:34 +0200, Goswin von Brederlow wrote: David Paleino da...@debian.org writes: Hello everybody, I've implemented a new revision of bash-completion, which uses debtriggers(5) to load

Re: Bash-completion with triggers

2011-04-07 Thread Raphael Hertzog
loading seems much faster too. Is there any objection to bash-completion using triggers to watch the aforementioned directories? I feel uneasy about this. It means the trigger is going to be activated for any package installation and all packages are going to be put in triggers-awaited state

Re: Bash-completion with triggers

2011-04-07 Thread David Paleino
on the installed packages -- on my system, it takes about 10s -- but the shell loading seems much faster too. Is there any objection to bash-completion using triggers to watch the aforementioned directories? I feel uneasy about this. It means the trigger is going to be activated for any

Re: Bash-completion with triggers

2011-04-07 Thread Goswin von Brederlow
David Paleino da...@debian.org writes: On Thu, 7 Apr 2011 15:16:20 +0200, Raphael Hertzog wrote: You'd better use some apt hook to do the task you envision. A file trigger that is activated for a majority of package installation is probably better dealt with such a solution. Which hook

Re: Bash-completion with triggers

2011-04-07 Thread Eugene V. Lyubimkin
On 2011-04-07 18:15, Goswin von Brederlow wrote: Dpkg::Post-Invoke would be the right (best available) one. That would call your trigger after every dpkg invocation [...] This is not true, 'Dpkg::*-Invoke' script chain are called once before/after all dpkg invocations. But those hooks would

Re: Bash-completion with triggers

2011-04-07 Thread Raphael Hertzog
On Thu, 07 Apr 2011, David Paleino wrote: Only those installing executables in these directories: I know, I do not have stats but I expect this to be a very important percentage of packages. Unfortunately, I have to remove and re-create all the symlinks upon trigger activation: in fact, only

Re: Bash-completion with triggers

2011-04-07 Thread David Paleino
On Thu, 7 Apr 2011 22:14:31 +0300, Eugene V. Lyubimkin wrote: On 2011-04-07 18:15, Goswin von Brederlow wrote: Dpkg::Post-Invoke would be the right (best available) one. That would call your trigger after every dpkg invocation [...] This is not true, 'Dpkg::*-Invoke' script chain are

Re: Bash-completion with triggers

2011-04-07 Thread Eugene V. Lyubimkin
On 2011-04-07 21:19, David Paleino wrote: This is not true, 'Dpkg::*-Invoke' script chain are called once before/after all dpkg invocations. So it's just like a trigger monitoring /? (without the implications of triggers in terms of sequence of operations) No, I phrased it badly

Re: Bash-completion with triggers

2011-04-07 Thread Raphael Hertzog
On Thu, 07 Apr 2011, Eugene V. Lyubimkin wrote: On 2011-04-07 18:15, Goswin von Brederlow wrote: Dpkg::Post-Invoke would be the right (best available) one. That would call your trigger after every dpkg invocation [...] This is not true, 'Dpkg::*-Invoke' script chain are called once

Re: Bash-completion with triggers

2011-04-07 Thread David Kalnischkies
On Thu, Apr 7, 2011 at 21:19, David Paleino da...@debian.org wrote: On Thu, 7 Apr 2011 22:14:31 +0300, Eugene V. Lyubimkin wrote: On 2011-04-07 18:15, Goswin von Brederlow wrote: Dpkg::Post-Invoke would be the right (best available) one. That would call your trigger after every dpkg