6 ms·
Exciting idea! For me the application of this that I'm most interested in personally is for dotfiles, configuring the interactive shell. I have a fair amount o
by price 6y ago
Exciting idea!
For me the application of this that I'm most interested in personally is for dotfiles, configuring the interactive shell. I have a fair amount of useful stuff in my own bashrc that I've developed over the years, which people who see me work often want to use too (and I happily share). I've wished for a good way to share each logically-independent customization in its own separate chunk -- so that people can pick and choose, and also combine what they like from me with their own existing config and chunks they've picked up elsewhere.
For zsh, oh-my-zsh seems to have been extremely successful, and IIUC this describes a key technical contribution at the core of how it's worked so well.
So I'm hoping that this thing can play part of the role of oh-my-zsh, for bash! (And for other shells too, sure.)
I'll definitely be interested to read more of the details of how it works, and to play around with it.
- j1elo 6y agoYou might be able to make your own "chunk modules" system, by sourcing from .profile something like ".shell_modules//.sh", and then use GNU Stow [0] to selectively install, from a centralized directory, whatever modules you're interested in. Each module would have to go to its own subdir (the '*' part in my example), but that's a good thing as it means that each module could contain several files. [0]: https://www.gnu.org/software/stow/ https://www.gnu.org/software/stow/
- price 6y ago(Before using this for real, I'd certainly want to be able to track the exact version I'm getting of a dependency, with a hash, in a "lockfile" sort of file that I can keep in version control. That's not mentioned in the demo on the front page - but if it doesn't already have that feature, I hope it will grow it.)
- JoshTriplett 6y agoIf you're pinning a shell script to a specific hash, why not just keep the script itself in version control?
- price 6y agoI'm thinking especially of the use case of sharing for people who have not been accumulating dotfiles forever and haven't set up some kind of way to manage their dotfiles in version control. (Heck, I don't myself have a system that I love for that, though it meets my basic requirements in that I can always ask Git exactly what changed.) So "add this one line to get my prompt" is then a much lower-friction suggestion than "copy this whole little script".
- boogies 6y agoAs https://news.ycombinator.com/item?id=23865244 https://news.ycombinator.com/item?id=23865244 mentioned, the link should be able to point to anything, including a specific commit in version control.
- chriswarbo 6y agoAs mentioned elsewhere, Dhall has a similar import-from-URL feature (with cryptographic hashes), and it is/was popular to use IPFS URLs, since they're content-addressed (i.e. changing the content will change the address, so each address will always point to the same data)