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

Make Bash ls match Files sorting #8

Open
danirabbit opened this issue Nov 22, 2017 · 6 comments
Open

Make Bash ls match Files sorting #8

danirabbit opened this issue Nov 22, 2017 · 6 comments

Comments

@danirabbit
Copy link
Member

danirabbit commented Nov 22, 2017

Migrating an issue report from Terminal.

It looks like the recommended way to do this is to create an alias. Maybe something like:

ls --color -h --group-directories-first

@jeremypw
Copy link
Collaborator

This will not address the sort order of hidden files, though. I think bash follows the current LC_COLLATE setting? But Files overrides this and always sorts files whose names begin with "." after other characters. If this is not the desired behaviour then an issue should be raised against Files.

@danirabbit
Copy link
Member Author

So it looks like in order to make Terminal match Files for dot files we'd have to patch whatever provides /usr/share/i18n/locales/iso14651_t1_common to something like this where instead of having "ignore" we need to tell LC_COLLATE which character dot comes after. It would be nice if they matched, but it sounds complicated.

I think Files behavior here is probably as we expect :)

@neur0manc
Copy link

You could also consider using an alternative for ls, two examples that come to my mind are ls-go and exa. The screenshot below show ls-go with the exact search order you expect if I'm correct.

ls-go

The alias in my shell-config for the above behaviour is [[ -x $GOPATH/bin/ls-go ]] && alias ls=ls-go\ -SL

@danirabbit danirabbit modified the milestones: juno-beta1, juno-beta2 Mar 13, 2018
@jepotter1-archive
Copy link

jepotter1-archive commented Apr 30, 2018

Good idea @neur0manc, but I don’t think users have a $GOPATH by default.

@neur0manc
Copy link

@JWinnie [[ -x /usr/local/bin/ls-go ]] && alias ls=ls-go\ -SL would be the real life example if they were considering using ls-go.

@danirabbit
Copy link
Member Author

Gonna punt since this is an enhancement not a release blocker

@danirabbit danirabbit removed this from the juno-beta2 milestone May 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants