Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ls -F different on Git Bash #590

Open
marwahaha opened this issue Jun 28, 2017 · 3 comments
Open

ls -F different on Git Bash #590

marwahaha opened this issue Jun 28, 2017 · 3 comments

Comments

@marwahaha
Copy link
Contributor

@marwahaha marwahaha commented Jun 28, 2017

Hi folks,

Right now, the ls lesson starts like this:
image

This is true for Mac machines, but on Git Bash on Windows, I think this is not the case. ls already adds /s to directories -- instead, ls -F will colorize the screen (it will also show the /s).

(I'm not 100% sure about the behavior, but I can check at my workshop tomorrow.)

It's a little weird because this is so early in the lesson, and almost immediately, the instructions are OS-dependent, which seems odd.

Here's a suggested fix:

On some systems, ls won't tell the difference between files and directories! You can change that by supplying the flag -F, which will classify each entry. Directories will now have a trailing slash.

@gdevenyi
Copy link
Contributor

@gdevenyi gdevenyi commented Aug 3, 2017

Hi, your suggested fix is welcome as a PR.

I'd like to see the addition to mention that colour is also used (and inconsistent)

@loz-hurst
Copy link
Contributor

@loz-hurst loz-hurst commented Jun 12, 2018

I'm concerned about this - Git for Windows does not provide BASH but rather "BASH emulation" for the sole purpose of running git commands. I think "fixing" the content for a shell environment that the developers themselves say is not BASH (just a crude emulation) is going to introduce a wealth of unnecessary confusion and complexity to the materials.

From the "Git for Windows" homepage (https://gitforwindows.org/):

Git for Windows provides a BASH emulation used to run Git from the command line. *NIX users should feel right at home, as the BASH emulation behaves just like the "git" command in LINUX and UNIX environments.

Edit:
The "setup" lesson already makes it clear that this is an emulator:

In this lesson, we encourage you to use an emulator included in Git for Windows

I wonder if it would be better to make clear there that, being an emulator and not BASH, some things will be different?

@gcapes
Copy link
Contributor

@gcapes gcapes commented Jun 12, 2018

but on Git Bash on Windows, I think this is not the case. ls already adds /s to directories -- instead, ls -F will colorize the screen (it will also show the /s).

This isn't the case for me testing just now with Git Bash. ls actually seems to be aliased to something like ls -F --colour=auto i.e. the default output is coloured and categorised, so ls and ls -F give the same output. If I run \ls, then I get a non-coloured, non-categorised output.

@ErinBecker ErinBecker added this to the June 2019 Release milestone May 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
7 participants