https://github.com/414owen/local-shellrc
Minimal script to source local shell configs
https://github.com/414owen/local-shellrc
env posix shell zsh
Last synced: 3 months ago
JSON representation
Minimal script to source local shell configs
- Host: GitHub
- URL: https://github.com/414owen/local-shellrc
- Owner: 414owen
- Created: 2020-01-28T17:20:17.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-01-29T13:18:51.000Z (over 6 years ago)
- Last Synced: 2025-03-29T03:41:26.064Z (over 1 year ago)
- Topics: env, posix, shell, zsh
- Language: Shell
- Homepage:
- Size: 10.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# local-shellrc
Source shell configs local to a directory.
The main script should be POSIX compliant, so if you hook it up to a shell other than zsh, feel free to contribute :)
## Installation
### [Nix](https://nixos.org/nix/) / [home-manager](https://github.com/rycee/home-manager)
Add [this line](https://github.com/414owen/dotfiles/blob/2789e45114881fb242724ab01107b4fcd44a40d5/zsh.nix#L14)
### Manual
```zsh
git clone https://github.com/414owen/local-shellrc.git
echo ". $PWD/local-shellrc/source-local-shellrc.zsh" >> ~/.zshrc
```
## Usage
Your shell will load the closest `.local.sh` file (and `.zshrc` file in zsh) that's a direct child of a parent directory of `$PWD`.