zimbatm / h

faster shell navigation of projects
MIT License
50 stars 4 forks source link

Case sensitivity is awkward #2

Closed grahamc closed 5 years ago

grahamc commented 5 years ago
[grahamc@Petunia:~/projects/github.com]$ ls -la
drwxr-xr-x  6 grahamc users  6 Mar  4 08:17 nixos
drwxr-xr-x  3 grahamc users  3 Mar 14 17:12 NixOS

Almost certainly done by a clone via h nixos/foo and then an h git@github.com:NixOS/bar.git.

Maybe we could check if the owner already exists as a lowercased option?

zimbatm commented 5 years ago

ok I misread the bug report

zimbatm commented 5 years ago

it's tricky. How about using only lower-cased folder in the filesystem? It wouldn't be backward-compatible but I think it's ok.

zimbatm commented 5 years ago

That wouldn't work if other tools are checking out folders like go get. I guess the mkdir -p really has to be made case-insensitive.

grahamc commented 5 years ago

Another option for this GitHub special casing is attempt an API call to determine the canonical capitalization?

Sent from my iPhone

On Mar 17, 2019, at 09:43, zimbatm notifications@github.com wrote:

That wouldn't work if other tools are checking out folders like go get. I guess the mkdir -p really has to be made case-insensitive.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

zimbatm commented 5 years ago

good idea

danbst commented 4 years ago

well now h nixos/nixpkgs doesn't work when I have ~/code/github.com/nixos/nixpkgs, it tries to clone NixOS/nixpkgs. To be clear, I've renamed NixOS to nixos manually, because I try to avoid mixed-case.

This is minor though.

zimbatm commented 4 years ago

don't rename NixOS to nixos! :D

but yeah, I don't know that all cases can be satisfied easily.