Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ink-splatters/lib.sh
Opinionated macOS-specific collection of POSIX shell utils and aliases
https://github.com/ink-splatters/lib.sh
macos posix-compatible recoveryos shell-aliases shell-productivity
Last synced: about 2 months ago
JSON representation
Opinionated macOS-specific collection of POSIX shell utils and aliases
- Host: GitHub
- URL: https://github.com/ink-splatters/lib.sh
- Owner: ink-splatters
- License: mit
- Created: 2022-11-05T14:40:25.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2024-11-08T11:23:10.000Z (about 2 months ago)
- Last Synced: 2024-11-08T12:27:06.519Z (about 2 months ago)
- Topics: macos, posix-compatible, recoveryos, shell-aliases, shell-productivity
- Language: Shell
- Homepage:
- Size: 283 KB
- Stars: 2
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# lib.sh
Opinionated Apple-specific utils and aliases for bash and zsh. Fishes swim by!
## Status
`lib.sh` will never be released. You are strictly encouraged to read the LICENSE. By
using this software you are acknowledging and accepting the accompanying risks.Consider the current `master` safe, with caution. Always know what you run!
## [Origins](ORIGINS.md)
## Installing
### macOS
```sh
#!/usr/bin/env bashset -e
rc=~/$([[ "${SHELL##*.}" =~ .*bash$ ]] && echo .bashrc || echo .zshrc)
git clone https://github.com/ink-splatters/lib.sh "$HOME"/lib.sh
touch $rc
cat <> $rc
source "$HOME"/lib.sh/lib.shalias fle='vi $rc'
alias fs='source $rc'
# alias flp='source ~/.profile'
# alias flbp='source ~/.bash_profile'
EOFsource $rc
```#### Root shell
```shell
cat <<'EOF' >> /var/root/.profile
source /Users//lib.sh/lib.shalias fle='vi ~/.profile'
alias fs='source ~/.profile'
EOF
```### RecoveryOS
As `RecoveryOS` was initially the first citizen:
`source` it and lib.sh will bootstrap itself properly, the way it survives between interactive shell sessions (it however doesn't
survive reboots).As well as, aliases: `fle`, `flel` and `fs` described above become available automatically, upon `source`-ing lib.sh
## Misc
`pre-commit` is used for formatting purposes, as well as for bumping `lib.sh` version. Contributors are expected to run it before submitting a PR.
Before running, it should be initialized by executing the following in the project dir:
```shell
pre-commit install --install-hooks
````lib.sh` uses a lot of external cli tools. In order to get the best experience, you will want to inspect the code and install all the tools used.
## Contributions
Currently it's a whole mess craving for refactoring or rewriting. It's not that contributions are not welcome, but rather please
open an issue first._PR with the list of tools used in the form of markdown, is welcome :)_