How would I go about creating a command that is like cd, but you do not need to escape spaces? (Assume there are never more than one space in a row.)
Example usage:
cds some directory
vs.
cd some\ directory
|
If you're using bash, put this in your ~/.bashrc:
Another solution would be to type the first letters of the directory name, then hit the Tab key and let the shell complete the name for you. |
|||||
|
|
This is just the way the shell works. It separates arguments by spaces. If you created such a command, you'd be teaching yourself not to escape spaces properly, which might result in problems sooner or later. If you just want to
As you can see, no escaping used, and your quote will be auto-closed too. |
|||||||
|
.bashrcor.bash_profileto make tab cycle through options instead of listing them:bind '"\t":menu-complete'– Daniel Beck♦ Mar 14 '12 at 18:13