coverup Posted June 24, 2009 Report Share Posted June 24, 2009 (edited) I figured out that bash terminal shell behaves slightly differently in Ubuntu and Mandriva. The biggest difference for me is when I type some thing like this: $ ls fil and then press TAB. In Mandriva, pressing TAB gives me a list of all files in this directory that start with fil: file1 file2 file_to_delete In ubuntu, I first hear a loud beep, and the list appears only when I press TAB for the second time. The second big difference is that Ubuntu does not request me to confirm whether I want to remove a file, when I type $ rm file , ie it defaults to $ rm -f file . Mandriva gives you a chance to confirm deleting, I like this feature a lot. Now my question is how I can make bash in Ubuntu follow Mandriva's settings. I have an Ubuntu PC in my office. Coming from Mandriva, I have a habit of pressing TAB very frequently, so the beep irritates everybody around. I don't want to disable speaker altogether - occasionally, the beep is useful. Also, it would be good to change the behavior of the rm command. I recall that there must be an alias somewhere but I cannot remember where it is. Can anybody please help. Edited June 25, 2009 by coverup Quote Link to comment Share on other sites More sharing options...
scarecrow Posted June 24, 2009 Report Share Posted June 24, 2009 Compare your .bashrc files of these two distros. bash shell has several items which are configurable. For the record, in Archlinux ls behaves the Mandriva way, and rm the Ubuntu way. I do not really know which is the "vanilla" behaviour, but since it's user-configurable, I wouldn't bother that much... Quote Link to comment Share on other sites More sharing options...
coverup Posted June 24, 2009 Author Report Share Posted June 24, 2009 Thanks, scarecraw. This solves the problem of interactively deleting files. Indeed, Mandriva sets those commands as aliases in /etc/profile.d/alias.sh. If I could also find a solution to beeping :-) Quote Link to comment Share on other sites More sharing options...
coverup Posted June 24, 2009 Author Report Share Posted June 24, 2009 (edited) Thanks, scarecraw. This solves the problem of interactively deleting files. Indeed, Mandriva sets those commands as aliases in /etc/profile.d/alias.sh. If I could also find a solution to beeping :-) I think I found a solution... According to this post, http://machttp://macosx.com/forums/unix-x1...ion-bash-2.html it is necessary to put set show-all-if-ambiguous on in the file ~/.inputrc . I created this file, and the problem is solved. Edited June 25, 2009 by coverup Quote Link to comment Share on other sites More sharing options...
neddie Posted June 26, 2009 Report Share Posted June 26, 2009 Nice detective work, coverup! I'll have to try this out with debian, it was something which always annoyed me but not quite enough to make me figure out how to fix it. Thanks for the tip! Quote Link to comment Share on other sites More sharing options...
demonseth17 Posted June 27, 2009 Report Share Posted June 27, 2009 yea I'm going to write it in a copybook if something like that happens to me.. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.