News for hackers. Stuff that matters.
Re:Dotfile Madness by hyperupcall on Sunday October 23, 2022 @08:40PM (#33311753)
I completely agree! That's why I created this site: https://xdgbasedirectoryspecification.com. We need some place where people can immediately understand the practical benefit, and the minimum ask of their users.

Of course, it doesn't help just to complain about the issue in a void, so I've also submitted like 10 PRs and filed quite a few issues. Projects like pnpm and Poetry took note, and now they comply!

Someone's gotta clean up house, and I don't mind doing the dirty work.

Re:Dotfile Madness by inktype on Sunday October 23, 2022 @09:31PM (#33312056)
The idea for your site is great. A quick suggestion: if you want everyone to immediately understand and sympathize with your cause, then use the tools that everyone knows in your examples. Using some long exa incantation risks alienating people that don't care about things like the latest trendy grep alternative. Just use: `ls -d .*` or `ls -a`
Re:Dotfile Madness by hyperupcall on Sunday October 23, 2022 @10:00PM (#33312218)
Thanks for the suggestion - agreed, I'll make that change
Re:Dotfile Madness by alwillis on Sunday October 23, 2022 @10:36PM (#33312431)
Using some long exa incantation risks alienating people that don't care about things like the latest trendy grep alternative

Exa is the latest, trendy ls alternative.

I don’t think you should remove the Exa example but you certainly should show how to use ls to do something similar for those people still living in the dark ages—ls was created in the 1970s and it hasn’t kept up with the times all that well [1].

I created an ‘ll’ alias for Exa using the Fish shell; obviously you make shell-appropriate aliases in Bash or Z shell:

    function ll
      exa --color always --long --no-user --no-permissions --all --icons $argv
    end

[1]: https://the.exa.website/introduction
Re:Dotfile Madness by inktype on Monday October 24, 2022 @10:34AM (#33317199)
I appreciate that you are trying to be helpful, but you might be over-evangelizing trendy things at the risk of appearing patronizing; exa is a thing like the latest trendy grep alternative, and the point of my original comment still stands.

No need to have a rosetta stone of alternatives to demonstrate an illustrative example where the basic tool that everybody already knows and understands at a glance works.

I'm not saying that exa, or fish, or ripgrep, or any other trendy tool is bad.

Re:Dotfile Madness by yjftsjthsd-h on Sunday October 23, 2022 @09:38PM (#33312095)
Why does the "fixed" example still list .profile? Why wouldn't the shell config live with everything else?
Re:Dotfile Madness by hyperupcall on Sunday October 23, 2022 @10:03PM (#33312237)
Mainly because it's easier to get people on board when we're keeping a few of the super core dotfiles, especially since those are kind of impossible to change - they are hard coded literally everywhere

Admittedly, the ~/.bashrc etc. files should be there too - but I wanted it to look cleaner :P

Re:Dotfile Madness by alwillis on Sunday October 23, 2022 @10:58PM (#33312529)
The following programs are for Linux only (The XDG Base Dir Spec isn't inherently followed for MacOS and Windows)

You should fix this. While macOS and its system applications and bundled applications don't adhere to the XDG Base Directory Specification; many programs that run on macOS do.

In fact, almost all of the programs you list run on macOS and (by definition) use the XDG Base Directory Specification. So I would clean that up to not give an incomplete statement.

BTW, the macOS directory structure [1] has been documented since macOS (MacOS X back in the day) shipped in 2001.

[1]: https://developer.apple.com/library/archive/documentation/Fi...

Re:Dotfile Madness by hyperupcall on Monday October 24, 2022 @12:27AM (#33312935)
Hmm, that's why I said inherent? Because as you mentioned there is a separate macOS directory structure and the system utilities don't follow the specification. Also, the specification is only written for Linux in mind, which is why I said "not inherent for macOS.

Is there an exact phrasing you would prefer?

Re:Dotfile Madness by alwillis on Monday October 24, 2022 @01:12AM (#33313156)
The short explanation is native GUI apps that use the macOS frameworks use the classic macOS directory structure.

The classic Unix utilities and apps typically use $HOME on macOS, while their modern, often Rust-based replacements—WezTerm, Exa, fd, broot, Fish, etc.—use XDG.

Vim uses ~/.vimrc while Neovim uses XDG.

Re:Dotfile Madness by hyperupcall on Monday October 24, 2022 @12:23PM (#33318743)
I asked for an exact phrasing, not for an explanation, because I have already written exactly that under the "Should I do this on macOS?" heading...
Re:Dotfile Madness by gaganyaan on Sunday October 23, 2022 @11:00PM (#33312540)
Am I missing something, or should the Python example use "config_dir[0] != '/'"?

I.e. if it's empty, or if the first character is not a forward slash, then use the default?

Re:Dotfile Madness by hyperupcall on Monday October 24, 2022 @12:23AM (#33312918)
no I think you're right, that was a typo