Shell Configs

From Leo's Notes
Last edited on 4 February 2021, at 21:13.

Linux power users typically symlink their shell environment settings into a set of 'dotfiles' which can then be version controlled. You can easily find other's dotfiles by searching 'dotfiles' on github.

I have been using a slightly different approach where my shell configuration (including vim configs and plugins, SSH authorized_keys, etc.) are copied directly to the home directory. This is a matter of personal taste as I really don't like seeing symlinks littered across my home directory, though the downside to this method is that changes can't be made directly on the home directory as it isn't the source of truth anymore.

My shell configs can be viewed at https://git.steamr.com/leo/shell-configs. As part of the configs, there is a bootstrap shell script which I run directly via wget to setup or update the account I'm working on.

The bootstrap command to load the configs is:

$ curl https://git.steamr.com/leo/shell-configs/raw/master/bootstrap.sh | sh && exec bash

A basic mode can be used to only configure applications but not shell or SSH keys (useful for shared environments):

$ curl https://leo.leung.xyz/bash | sh -s basic