Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Hdoc1509/shell-fns
Minimalist plugins for bash and zsh
https://github.com/Hdoc1509/shell-fns
Last synced: about 2 months ago
JSON representation
Minimalist plugins for bash and zsh
- Host: GitHub
- URL: https://github.com/Hdoc1509/shell-fns
- Owner: Hdoc1509
- License: mit
- Created: 2022-11-08T14:56:31.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-04-14T01:56:40.000Z (about 2 months ago)
- Last Synced: 2024-04-14T06:55:02.368Z (about 2 months ago)
- Language: Shell
- Homepage:
- Size: 143 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Lists
- awesome-zsh-plugins - shell-fns - Includes `git`, `neovim`, `npm`, `pip` extended functionality. (Plugins / ZSH on Windows)
- fucking-awesome-zsh-plugins - shell-fns - Includes `git`, `neovim`, `npm`, `pip` extended functionality. (Plugins / ZSH on Windows)
- fucking-awesome-zsh-plugins - shell-fns - Includes `git`, `neovim`, `npm`, `pip` extended functionality. (Plugins / ZSH on Windows)
README
# shell-fns
Minimalist plugins for bash and zsh.
## Installation
Clone the repository in your local machine:
```sh
git clone --depth 1 https://github.com/Hdoc1509/shell-fns.git ~/.shell-fns
```## Usage
Source `~/.shell-fns/main.sh` after setting required variables and desired
plugins in your `~/.bashrc` or `~/.zshrc` file:```sh
export SF_EDITOR='subl'
export SF_PLUGINS=( git npm pip )source ~/.shell-fns/main.sh
```## Plugins
- [gh](/plugins/gh/)
- [gh_gist](/plugins/gh_gist/)
- [gh_issue](/plugins/gh_issue/)
- [gh_pr](/plugins/gh_pr/)
- [gh_release](/plugins/gh_release/)
- [gh_repo](/plugins/gh_repo)
- [git](/plugins/git/)
- [neovim](/plugins/neovim/)
- [npm](/plugins/npm/)
- [nvm](/plugins/nvm/)
- [nvm_win](/plugins/nvm_win/)
- [pip](/plugins/pip/)
- [pnpm](/plugins/pnpm/)
- [scoop](/plugins/scoop/)
- [vitejs](/plugins/vitejs/)
- [wezterm](/plugins/wezterm/)## Built-in aliases
| Alias | Command |
| ----- | ------------------------------- |
| sfCf | cd ~/.shell-fns; ${SF_EDITOR} . |
| path | echo -e "${PATH//:/\\\n}" |
| mkd | mkdir -p |
| .. | cd .. |
| .1 | cd .. |
| .2 | cd ../.. |
| .3 | cd ../../.. |
| c | clear |
| zz | exit |
| rm | rm -rv |
| rmf | rm -rvf |
| cp | cp -rv |## Global variables
These variables are required and are used by some plugins:
- `SF_EDITOR`: Editor executable name. Example: `subl`, `code`, `nvim`. It can also be editor functions of [`neovim`](/plugins/neovim/) plugin.
## Colored messages
You can print colored messages with `echo -e`:
```sh
echo -e "Message in ${RED}red color${NOCOLOR} and in ${GREEN}green color${NOCOLOR}"
```Be sure to use `${NOCOLOR}` for reset color in your printed message and at the end of the message.
Available colors:
- `NOCOLOR`
- `RED`
- `GREEN`
- `ORANGE`
- `BLUE`
- `PURPLE`
- `CYAN`
- `LIGHTGRAY`
- `DARKGRAY`
- `LIGHTRED`
- `LIGHTGREEN`
- `YELLOW`
- `LIGHTBLUE`
- `LIGHTPURPLE`
- `LIGHTCYAN`
- `WHITE`## Updates
If you want to update `shell-fns`, you just need to run:
```bash
shell_fns_update
```