Skip to content
This repository has been archived by the owner on Feb 18, 2022. It is now read-only.

fox-archives/dotshellextract

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dotshellextract

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)

Installation

Use Basalt, a Bash package manager, to install this project globally

basalt global add hyperupcall/dotshellgen

Additionally, a version of Perl is required

Usage

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