STATUS: Working, but not generalized (for personal use right now)
Extract parts of your shell dotfiles into a separate file. For example, given the files
alias kssh='kitty +kitten ssh'
alias l='exa -al --icons --git' # clone(user, root)
# clone(user, root)
mkcd() {
command mkdir -p -- "$@"
cd -- "$@" || { _shell_util_die "mkcd: could not cd"; return; }
}
The annotated aliases and functions will be extracted into a file specifically for 'root' and 'user'
# shellcheck shell=bash
# Autogenerated from dotshellextract in https://github.com/hyperupcall/dotshellextract
# Autogenerated. Do NOT edit!
alias kssh='kitty +kitten ssh'
# Autogenerated. Do NOT edit!
mkcd() {
command mkdir -p -- "$@"
cd -- "$@" || { _shell_util_die "mkcd: could not cd"; return; }
}
This is useful if you want to have a subset of your shell configuration available for remote servers or for usage as superuser (but do not want to copy and paste configuration files everywhere)
Use Basalt, a Bash package manager, to install this project globally
basalt global add hyperupcall/dotshellgen
Additionally, a version of Perl is required
I do not recommend using this utility right now. Everything is hardcoded for personal use (this was extracted from my dotfiles repository)
TODO: Cleanup everything
dotshellgen