05 Aug 2014, 04:36
Generic-user-small

David Blatner (2 posts)

When you type ls (in Chapter 1), you get a slash after the name of folders, and you imply that this is a preference. Is this possible in Mac OS Terminal? I don’t see an obvious setting in preferences.

(My 10 year old and I are loving this book so far!)

05 Aug 2014, 14:45
Andy-talking_pragsmall

Andrew Hunt (183 posts)

There are a couple of ways to do it. First, you can enable color output by setting the CLICOLOR environment variable, in your .profile or .bashrc. Just set it like this:

export CLICOLOR=1

Then restart the shell. You can also just type “ls -G”, or set an alias

alias ls="ls -G"

(also in your .profile or .bashrc). To get the / and * characters, use the -F flag instead or in addition:

alias ls="ls -F"

Thank you for your kind words!

/\ndy

05 Aug 2014, 15:49
Generic-user-small

David Blatner (2 posts)

It worked! Magic.

I didn’t know how to edit the bash profile, but I found a terrific tutorial and examples here: http://natelandau.com/my-mac-osx-bash_profile/

05 Aug 2014, 16:28
Andy-talking_pragsmall

Andrew Hunt (183 posts)

I discuss it a little on pg 21, when talking about adding directories to your PATH. But there’s a lot to system administration and I only scratch the surface, even in the appendices.

Glad to hear you’re having fun!

/\ndy

  You must be logged in to comment