dotfiles using a bare git repo
(you'll need at least curl and git)
curl -sfL https://raw.githubusercontent.com/k0rventen/.dotfiles/main/.config/setup.sh | sh
This will clone the repo in $HOME
with the right options, and checkout -f
.
Any previous files that overlap will be overwritten !
Here are all the prompt components when all the features are present:
✓ 7s mac-pro:~ [local-qemu:app] (main*)
>
It can be decomposed as follows:
✓
: state of the previous command (✗
if return code != 0)7s
: time taken by the previous command (if between 1s and 1h)mac-pro:~
: hostname and working dir[local-qemu:app]
: current k8s context and namespace. They are per-session (see the kctx & kns wrappers below)(main*)
: current git branch (*
indicates a dirty env)
- one letter aliases for git (
g
), kubectl (k
), skaffold (s
) and others - two letters aliases for common command-argument combo:
gs
,ga
,gc
,gp
: git status/add/commit/pushkp
: kubectl port-forwardbdec
,benc
: for encoding/decoding b64 payloads
kctx
&kns
: functions that lists/changes your kube contexts/ns for this fish session, allowing you to have different contexts on other sessionsh
function for interacting with my ollama model from the commandlinewatch
&repeat
: simpler version of watch & xargs.
Demo:
✓ mac-pro:~ [local-qemu:app]
> h how to tar a folder with gz
`tar -czf output.tar.gz folder_name`
✓ 5s mac-pro:~ [local-qemu:app]
> kctx auriga
Found matching context in /Users/corentin/.kube/configs/auriga
Switched to context "auriga".
✓ mac-pro:~ [auriga:app]
> kns prod
Context "auriga" modified.
✓ mac-pro:~ [auriga:prod]
These dotfiles are tailored for a *NIX env with the following things installed:
- fish shell
- yq & kubectl for the k8s things
- ollama
help_me / h
- htop config
- httpie config
- k9s config
On a fish shell, a dotfiles
alias will be created. It shall be used like a regular git command.
Note that a wildcard *
gitignore rule is used, so adding new file will require -f
.
Here is an example of adding a new file:
dotfiles add -f .config/conf.conf
dotfiles commit -m "add conf for conf"
dotfiles push