LibraryCarpentry / lc-shell

Library Carpentry: The UNIX Shell
https://librarycarpentry.org/lc-shell/
Other
31 stars 85 forks source link

Update 02-navigating-the-filesystem.md – Terminal and prompt description #139 #161

Closed wsampson closed 2 years ago

wsampson commented 3 years ago

Addressing https://github.com/LibraryCarpentry/lc-shell/issues/139 for Checkout process.

I attempted to generalize the prompt sign issue for the learner, including the newer % from zsh in fresh macOS installs.

kaitlinnewson commented 2 years ago

Hi @wsampson, sorry that it's taken so long to get to your pull request!

Could you tell me what OS/shell you were using when you encountered the error using tr [:upper:]...? I'm not able to replicate the issue locally, and I can see we are using similar commands in multiple parts of this lesson.

wsampson commented 2 years ago

Yes, I'm using the zsh shell that is now default for macOS. The error is zsh: no matches found: [:upper:].

Notably the previous command also has single quotes around the special category ([:punct:]) and will also error out if you remove those quotes (will interpret as regular text). So the syntax given in the lesson doesn't appear internally consistent.

kaitlinnewson commented 2 years ago

Thanks @wsampson, I was able to reproduce the issue by switching my shell back to using zsh. It looks like we have more cases like this to resolve in this lesson too, which I'll handle separate from this PR.