[Bug 212928] New: Remove /etc/bash_completion.d/yast2-completion.sh from default install
https://bugzilla.novell.com/show_bug.cgi?id=212928 Summary: Remove /etc/bash_completion.d/yast2-completion.sh from default install Product: openSUSE 10.2 Version: Alpha 5 Platform: Other OS/Version: Other Status: NEW Severity: Normal Priority: P5 - None Component: YaST2 AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: llunak@novell.com QAContact: jsrain@novell.com The yast2-completion.sh script causes noticeable I/O that can make it take 0,5-1s for virtually no gain for the vast majority of users. Please move it to some yast2 devel package that's not installed by default, cache the results or just dump it. Steps to reproduce: - Move /etc/bash_completion.d/yast2-completion.sh somewhere else. - Reboot machine (or just cause high memory load that'll discard disk caches). - $bash - $time bash yast2-completion.sh -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=212928 aj@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|bnc-team- |yast2-maintainers@suse.de |screening@forge.provo.novell| |.com | -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=212928 sh@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|yast2-maintainers@suse.de |jsrain@novell.com ------- Comment #1 from sh@novell.com 2006-10-17 07:37 MST ------- I didn't know we have such a thing... It's part of yast2.rpm. The file header says # yast2 completion # A Christmas gift from Carsten Hoeger It looks like this script performs tab completion for YaST2 modules: When you type yast2 inst<tab> it suggests inst_release_notes instserver inst_source So it's actually not a developer's tool, it is intended for normal users. I have no strong feelings for or against this completion, but if we provide it, it should be available for normal users, not only for YaST2 developers. But we might as well drop it. I don't think too many users know that this feature exists or even use it. IMHO normal users calling YaST2 modules from the command line would much rather try man yast2 (yes, there actually is a man page) or yast2 -h which shows that there is yast2 -l which lists the available modules. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=212928 mmarek@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mmarek@novell.com ------- Comment #2 from mmarek@novell.com 2006-10-18 06:59 MST ------- Hm, is it the MODLIST=(... $YAST -l ...) line that causes the I/O? What about populating the list first when it's really needed? @@ -2,13 +2,16 @@ # A Christmas gift from Carsten Hoeger YAST=/sbin/yast -# build a list of know yast modules -MODLIST=($(LC_ALL=C $YAST -l| grep '^[a-z]' | grep -v "Available")) +MODLIST=() _yast2 () { local cur prevprev prev len idx mod MODOPTS line opt rest MODOPTS=() + if test ${#MODLIST[*]} = 0; then + # build a list of know yast modules + MODLIST=($(LC_ALL=C $YAST -l| grep '^[a-z]' | grep -v "Available ")) + fi if [[ ${#COMP_WORDS[@]} -gt 4 ]]; then return 0 BTW it's not that useless as it might look like, it can save you some keystrokes, eg. 'yast fi<tab><enter>' launches the firewall module and so on. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=212928 ------- Comment #3 from llunak@novell.com 2006-10-20 08:17 MST ------- Yes, it should be the yast2 loading and seaching for the modules that takes the time. Populating the list on-demand should do, the patch looks ok to me. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=212928 jsrain@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED ------- Comment #4 from jsrain@novell.com 2006-10-24 01:45 MST ------- Patch applied to SVN. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
participants (1)
-
bugzilla_noreply@novell.com