https://github.com/br0ken-/clib
Helper functions for your daily-routine work in CLI.
https://github.com/br0ken-/clib
bash cli shell
Last synced: 2 months ago
JSON representation
Helper functions for your daily-routine work in CLI.
- Host: GitHub
- URL: https://github.com/br0ken-/clib
- Owner: BR0kEN-
- Created: 2015-09-28T02:40:25.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2018-05-18T18:07:57.000Z (about 8 years ago)
- Last Synced: 2025-03-29T09:31:20.028Z (over 1 year ago)
- Topics: bash, cli, shell
- Language: Shell
- Size: 9.77 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# CLI (Bash)
Helper functions for your daily-routine work in CLI. Execute `clib [command]` for help.
## Installation
Clone this repository wherever you want and export the source file into your shell.
Example:
```shell
cd /usr/local/share
git clone git@github.com:BR0kEN-/clib.git
vim ~/.bash_profile
source /usr/local/share/clib/functions.sh
```
**NOTE**! If you are not a Mac OS user, then create an alias for the `open` command inside of one of available boot files for your shell (e.g. `~/.profile`, `~/.bash_profile`, `/etc/bashrc` etc.).
Example for Ubuntu:
```shell
alias open="sensible-browser"
```
## Update
Execute the `clib update` and latest code will be grabbed from remote.
## Usage
The next commands will be available in your shell after installation.
**Note**: Updating won't work if you installed scripts not via Git.
### clone
All arguments for `git clone` are available and can be passed after first couple.
#### Clone from Drupal.org.
```shell
clone drupal fpp_bundles
```
#### Clone from FFW (UA) GitLab.
```shell
clone ffw sla/unga
```
#### Clone from GitHub.
```shell
clone gh br0ken-/tqextension
```
#### Clone from BitBucket.
```shell
clone bb br0ken/gta
```
Override host.
```shell
vim ~/.bash_profile
CLIB_CLONE_ffw="ssh://git@git.propeople.md/"
source /usr/local/share/clib/functions.sh
```
Define new host.
```shell
vim ~/.bash_profile
CLIB_CLONE_bitbucket="git@bitbucket.org:"
source /usr/local/share/clib/functions.sh
```
And now, you able to perform:
```shell
clone bitbucket br0ken/cs
```
**Note**: All native `git clone` arguments are available.
### jira
Open the project.
```shell
jira pva
```
Open the task.
```shell
jira pva-177
```
**Note**: Project key is insensitive.
### g
Search by "rammstein" keyword in Google.
```shell
g rammstein
```
Search by "Latin" keyword on wikipedia.org.
```shell
g latin site: wikipedia.org
```
**Note**: All Google search syntax are available.
### so
Useful alias for `g [query] site: stackoverflow.com`
```shell
so how to install php
```
### t
Open Google Trnaslator.
```shell
t [query]
```