[opensuse-packaging] New completion script for osc
Hi, for the revised completion script I like to have some testers. you'll find the script in the attachment. Note that currently the old script is /usr/lib/osc/complete which is activated in /etc/profile.d/osc.sh /etc/profile.d/osc.csh that is you need an other location to test it out. You may name the attachment as ~/bin/osc.complete and use COMP_WORDBREAKS="${COMP_WORDBREAKS//:}" complete -C osc.complete osc for bash as your shell ... or complete osc 'p@*@`\osc.complete`@' if your shell is the tcsh. Werner -- "Having a smoking section in a restaurant is like having a peeing section in a swimming pool." -- Edward Burr
On Friday 08 March 2013, Dr. Werner Fink wrote:
Hi,
for the revised completion script I like to have some testers.
I haven't seen any issues but it's still so annoying slow that I wouldn't use it. I'd really like to see an osc.complete config option to disable any slow network operations or just to disable it completely. (Removing /etc/profile.d/osc.* does not survive updates via rpm) Or another idea would be an auto installed cronjob which prepares the cache to avoid regularly waiting for minutes after typing TAB. cu, Rudi -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
On Sat, Mar 09, 2013 at 10:57:43PM +0100, Ruediger Meier wrote:
On Friday 08 March 2013, Dr. Werner Fink wrote:
Hi,
for the revised completion script I like to have some testers.
I haven't seen any issues but it's still so annoying slow that I wouldn't use it. I'd really like to see an osc.complete config option to disable any slow network operations or just to disable it completely. (Removing /etc/profile.d/osc.* does not survive updates via rpm)
Or another idea would be an auto installed cronjob which prepares the cache to avoid regularly waiting for minutes after typing TAB.
Hmm ... shouldn't this happen only once a day, should it? On the other hand, after the ~/.osc.projects is refreshed, does the completion its self work well? Don't know if a cron job which requires a network connection is wanted as it would trigger an dailin/(re)connect. Werner -- "Having a smoking section in a restaurant is like having a peeing section in a swimming pool." -- Edward Burr -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
On Monday 11 March 2013, Dr. Werner Fink wrote:
On Sat, Mar 09, 2013 at 10:57:43PM +0100, Ruediger Meier wrote:
On Friday 08 March 2013, Dr. Werner Fink wrote:
Hi,
for the revised completion script I like to have some testers.
I haven't seen any issues but it's still so annoying slow that I wouldn't use it. I'd really like to see an osc.complete config option to disable any slow network operations or just to disable it completely. (Removing /etc/profile.d/osc.* does not survive updates via rpm)
Or another idea would be an auto installed cronjob which prepares the cache to avoid regularly waiting for minutes after typing TAB.
Hmm ... shouldn't this happen only once a day, should it?
Yes, but mostly if I get stucked on the completion then I just interrupt it. IMO it takes far too long for interactive usage. Also obs servers are quite often not working/reachable. At these times it's even more annoying to wait, and you would wait repeatedly.
On the other hand, after the ~/.osc.projects is refreshed, does the completion its self work well?
I have generally problems with ":" in the completion strings. For example $ osc co devel:la<TAB> completes to $ osc co devel:devel:languages So it doubles "devel". I have the same problem even with completion of the cd command. Thats why I usually disable SuSE's bash completion by touching ~/.bash.expert. At the time I've looked at this I found that ":" problem exists because SuSE's completion replaces escaped colons ("\:" -> ":"). The default bash completion always escapes them and it works as expected.
Don't know if a cron job which requires a network connection is wanted as it would trigger an dailin/(re)connect.
Maybe we could introduce a sysconfig var like "INET_IS_PERMANENT", probably also useful for similar use cases. cu, Rudi -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
On Fri, Mar 8, 2013 at 10:10 AM, Dr. Werner Fink
Hi,
for the revised completion script I like to have some testers. you'll find the script in the attachment. Note that currently the old script is /usr/lib/osc/complete which is activated in
/etc/profile.d/osc.sh /etc/profile.d/osc.csh
that is you need an other location to test it out.
You may name the attachment as ~/bin/osc.complete and use
COMP_WORDBREAKS="${COMP_WORDBREAKS//:}" complete -C osc.complete osc
for bash as your shell ... or
complete osc 'p@*@`\osc.complete`@'
if your shell is the tcsh.
Werner
Werner, I may not understand what the tool does, but I gave it a shot: osc getb<tab> results in osc getbinaries [correct result I assume] osc getb<tab><tab> results in osc getbinaries getbinaries [wrong result I assume] Greg -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
participants (3)
-
Dr. Werner Fink
-
Greg Freemyer
-
Ruediger Meier