GithubHelp home page GithubHelp logo

ink-splatters / lib.sh Goto Github PK

View Code? Open in Web Editor NEW
2.0 3.0 1.0 314 KB

Opinionated macOS-specific collection of POSIX shell utils and aliases

License: MIT License

Shell 96.33% Vim Script 3.67%
macos posix-compatible shell-productivity recoveryos shell-aliases

lib.sh's Introduction

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!

Installing

macOS

#!/usr/bin/env bash

set -e

rc=~/$([[ "${SHELL##*.}" =~ .*bash$ ]] && echo .bashrc || echo .zshrc)

git clone https://github.com/ink-splatters/lib.sh "$HOME"/lib.sh

touch $rc

cat <<EOF >> $rc
source "$HOME"/lib.sh/lib.sh

alias fle='vi $rc'
alias fs='source $rc'
# alias flp='source ~/.profile'
# alias flbp='source ~/.bash_profile'
EOF

source $rc

Root shell

cat <<'EOF' >> /var/root/.profile
source /Users/<username>/lib.sh/lib.sh

alias 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:

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 :)

lib.sh's People

Contributors

ink-splatters avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

osmankalyoncu2

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.