rules for terminal are too strict.Is there any alternative?
Hello,
I am using openSUSE 10.3.when i use the terminal to copy file,change directory etc.I find that If the name begins with capital letter and I write a small one then there is an error.In DOS you can write first few letters(case insignificant) of folder.Is there a way to ask terminal to ignore the case. |
Linux filesystems are case sensitive.
You can use auto completition to reduce the amount of typing. |
Nix's are case sensitive, so I doubt it. It is perfectly valid to have two files called "Test" and "test", and they are different files.
|
To jschiwal,
What is auto competition. To billymayday, You mean i have to remember the case of file and name.Is there a way so that terminal can suggest file & folder name while I type irrespective of the case. |
Hit Tab for it to complete the word as far as possible, double hit tab to show all possible suggestions based on what is currently writen, used for when you are writing paths.
|
He meant "auto completion", which is where you can press "tab" part way though typing a command and the terminal will attempt to complete the typing for you. Try it.
Yes, I think you need to remember the case of the file. |
You can enable cdspell to correct small errors in the spelling of the directories in the cd command. Also look at `^-r' which allows you to type just a few characters of a previous command to select it from the history buffer.
--- Thanks, billymayday. I fixed the typo. |
Am I right ?
to jschiwal,
I came to know that To enable cdspell in your Bash, give following command: #shopt –S cdspell Your command interpreter is ready to check and correct spelling errors in change directory command. I will try this. |
It really can be implemented at application level, so it's up to the shell. This is what wine does, for example. I have no idea if bash, ksh, zsh or any other can do what you do in a convenient way. BUT (and it's a big BUT) don't complain later if the rest of the applications break for odd reasons related to the case of the file names. Remember that, at the underlying level, "TEST " and "test" will be two different files, and that can create confusion and lots of headaches. Also, note that even if you manager to implement this at shell level, that doesn't mean a thing about the rest of your applications.
I -for one- wouldn't do such a thing when running as root (you can really mess up your system and break things if you go arbitrarily naming important system files in a wrong way). Last, but not least, linux is really a case sensitive system from the root, I'd just learn to live with it. I fail to see the problem. If your concern is that sometimes you are confused because you end with duplicate files like "TEST", "test" and "Test", you should know that faking up your shell is not going to fix that at all. For that you would need to change the filesystem drivers. |
Quote:
|
I just meant that if I write doa and there is a file named DOA then on pressing tab written letters should change to UPPER case and if there is file named Doa then another tab should change written letters to Doa like it happens in DOS.But now I know linux terminal different from DOS so no problem.
Thanks for suggesting spellcheck feature. |
another good shortcut to experiment
try typing 'history' at the shell prompt you should see an output like thus Code:
17 cat smb.conf [code] 27 mount /dev/sde1 /mnt/drive [code] you could re-issue that command by typing !27 at the prompt try doing THAT in dos :p |
Quote:
Quote:
Code:
set completion-ignore-case On Then open a new bash session and try it. If you have a dir called TMP and you write cd tm[tab] it should autocomplete just fine AND adjust the part that has already been written to match the true name of the file or directory, as long as there no other match. If there're many matches it will do nothing but if you TAB again it will show all of them, just like bash do usually, but disregarding case sensitivity. |
yes i know doskey, that functionality is the same in alot of linux shells, just hit the 'up' and 'down' arrow keys to cycle through the history, rather cumbersome when you have to go through nearly 1000 commands to find the one you want though, hence the try THAT in dos
|
Quote:
|
All times are GMT -5. The time now is 10:56 PM. |