In Terminal, can't type l/

Joined
Jul 18, 2006
Messages
238
Reaction score
6
Points
18
Your Mac's Specs
iMac 17" Intel Core Duo, 2 GB RAM + 20" ACD
So I use Terminal on occasionally, enough that this is a bit of a problem: whenever I'm in Terminal (even if I'm in one of the text editors like nano), and I type l/ (for example, when typing a path such as /usr/local/bin), the l/ becomes a space.

For example:

"cd /usr/local/bin"

becomes:

"cd /usr/loca bin " (with that trailing space that I can't get rid of).

It happens in real-time, not just when you send the command, and goes away if you remove the / after the l in question.

This makes it a little difficult to move anywhere in Terminal that has those two characters together. I don't have any idea what caused it; I don't think I changed anything (knowingly) to make it happen. I've rebooted several times since it first showed up, have restarted Terminal, logged out and back in, and all the basic tricks.

I'd greatly appreciate it if someone knows what's happening here- thanks in advance.
 
Joined
Mar 27, 2008
Messages
18
Reaction score
2
Points
3
This may seem like a silly question, but are you sure you're doing l/ and not \l. That would turn into a space.

Also, you can always hit the TAB key to finish a path. So if you type:

cd /usr/loc

And then TAB

It should finish that bit and let you keep typing.
 
Joined
Apr 29, 2006
Messages
4,576
Reaction score
378
Points
83
Location
St. Somewhere
Your Mac's Specs
Mac Studio, M1 Max, 32 GB RAM, 2 TB SSD
Of course you can always use the good 'ol bash unix/Linux escape mechanism to "escape" the key in question. You do this by preceding the key of interest with a "\".

In your example above, you could type:

Code:
cd /usr/local\/bin
I just tried this in my Terminal.app and it works like a charm (of course I can type "cd /usr/local/bin" with no problem as well).
 
OP
Sandwichman
Joined
Jul 18, 2006
Messages
238
Reaction score
6
Points
18
Your Mac's Specs
iMac 17" Intel Core Duo, 2 GB RAM + 20" ACD
Hi everyone, thanks for the replies.

raydot:This may seem like a silly question, but are you sure you're doing l/ and not \l. That would turn into a space.

Not a silly question at all- one of the first things I checked myself. Regarding TAB-completion, it doesn't really work that way for me. It completes just fine, but the l/ becomes a space again. The problem here is that it's not just being interpreted as a space, it *becomes* a space when I type it.

The way I worked around it was splitting each directory move into separate commands:

cd /usr
cd local
cd (etc...)

This works because I never have to type "l/" consecutively. By moving one directory at a time it works fine.

mac57:Of course you can always use the good 'ol bash unix/Linux escape mechanism to "escape" the key in question. You do this by preceding the key of interest with a "\".

Hm. I guess that works for me too. Not sure why I didn't try that, guess I assumed it would try to do "cd /usr/local bin/" that way. Thanks for the suggestion!

I still have no idea what's causing it, but it looks like it's relatively easy to work around. Thanks everyone!
 
Joined
Jun 22, 2009
Messages
3
Reaction score
0
Points
1
I'm having pretty much the same problem, except the "/l" gets turned into a non-US-ASCII character (kind of looks like an "L" with a slash through it) instead of a space. It only happens on one of my machines, and on that box it happens for all users, not just me. Typing a lower-case "L" followed by a slash into the Terminal immediately converts the two characters to this weird one. Tab-completion does the same thing, as does the results of "which". Escaping the slash works.
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top