Re: Restricted tab-completion is annoying
On Thursday 11 October 2007 16:51:23 Vincenzo Ciancia wrote: On 11/10/2007 Aaron C. de Bruyn wrote: I don't think it's a good argument to say that people need to have user-friendly hand-holding at the command prompt. If I want to run 'evince somefile.asp' I should be able to. I don't care if the extension is .asp .pdf or .mystupidfile. The shortest path to solve usability of this would be to complete restricted for the first tab, and all files for the second. When I have file extension corrected, I love unzip to complete only .zip files. But this will always be in the way in many occasions. Just pressing tab again should extend the completion level. Vincenzo +2 -- BUGabundo :o) (``-_-´´) http://Ubuntu.BUGabundo.net Linux user #443786GPG key 1024D/A1784EBB My new micro-blog @ http://BUGabundo.net signature.asc Description: This is a digitally signed message part. -- Ubuntu-devel-discuss mailing list Ubuntu-devel-discuss@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss
Re: Restricted tab-completion is annoying
Op maandag 15-10-2007 om 17:46 uur [tijdzone +0100], schreef Ian Jackson: I too find the programmable completion very annoying. And I find them very useful, except where they have bugs (e.g. sudo -e, which should work like 'sudoedit'). IMHO tab-completion should complete to what's supposed to be there in most cases, maybe even giving hints if there is a choice between several types of data (e.g. options vs. filenames; where the former start with - or --). OTOH, I think applications should ideally provide their own tab-completion, to make sure the same commandline-parser is used for both completion and interpretation. -- Jan Claeys -- Ubuntu-devel-discuss mailing list Ubuntu-devel-discuss@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss
Re: Restricted tab-completion is annoying
I too find the programmable completion very annoying. And I find them very useful, except where they have bugs (e.g. sudo -e, which should work like 'sudoedit'). IMHO tab-completion should complete to what's supposed to be there in most cases, maybe even giving hints if there is a choice between several types of data (e.g. options vs. filenames; where the former start with - or --). OTOH, I think applications should ideally provide their own tab-completion, to make sure the same commandline-parser is used for both completion and interpretation. I don't think the debate should be about how useful it is or how annoying it is. If I have a file called myfile.jpg how does *LINUX* know what the file is? You might think it's a picture because of the .jpg extension--but firefox will tell you based off the MIME TYPE. So will the file command. I'm not saying we need to integrate mime typing into tab completion--because it would probably slow things to a crawl, but since we can't do it the RIGHT way, we need another approach. Here's what I see--correct me if I'm wrong, or add to it: * Tab completion based off a file name or part of a file name is wrong. You don't know if myfile.jpg is really a jpg or a pdf or a text file. Take my original firefox example where myfile.asp was really a PDF. And just last night I tried to get mplayer to play a WMV file (windows media) and it wouldn't auto-complete. Although it played just fine. * Because restricted tab-completion is broken, we need to find a solution * A better way would be mime-type completion--but it would probably slow tab-completion to a crawl when you had more than a few files. (A quick non-scientific test in a src directory shows 17 files all less than 100K took 1.017 seconds) * Tracker seems pretty cool, but I know nothing about it. Can we query it for a file's mime type and make it fast? * Disable it or enable it by default but have an option to disable/enable it system wide and/or per-user. And just to be clear, I'm not talking about disabiling the ability to do something like svn checTAB to get svn checkout or tab-completion of ssh hostnames. I am specifically talking about limiting the list of files presented based on the application you are trying to start and the file extensions. What Ian said a few messages up the thread hits the nail on the head for me: Predictability is far far more important than functionality for completion to be an effective useability aid. I think the best way to solve this is by using the last option above. Either enable or disable it by default, but provide options to enable/disable it on a per-user or per-system basis. It's not my right to tell someone they can't run their system using broken tab-completion if they want it that way. -A -- Ubuntu-devel-discuss mailing list Ubuntu-devel-discuss@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss
Re: Restricted tab-completion is annoying
On Mon, 2007-10-15 at 17:46 +0100, Ian Jackson wrote: So I submit that programmable completions should be off by default. As long as it stays on off by default for zsh, where it *always* has been context-specific. Scott -- Scott James Remnant [EMAIL PROTECTED] signature.asc Description: This is a digitally signed message part -- Ubuntu-devel-discuss mailing list Ubuntu-devel-discuss@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss
Re: Restricted tab-completion is annoying
On Mon, 2007-10-15 at 17:52 +0100, Scott James Remnant wrote: On Mon, 2007-10-15 at 17:46 +0100, Ian Jackson wrote: So I submit that programmable completions should be off by default. As long as it stays on off by default for zsh, where it *always* has ~~~ mentally delete this word :-) been context-specific. Scott -- Scott James Remnant [EMAIL PROTECTED] signature.asc Description: This is a digitally signed message part -- Ubuntu-devel-discuss mailing list Ubuntu-devel-discuss@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss
Re: Restricted tab-completion is annoying
On 12/10/2007, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: On Thu, Oct 11, 2007 at 06:43:15PM -0700, Aaron C. de Bruyn wrote: If I modify them, doesn't that mean they will get overwritten by the next update to the bash package? not if you modify them in your own .bashrc Yeah--but system-wide I want it off. On the hosting server I own, I have 4 other admins that would absolutely hate this. Well, then you should remove it from /etc/skel/.bashrc, and instruct existing users how to edit their .bashrc I also find this annoying, why not provide an env var or switch somewhere COMPLETE_ON_EXTENSION that is checked by /etc/bash_completion before turning on any of the annoying features, F -- Ubuntu-devel-discuss mailing list Ubuntu-devel-discuss@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss -- Ubuntu-devel-discuss mailing list Ubuntu-devel-discuss@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss
Re: Restricted tab-completion is annoying
So anyone who disliked anything in the system bashrc 10 years should have skipped all updates since? Why do I have to opt out of bug future fixes and improvements just because somebody else prefers their way of tab-completion? I have to disagree here. bash has tons of configuration files: /etc/bash.bashrc /etc/skel/.bashrc your own .bashrc you can put changes in any of these files, but obviously if you choose to modify one of the /etc file, you will have to deal with it! Just like you do for every other configuration file! dpkg deals with config files changes pretty well I think, you can rely on it to be warned when there is a new version and then merge your changes in it. you can also follow the vim way: add source /etc/bash.basrc.local at the end of your bash.bashrc file and put whatever big changes you want in this other file. Then you have the big changes you want and you can painlessly merge them with any new version. I have to agree with the previous comment: can we stop this madness now ? Config file conflicts are IMHO nicely handled in dpkg, just use it... -- Aurélien Naldi -- Ubuntu-devel-discuss mailing list Ubuntu-devel-discuss@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss
Re: Restricted tab-completion is annoying
On Fri, Oct 12, 2007 at 02:15:07PM +0100, Fergal Daly wrote: On 12/10/2007, Forest Bond [EMAIL PROTECTED] wrote: Hi, On Fri, Oct 12, 2007 at 09:07:17AM +0100, Fergal Daly wrote: On 12/10/2007, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: On Thu, Oct 11, 2007 at 06:43:15PM -0700, Aaron C. de Bruyn wrote: If I modify them, doesn't that mean they will get overwritten by the next update to the bash package? not if you modify them in your own .bashrc Yeah--but system-wide I want it off. On the hosting server I own, I have 4 other admins that would absolutely hate this. Well, then you should remove it from /etc/skel/.bashrc, and instruct existing users how to edit their .bashrc I also find this annoying, why not provide an env var or switch somewhere COMPLETE_ON_EXTENSION that is checked by /etc/bash_completion before turning on any of the annoying features, Enough with the madness. You are free to edit configuration files (files in /etc), and your changes will not be mindlessly overwritten on upgrades. Your preference for disabling fancy tab completion is addressed by changing your system-wide config. Please do so. So anyone who disliked anything in the system bashrc 10 years should have skipped all updates since? Why do I have to opt out of bug future fixes and improvements just because somebody else prefers their way of tab-completion? You don't have to skip the upgrades. You should install them. Your configuration file will not be updated automatically, but it is not that hard to diff the old new configs and pull in the new changes yourself. As an advanced user wanting a non-standard config, you should be comfortable with this. If you also feel that the default PDF tab completion could be better, file a bug. -Forest -- Forest Bond http://www.alittletooquiet.net signature.asc Description: Digital signature -- Ubuntu-devel-discuss mailing list Ubuntu-devel-discuss@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss
Re: Restricted tab-completion is annoying
On 12/10/2007, Forest Bond [EMAIL PROTECTED] wrote: Hi, On Fri, Oct 12, 2007 at 09:07:17AM +0100, Fergal Daly wrote: On 12/10/2007, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: On Thu, Oct 11, 2007 at 06:43:15PM -0700, Aaron C. de Bruyn wrote: If I modify them, doesn't that mean they will get overwritten by the next update to the bash package? not if you modify them in your own .bashrc Yeah--but system-wide I want it off. On the hosting server I own, I have 4 other admins that would absolutely hate this. Well, then you should remove it from /etc/skel/.bashrc, and instruct existing users how to edit their .bashrc I also find this annoying, why not provide an env var or switch somewhere COMPLETE_ON_EXTENSION that is checked by /etc/bash_completion before turning on any of the annoying features, Enough with the madness. You are free to edit configuration files (files in /etc), and your changes will not be mindlessly overwritten on upgrades. Your preference for disabling fancy tab completion is addressed by changing your system-wide config. Please do so. So anyone who disliked anything in the system bashrc 10 years should have skipped all updates since? Why do I have to opt out of bug future fixes and improvements just because somebody else prefers their way of tab-completion? F -Forest -- Forest Bond http://www.alittletooquiet.net -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFHD3BMRO4fQQdv5AwRAoSzAJ9p3MfVyN5luZu/y55AJMyxo6EWGwCg003f 5LhnhIQpqPo5i7zm8VYstBA= =1dUZ -END PGP SIGNATURE- -- Ubuntu-devel-discuss mailing list Ubuntu-devel-discuss@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss
Re: Restricted tab-completion is annoying
On 12/10/2007, Aurélien Naldi [EMAIL PROTECTED] wrote: So anyone who disliked anything in the system bashrc 10 years should have skipped all updates since? Why do I have to opt out of bug future fixes and improvements just because somebody else prefers their way of tab-completion? I have to disagree here. bash has tons of configuration files: /etc/bash.bashrc /etc/skel/.bashrc your own .bashrc you can put changes in any of these files, but obviously if you choose to modify one of the /etc file, you will have to deal with it! Just like you do for every other configuration file! dpkg deals with config files changes pretty well I think, you can rely on it to be warned when there is a new version and then merge your changes in it. you can also follow the vim way: add source /etc/bash.basrc.local at the end of your bash.bashrc file and put whatever big changes you want in this other file. Then you have the big changes you want and you can painlessly merge them with any new version. I have to agree with the previous comment: can we stop this madness now ? Config file conflicts are IMHO nicely handled in dpkg, just use it... Unlike the original poster, I'm not advocating changing the system files (although that would probably work reasonably well for me). As plain old user, I can A /etc/bash_completion B I can hack up my own version C I can just abandon smart completion entirely B is the situation I described above and both A nor B make life worse than before. When different people prefer different things (and the things really are different and mutually incompatible), it is not unreasonable to expect to a way to indicate your preference. Especially when something was the status quo for such a long time. I don't really feel strongly about this particular feature but I do get annoyed when people make incompatible changes to UIs without giving an easy route to the old UI. It's OK if the new way is a better way to access the same functionality but in this case it's not. There are plenty of other examples - Firefox 2.0's tabs, Evolution 2.10's quick search (which made part of the search criteria invisible), F -- Aurélien Naldi -- Ubuntu-devel-discuss mailing list Ubuntu-devel-discuss@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss -- Ubuntu-devel-discuss mailing list Ubuntu-devel-discuss@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss
Re: Restricted tab-completion is annoying
Hi, On Fri, Oct 12, 2007 at 09:07:17AM +0100, Fergal Daly wrote: On 12/10/2007, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: On Thu, Oct 11, 2007 at 06:43:15PM -0700, Aaron C. de Bruyn wrote: If I modify them, doesn't that mean they will get overwritten by the next update to the bash package? not if you modify them in your own .bashrc Yeah--but system-wide I want it off. On the hosting server I own, I have 4 other admins that would absolutely hate this. Well, then you should remove it from /etc/skel/.bashrc, and instruct existing users how to edit their .bashrc I also find this annoying, why not provide an env var or switch somewhere COMPLETE_ON_EXTENSION that is checked by /etc/bash_completion before turning on any of the annoying features, Enough with the madness. You are free to edit configuration files (files in /etc), and your changes will not be mindlessly overwritten on upgrades. Your preference for disabling fancy tab completion is addressed by changing your system-wide config. Please do so. -Forest -- Forest Bond http://www.alittletooquiet.net signature.asc Description: Digital signature -- Ubuntu-devel-discuss mailing list Ubuntu-devel-discuss@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss
Re: Restricted tab-completion is annoying
Op donderdag 11-10-2007 om 10:03 uur [tijdzone +0200], schreef Aurélien Naldi: - very smart completion: hostnames after ssh thanks to the content of your .ssh/knownhosts (which does not work with more recently added hosts as the hostname is no more written explicitely...) HashKnownHosts no Still works here... :) -- Jan Claeys -- Ubuntu-devel-discuss mailing list Ubuntu-devel-discuss@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss
Re: Restricted tab-completion is annoying
I think this sucks. I spend a lot of time at the bash prompt and use tab-completion constantly. When you are in bash, I would expect you sorta know what you are doing. I totally forgot my other example until just a few minutes ago when I went to modify my apt sources list. sudo -e /etc/apt/sourTAB gives me sudo -e /etc/apt/sources.list.d/ for no apparent reason. It doesn't appear to be a permissions issue. sudo vi /etc/apt/sourTAB gives me the correct result--sudo vi /etc/apt/sources.list Perhaps this is something I should file a bug report on? -A -- Ubuntu-devel-discuss mailing list Ubuntu-devel-discuss@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss
Re: Restricted tab-completion is annoying
On 10/11/07, Aaron C. de Bruyn [EMAIL PROTECTED] wrote: Ok--I'm sorry, but none of what you said made any sense to me. I don't see the point why filenames needs to be tab-completed on default, it does it when it's necessary. I'm asking why tab-completion changed from allowing tab-completion of EVERY file to being restricted. It sounds like you are asking why it needs to be on at all. My response to that is that it is a feature that people like and use. It's been that way for as long as I can remember. At least 8 years. Filenames does tab-complete on certain tasks and applications, depending on what are you trying to accomplish? Is that a question or statement? Yes, you hit tab to complete certain commands and filenames. It seems like Ubuntu is trying to be helpful by showing you only the things it thinks you need. For example, certain applications that require an input needs to tab-complete a filename on it's parameters (i.e. rsync), and executable files like python, perl, ruby bash scripts would need tab-completion to execute. Yes, that is why there is tab completion--because there are so many Linux command that take filenames as parameters. If you really want to autocomplete your filenames, you might as well make your files executable, So you are saying I should chmod +x all my videos, pictures, and music files in order to use tab-completion. That's an even worse solution. They aren't executable files. They are data files that need to be interpreted BY programs that I execute. and lastly why do you think this is necessary? Why do I think what is necessary? Tab completion? Disabling the new restrictions to tab-completion? Being able to use a feature that has been in bash forever but was recently (in my opinion) crippled? I think you are completely misunderstanding each other here... Aaron was writing about filename completion as in mplayer filename NOT as in using filename as a command!!! I would like also to add a few comments on bash_completion: as far as I know it is disabled by default in /etc/bash.bashrc (and BTW I always enable it here, with a few other things and this gets in the way when the ubuntu package introduces a new version of the config file.. A solution like /etc/bash.bashrc.local (similar to vimrc.local) would be great...) Then the default .bashrc for the users enables it (and duplicates most of /etc/bash.bashrc) I do not really love this solution, but if you do not like this behaviour, all you have to do is to comment out / delete a couple of lines in your .bashrc :) And to try to make you change your mind, here is why I love bash_completion: as said earlier it has context-dependent completion: - filenames with the expected extension only (which is your only problem with it) - options of many programs: mplayer, apt-get, makefiles... - option-dependant filename completion: after mplayer it completes only audio/video filenames but after mplayer file.avi -sub it completes only subtitle filenames which is great... - very smart completion: hostnames after ssh thanks to the content of your .ssh/knownhosts (which does not work with more recently added hosts as the hostname is no more written explicitely...), package names on apt-get --install and even INSTALLED packages names on apt-get --remove So the question is: should it stop filtering filenames by extensions ? I do not think so as having an extension is always helpfull as an hint and a good practice even if they are much less relevant under linux. A lot of program use them anyway: try to gunzip a file NOT name file.gz for exemple... And mplayer (and others like totem) automatically select a subtitle with the same filename than the currently played video file (except the extension obviously). I really think that you should use extensions (but not completely rely on them) and have fun with a much smaller/smarter completion list in bash ;) Anyway some special way to ask bash to bypass the extension-filtering in some cases would be great. Something like shifttab maybe (sorry if this already exists!). This way you get a smart filter for most case and keep the completion for your extension-less files ;) PS: really sorry for such a long comment... -- Aurélien Naldi -- Ubuntu-devel-discuss mailing list Ubuntu-devel-discuss@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss
Re: Restricted tab-completion is annoying
On 10/11/07, Aaron C. de Bruyn [EMAIL PROTECTED] wrote: Yes, you hit tab to complete certain commands and filenames. It seems like Ubuntu is trying to be helpful by showing you only the things it thinks you need. bash completion isn't an Ubuntu feature specifically - it's a bash feature. See http://www.hypexr.org/bash_tutorial.php#completion for more details. It now doesn't only operate on files. Try apt-cache show linux-image-3Tab and you'll see it complete from the package database. If you type cd, it only completes on directory names. If you type mplayer, there's obviously a rule to only complete files with a common video extension. So my guess is you could modify the bash completion config to perhaps complete any file there, or write a script to rename your videos to the appropriate extension. Hope that helps Morgan -- Ubuntu-devel-discuss mailing list Ubuntu-devel-discuss@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss
Re: Restricted tab-completion is annoying
Try with the following in your ~/.bashrc: shopt -u progcomp That turns off Programmable Completion (see the section in bash man page for more) and leaves you (well, it leaves me) with the normal file-based tab-completion. Actually, I'm a fan of programmable completion, but I don't like most of the rules that are added by /etc/bash_completion. I think they are, as you've found, confusing and too prescriptive. I just have a few rules which are set in my ~/.bashrc. If you want to go that route, then use instead: complete -r That will clear the list of completions before you add your own. Gavin. On 10 Oct 2007, at 22:23, Aaron C. de Bruyn wrote: Today a website generated a PDF file for me automatically and firefox popped up and asked if I wanted to download it. I hit 'OK' and it saved 'genpdf.asp' into my downloads folder. I was surprised to find bash wouldn't tab-complete the filename. Apparently there is new (newer than dapper) bash completion code that restricts completed files based on the initial part of the command. (/etc/bash_completion) I think this sucks. I spend a lot of time at the bash prompt and use tab-completion constantly. When you are in bash, I would expect you sorta know what you are doing. One example of where I *will* have issues is if I upgrade my home media server from Dapper to Gutsy. It stores all the video from my camcorder, copies of all my CDs and DVDs, pictures from digital cameras, etc... Most of the files don't have an extension because file extensions are sorta useless in Linux. If I upgrade to Gutsy it appears I won't be able to type in 'mplayer StarTrek-WrathTAB' and have it fill in 'StarTrek- Wrath_of_Kahn'. So I guess I have two questions * Why does the tab-completion code that restricts based on command- names exist? What benefit does this restriction have to power users?? * If it's here to stay, what is the official 'ubuntu way' to disable it for people who don't like it. It appears /etc/ bash_completion is owned by the bash package. If I upgrade bash, will it come back? I want it off my servers and workstations perminantly. I see nothing in /etc/defaults. -A -- Ubuntu-devel-discuss mailing list Ubuntu-devel-discuss@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss
Re: Restricted tab-completion is annoying
you can of course modify tab-completion by modifying /etc/bash_completion and the files in /etc/bash_completion.d that might be what you want to do. If I modify them, doesn't that mean they will get overwritten by the next update to the bash package? there are lots and lots of reasons to have program-specific tab-completion. for instance, having acroread complete only .pdf files means that the small number of pdf's in my home directory are easy to find when i start acroread. I know the reasons for program-specific tab completion--I love it with svn, but it is annoying when you are trying to tab-complete a filename and it won't do it because the file doesn't end with PDF or pdf for example. To me it seems like this is heading down the windows route. Give all your file names a 3 character extension so you know what to open it with. Shouldn't it be more 'unixy' and be based on the mime-type of the file? I know that would be a major pain implementation-wise, because your tab-completion would then have to figure out the mime type for every file that matches, slowing things down a bit... This user-friendly restrictedness should be in the GUI. (I just checked, and gnome shows my file as a PDF no matter what extension it has.) I maintain that the bash prompt is not supposed to be a user-friendly environment. It's the bash prompt afterall. It's where admins, power-users, and all-around geeks can go to do advanced stuff. I don't think it's a good argument to say that people need to have user-friendly hand-holding at the command prompt. If I want to run 'evince somefile.asp' I should be able to. I don't care if the extension is .asp .pdf or .mystupidfile. Anyways--that's my .02, and thanks to Gavin and his message, I can always run 'shopt -u progcomp' in my .bashrc if everyone else thinks it's a good idea to keep it. -A -- Ubuntu-devel-discuss mailing list Ubuntu-devel-discuss@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss
Re: Restricted tab-completion is annoying
On Thu, Oct 11, 2007 at 08:23:38AM -0700, Aaron C. de Bruyn wrote: If I modify them, doesn't that mean they will get overwritten by the next update to the bash package? No; it is a configuration file, which means dpkg will prompt you whether or not to replace the file. You can choose not to. I know the reasons for program-specific tab completion--I love it with svn, but it is annoying when you are trying to tab-complete a filename and it won't do it because the file doesn't end with PDF or pdf for example. To me it seems like this is heading down the windows route. Give all your file names a 3 character extension so you know what to open it with. Shouldn't it be more 'unixy' and be based on the mime-type of the file? You're right, the heuristic for evince is a bit flawed. mime-type would be foolproof, but imagine how long tab would take on a directory with 10,000 files if the mime-type of each file had to be checked, rather than just the name. I maintain that the bash prompt is not supposed to be a user-friendly environment. It's the bash prompt afterall. It's where admins, power-users, and all-around geeks can go to do advanced stuff. I don't think it's a good argument to say that people need to have user-friendly hand-holding at the command prompt. If I want to run 'evince somefile.asp' I should be able to. I don't care if the extension is .asp .pdf or .mystupidfile. For the most part I value a degree of user-friendliness in the shell that gets my work done faster. I work 90% of my time in the CLI and believe that my shell (zsh) tab completion boosts my overall productivity. Instead, there should be convenient/intuitive ways of disabling this functionality where it is not desired. pgp5SpuBoY7Nu.pgp Description: PGP signature -- Ubuntu-devel-discuss mailing list Ubuntu-devel-discuss@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss
Re: Restricted tab-completion is annoying
On 11/10/07 23:51, Vincenzo Ciancia wrote: The shortest path to solve usability of this would be to complete restricted for the first tab, and all files for the second. When I have file extension corrected, I love unzip to complete only .zip files. But this will always be in the way in many occasions. Just pressing tab again should extend the completion level. Vincenzo +1 -- Onno Benschop Connected via Optus B3 at S31°54'06 - E115°50'39 (Yokine, WA) -- ()/)/)()..ASCII for Onno.. |?..EBCDIC for Onno.. --- -. -. --- ..Morse for Onno.. ITmaze - ABN: 56 178 057 063 - ph: 04 1219 - [EMAIL PROTECTED] -- Ubuntu-devel-discuss mailing list Ubuntu-devel-discuss@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss
Re: Restricted tab-completion is annoying
If I modify them, doesn't that mean they will get overwritten by the next update to the bash package? not if you modify them in your own .bashrc Yeah--but system-wide I want it off. On the hosting server I own, I have 4 other admins that would absolutely hate this. sniffing the mime type of every file in the directory each time you hit tab ?? The day it starts doing this I'll stop using it... Yeah--that's what I was saying. It seems like that would be a huge waste of resources. I guess I wasn't clear--but there are two paths. Do tab completion on a system I consider broken (based on file extension) which doesn't actually tell you what is in the file. Or what nautilus appears to be doing--displaying a 'type' column that ignores the file extension. I tested it with my PDF example. It's sorta a catch-22. Use the 'broken' system or use the bloated system that would require mime lookups on every file. In my opinion, both are bad. That's why I would love to disable is entirely and just have tab completion for every file. (And parameters to things like svn, rsync, etc...) Do you have tracker or something similar installed ? nautilus does NOT sniff the mime type when it shoes the content of a directory, it does it only when you select the file I'm running a fairly default install of gutsy. Looking at the package list, it shows trackerd. Could bash maybe tie into that database easily? As much as I hate it restricting my tab-completion, at least it would be a little more accurate... Of course I may very well be a fringe case. and I do not want it to show me the non-pdf files in the same directory. I really like this filtering, but agree that we should have some way to complete other files as well (by hitting tab again or shift-tab or whatever) Agreed. I would love to have a system-wide disable option and/or a per-account option. For now I'll settle for what Gavin said in his message to the list. Toss 'shopt -u progcomp' into your .bashrc Of course I'm not that familiar with bash, but I'm guessing that probably turns off my nice svn command completion too... ;) -A -- Ubuntu-devel-discuss mailing list Ubuntu-devel-discuss@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss
Re: Restricted tab-completion is annoying
On Thu, Oct 11, 2007 at 06:43:15PM -0700, Aaron C. de Bruyn wrote: If I modify them, doesn't that mean they will get overwritten by the next update to the bash package? not if you modify them in your own .bashrc Yeah--but system-wide I want it off. On the hosting server I own, I have 4 other admins that would absolutely hate this. Well, then you should remove it from /etc/skel/.bashrc, and instruct existing users how to edit their .bashrc -- Ubuntu-devel-discuss mailing list Ubuntu-devel-discuss@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss
Restricted tab-completion is annoying
Today a website generated a PDF file for me automatically and firefox popped up and asked if I wanted to download it. I hit 'OK' and it saved 'genpdf.asp' into my downloads folder. I was surprised to find bash wouldn't tab-complete the filename. Apparently there is new (newer than dapper) bash completion code that restricts completed files based on the initial part of the command. (/etc/bash_completion) I think this sucks. I spend a lot of time at the bash prompt and use tab-completion constantly. When you are in bash, I would expect you sorta know what you are doing. One example of where I *will* have issues is if I upgrade my home media server from Dapper to Gutsy. It stores all the video from my camcorder, copies of all my CDs and DVDs, pictures from digital cameras, etc... Most of the files don't have an extension because file extensions are sorta useless in Linux. If I upgrade to Gutsy it appears I won't be able to type in 'mplayer StarTrek-WrathTAB' and have it fill in 'StarTrek-Wrath_of_Kahn'. So I guess I have two questions * Why does the tab-completion code that restricts based on command-names exist? What benefit does this restriction have to power users?? * If it's here to stay, what is the official 'ubuntu way' to disable it for people who don't like it. It appears /etc/bash_completion is owned by the bash package. If I upgrade bash, will it come back? I want it off my servers and workstations perminantly. I see nothing in /etc/defaults. -A -- Ubuntu-devel-discuss mailing list Ubuntu-devel-discuss@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss
Re: Restricted tab-completion is annoying
On 10/11/07, Aaron C. de Bruyn [EMAIL PROTECTED] wrote: Today a website generated a PDF file for me automatically and firefox popped up and asked if I wanted to download it. I hit 'OK' and it saved ' genpdf.asp' into my downloads folder. I was surprised to find bash wouldn't tab-complete the filename. Apparently there is new (newer than dapper) bash completion code that restricts completed files based on the initial part of the command. (/etc/bash_completion) I think this sucks. I spend a lot of time at the bash prompt and use tab-completion constantly. When you are in bash, I would expect you sorta know what you are doing. One example of where I *will* have issues is if I upgrade my home media server from Dapper to Gutsy. It stores all the video from my camcorder, copies of all my CDs and DVDs, pictures from digital cameras, etc... Most of the files don't have an extension because file extensions are sorta useless in Linux. If I upgrade to Gutsy it appears I won't be able to type in 'mplayer StarTrek-WrathTAB' and have it fill in 'StarTrek-Wrath_of_Kahn'. So I guess I have two questions * Why does the tab-completion code that restricts based on command-names exist? What benefit does this restriction have to power users?? I don't see the point why filenames needs to be tab-completed on default, it does it when it's necessary. Filenames does tab-complete on certain tasks and applications, depending on what are you trying to accomplish? For example, certain applications that require an input needs to tab-complete a filename on it's parameters (i.e. rsync), and executable files like python, perl, ruby bash scripts would need tab-completion to execute. If you really want to autocomplete your filenames, you might as well make your files executable, and lastly why do you think this is necessary? -- object-oriented programming is really just a common sense extension of structured programming - Roger Sessions -- Ubuntu-devel-discuss mailing list Ubuntu-devel-discuss@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss
Re: Restricted tab-completion is annoying
Ok--I'm sorry, but none of what you said made any sense to me. I don't see the point why filenames needs to be tab-completed on default, it does it when it's necessary. I'm asking why tab-completion changed from allowing tab-completion of EVERY file to being restricted. It sounds like you are asking why it needs to be on at all. My response to that is that it is a feature that people like and use. It's been that way for as long as I can remember. At least 8 years. Filenames does tab-complete on certain tasks and applications, depending on what are you trying to accomplish? Is that a question or statement? Yes, you hit tab to complete certain commands and filenames. It seems like Ubuntu is trying to be helpful by showing you only the things it thinks you need. For example, certain applications that require an input needs to tab-complete a filename on it's parameters (i.e. rsync), and executable files like python, perl, ruby bash scripts would need tab-completion to execute. Yes, that is why there is tab completion--because there are so many Linux command that take filenames as parameters. If you really want to autocomplete your filenames, you might as well make your files executable, So you are saying I should chmod +x all my videos, pictures, and music files in order to use tab-completion. That's an even worse solution. They aren't executable files. They are data files that need to be interpreted BY programs that I execute. and lastly why do you think this is necessary? Why do I think what is necessary? Tab completion? Disabling the new restrictions to tab-completion? Being able to use a feature that has been in bash forever but was recently (in my opinion) crippled? -A -- Ubuntu-devel-discuss mailing list Ubuntu-devel-discuss@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss