mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-11-25 15:20:08 +00:00
Merge branch 'master' into master
This commit is contained in:
commit
ed401bc55a
53 changed files with 1228 additions and 157 deletions
8
plugins/autopep8/README.md
Normal file
8
plugins/autopep8/README.md
Normal file
|
@ -0,0 +1,8 @@
|
|||
# autopep8 plugin
|
||||
|
||||
This plugin adds completion for [autopep8](https://pypi.org/project/autopep8/), a tool that automatically formats Python code to conform to the [PEP 8](http://www.python.org/dev/peps/pep-0008/) style guide.
|
||||
|
||||
To use it, add autopep8 to the plugins array of your zshrc file:
|
||||
```
|
||||
plugins=(... autopep8)
|
||||
```
|
18
plugins/bower/README.md
Normal file
18
plugins/bower/README.md
Normal file
|
@ -0,0 +1,18 @@
|
|||
# Bower plugin
|
||||
|
||||
This plugin adds completion for [Bower](https://bower.io/) and a few useful aliases for common Bower commands.
|
||||
|
||||
To use it, add `bower` to the plugins array in your zshrc file:
|
||||
|
||||
```
|
||||
plugins=(... bower)
|
||||
```
|
||||
|
||||
## Aliases
|
||||
|
||||
| Alias | Command | Description |
|
||||
|-------|-----------------|--------------------------------------------------------|
|
||||
| bi | `bower install` | Installs the project dependencies listed in bower.json |
|
||||
| bl | `bower list` | List local packages and possible updates |
|
||||
| bs | `bower search` | Finds all packages or a specific package. |
|
||||
|
35
plugins/catimg/README.md
Normal file
35
plugins/catimg/README.md
Normal file
|
@ -0,0 +1,35 @@
|
|||
# catimg
|
||||
|
||||
Plugin for displaying images on the terminal using the the `catimg.sh` script provided by [posva](https://github.com/posva/catimg)
|
||||
|
||||
## Requirements
|
||||
|
||||
- `convert` (ImageMagick)
|
||||
|
||||
## Enabling the plugin
|
||||
|
||||
1. Open your `.zshrc` file and add `catimg` in the plugins section:
|
||||
|
||||
```zsh
|
||||
plugins=(
|
||||
# all your enabled plugins
|
||||
catimg
|
||||
)
|
||||
```
|
||||
|
||||
2. Reload the source file or restart your Terminal session:
|
||||
|
||||
```console
|
||||
$ source ~/.zshrc
|
||||
$
|
||||
```
|
||||
|
||||
## Functions
|
||||
|
||||
| Function | Description |
|
||||
| -------- | ---------------------------------------- |
|
||||
| `catimg` | Displays the given image on the terminal |
|
||||
|
||||
## Usage examples
|
||||
|
||||
[![asciicast](https://asciinema.org/a/204702.png)](https://asciinema.org/a/204702)
|
78
plugins/dircycle/README.md
Normal file
78
plugins/dircycle/README.md
Normal file
|
@ -0,0 +1,78 @@
|
|||
# dircycle
|
||||
|
||||
Plugin for cycling through the directory stack
|
||||
|
||||
This plugin enables directory navigation similar to using back and forward on browsers or common file explorers like Finder or Nautilus. It uses a small zle trick that lets you cycle through your directory stack left or right using <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>Left</kbd> / <kbd>Right</kbd> . This is useful when moving back and forth between directories in development environments, and can be thought of as kind of a nondestructive pushd/popd.
|
||||
|
||||
## Enabling the plugin
|
||||
|
||||
1. Open your `.zshrc` file and add `dircycle` in the plugins section:
|
||||
|
||||
```zsh
|
||||
plugins=(
|
||||
# all your enabled plugins
|
||||
dircycle
|
||||
)
|
||||
```
|
||||
|
||||
2. Reload the source file or restart your Terminal session:
|
||||
|
||||
```console
|
||||
$ source ~/.zshrc
|
||||
$
|
||||
```
|
||||
|
||||
## Usage Examples
|
||||
|
||||
Say you opened these directories on the terminal:
|
||||
|
||||
```console
|
||||
~$ cd Projects
|
||||
~/Projects$ cd Hacktoberfest
|
||||
~/Projects/Hacktoberfest$ cd oh-my-zsh
|
||||
~/Projects/Hacktoberfest/oh-my-zsh$ dirs -v
|
||||
0 ~/Projects/Hacktoberfest/oh-my-zsh
|
||||
1 ~/Projects/Hacktoberfest
|
||||
2 ~/Projects
|
||||
3 ~
|
||||
```
|
||||
|
||||
By pressing <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>Left</kbd>, the current working directory or `$CWD` will be from `oh-my-zsh` to `Hacktoberfest`. Press it again and it will be at `Projects`.
|
||||
|
||||
And by pressing <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>Right</kbd>, the `$CWD` will be from `Projects` to `Hacktoberfest`. Press it again and it will be at `oh-my-zsh`.
|
||||
|
||||
Here's a example history table with the same accessed directories like above:
|
||||
|
||||
| Current `$CWD` | Key press | New `$CWD` |
|
||||
| --------------- | ----------------------------------------------------- | --------------- |
|
||||
| `oh-my-zsh` | <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>Left</kbd> | `Hacktoberfest` |
|
||||
| `Hacktoberfest` | <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>Left</kbd> | `Projects` |
|
||||
| `Projects` | <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>Left</kbd> | `~` |
|
||||
| `~` | <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>Right</kbd> | `Projects` |
|
||||
| `Projects` | <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>Right</kbd> | `Hacktoberfest` |
|
||||
| `Hacktoberfest` | <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>Right</kbd> | `oh-my-zsh` |
|
||||
| `oh-my-zsh` | <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>Right</kbd> | `~` |
|
||||
|
||||
Note the last traversal, when pressing <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>Right</kbd> on a last known `$CWD`, it will change back to the first known `$CWD`, which in the example is `~`.
|
||||
|
||||
Here's an asciinema cast demonstrating the example above:
|
||||
|
||||
[![asciicast](https://asciinema.org/a/204406.png)](https://asciinema.org/a/204406)
|
||||
|
||||
## Functions
|
||||
|
||||
| Function | Description |
|
||||
| -------------------- | --------------------------------------------------------------------------------------------------------- |
|
||||
| `insert-cycledleft` | Change `$CWD` to the previous known stack, binded on <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>Left</kbd> |
|
||||
| `insert-cycledright` | Change `$CWD` to the next known stack, binded on <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>Right</kbd> |
|
||||
|
||||
## Rebinding keys
|
||||
|
||||
You can bind these functions to other key sequences, as long as you know the bindkey sequence. For example, these commands bind to <kbd>Alt</kbd> + <kbd>Shift</kbd> + <kbd>Left</kbd> / <kbd>Right</kbd> in `xterm-256color`:
|
||||
|
||||
```zsh
|
||||
bindkey '^[[1;4D' insert-cycledleft
|
||||
bindkey '^[[1;4C' insert-cycledright
|
||||
```
|
||||
|
||||
You can get the bindkey sequence by pressing <kbd>Ctrl</kbd> + <kbd>V</kbd>, then pressing the keyboard shortcut you want to use.
|
17
plugins/dirhistory/README.md
Normal file
17
plugins/dirhistory/README.md
Normal file
|
@ -0,0 +1,17 @@
|
|||
# Dirhistory plugin
|
||||
|
||||
This plugin adds keyboard shortcuts for navigating directory history and hierarchy.
|
||||
|
||||
To use it, add `dirhistory` to the plugins array in your zshrc file:
|
||||
|
||||
```zsh
|
||||
plugins=(... dirhistory)
|
||||
```
|
||||
## Keyboard Shortcuts
|
||||
|
||||
| Shortcut | Description |
|
||||
|-----------------------------------|-----------------------------------------------------------|
|
||||
| <kbd>alt</kbd> + <kbd>left</kbd> | Go to previous directory |
|
||||
| <kbd>alt</kbd> + <kbd>right</kbd> | Undo <kbd>alt</kbd> + <kbd>left</kbd> |
|
||||
| <kbd>alt</kbd> + <kbd>up</kbd> | Move into the parent directory |
|
||||
| <kbd>alt</kbd> + <kbd>down</kbd> | Move into the first child directory by alphabetical order |
|
|
@ -1,4 +1,29 @@
|
|||
# Docker-compose plugin for oh my zsh
|
||||
# Docker-compose
|
||||
|
||||
A copy of the completion script from the [docker-compose](https://github.com/docker/compose/blob/master/contrib/completion/zsh/_docker-compose) git repo.
|
||||
This plugin provides completion for [docker-compose](https://docs.docker.com/compose/) as well as some
|
||||
aliases for frequent docker-compose commands.
|
||||
|
||||
To use it, add docker-compose to the plugins array of your zshrc file:
|
||||
```
|
||||
plugins=(... docker-compose)
|
||||
```
|
||||
|
||||
## Aliases
|
||||
|
||||
| Alias | Command | Description |
|
||||
|-----------|--------------------------|------------------------------------------------------------------|
|
||||
| dco | `docker-compose` | Docker-compose main command |
|
||||
| dcb | `docker-compose build` | Build containers |
|
||||
| dce | `docker-compose exec` | Execute command inside a container |
|
||||
| dcps | `docker-compose ps` | List containers |
|
||||
| dcrestart | `docker-compose restart` | Restart container |
|
||||
| dcrm | `docker-compose rm` | Remove container |
|
||||
| dcr | `docker-compose run` | Run a command in container |
|
||||
| dcstop | `docker-compose stop` | Stop a container |
|
||||
| dcup | `docker-compose up` | Build, (re)create, start, and attach to containers for a service |
|
||||
| dcupd | `docker-compose up -d` | Same as `dcup`, but starts as daemon |
|
||||
| dcdn | `docker-compose down` | Stop and remove containers |
|
||||
| dcl | `docker-compose logs` | Show logs of container |
|
||||
| dclf | `docker-compose logs -f` | Show logs and follow output |
|
||||
| dcpull | `docker-compose pull` | Pull image of a service |
|
||||
| dcstart | `docker-compose start` | Start a container |
|
||||
|
|
30
plugins/emacs/README.md
Normal file
30
plugins/emacs/README.md
Normal file
|
@ -0,0 +1,30 @@
|
|||
# Emacs plugin
|
||||
|
||||
This plugin utilizes the Emacs daemon capability, allowing the user to quickly open frames, whether they are opened in a terminal via a ssh connection, or X frames opened on the same host. The plugin also provides some aliases for such operations.
|
||||
|
||||
- You don't have the cost of starting Emacs all the time anymore
|
||||
- Opening a file is as fast as Emacs does not have anything else to do.
|
||||
- You can share opened buffered across opened frames.
|
||||
- Configuration changes made at runtime are applied to all frames.
|
||||
|
||||
**NOTE:** requires Emacs 24 and newer.
|
||||
|
||||
To use it, add emacs to the plugins array in your zshrc file:
|
||||
|
||||
```zsh
|
||||
plugins=(... emacs)
|
||||
```
|
||||
|
||||
## Aliases
|
||||
|
||||
The plugin uses a custom launcher (which we'll call here `$EMACS_LAUNCHER`) that is just a wrapper around [`emacsclient`](https://www.emacswiki.org/emacs/EmacsClient).
|
||||
|
||||
| Alias | Command | Description |
|
||||
|--------|----------------------------------------------------|----------------------------------------------------------------|
|
||||
| emacs | `$EMACS_LAUNCHER --no-wait` | Opens a temporary emacsclient frame |
|
||||
| e | `emacs` | Same as emacs alias |
|
||||
| te | `$EMACS_LAUNCHER -nw` | Open terminal emacsclient |
|
||||
| eeval | `$EMACS_LAUNCHER --eval` | Same as `M-x eval` but from outside Emacs |
|
||||
| eframe | `emacsclient --alternate-editor "" --create-frame` | Create new X frame |
|
||||
| efile | - | Print the path to the file open in the current buffer |
|
||||
| ecd | - | Print the directory of the file open in the the current buffer |
|
14
plugins/emoji-clock/README.md
Normal file
14
plugins/emoji-clock/README.md
Normal file
|
@ -0,0 +1,14 @@
|
|||
# emoji-clock
|
||||
|
||||
The plugin displays current time as an emoji symbol with half hour accuracy.
|
||||
|
||||
To use it, add `emoji-clock` to the plugins array of your zshrc file:
|
||||
```
|
||||
plugins=(... emoji-clock)
|
||||
```
|
||||
|
||||
## Features
|
||||
|
||||
| Function | Description |
|
||||
|-------------------|----------------------------------------------------------------------|
|
||||
| `emoji-clock` | Displays current time in clock emoji symbol with half hour accuracy |
|
69
plugins/encode64/README.md
Normal file
69
plugins/encode64/README.md
Normal file
|
@ -0,0 +1,69 @@
|
|||
# encode64
|
||||
|
||||
Alias plugin for encoding or decoding using `base64` command
|
||||
|
||||
## Functions and Aliases
|
||||
|
||||
| Function | Alias | Description |
|
||||
| ---------- | ----- | ------------------------------ |
|
||||
| `encode64` | `e64` | Encodes given data to base64 |
|
||||
| `decode64` | `d64` | Decodes given data from base64 |
|
||||
|
||||
## Enabling plugin
|
||||
|
||||
1. Edit your `.zshrc` file and add `encode64` to the list of plugins:
|
||||
|
||||
```sh
|
||||
plugins=(
|
||||
# ...other enabled plugins
|
||||
encode64
|
||||
)
|
||||
```
|
||||
|
||||
2. Restart your terminal session or reload configuration by running:
|
||||
|
||||
```sh
|
||||
source ~/.zshrc
|
||||
```
|
||||
|
||||
## Usage and examples
|
||||
|
||||
### Encoding
|
||||
|
||||
- From parameter
|
||||
|
||||
```console
|
||||
$ encode64 "oh-my-zsh"
|
||||
b2gtbXktenNo
|
||||
$ e64 "oh-my-zsh"
|
||||
b2gtbXktenNo
|
||||
```
|
||||
|
||||
- From piping
|
||||
|
||||
```console
|
||||
$ echo "oh-my-zsh" | encode64
|
||||
b2gtbXktenNo==
|
||||
$ echo "oh-my-zsh" | e64
|
||||
b2gtbXktenNo==
|
||||
```
|
||||
|
||||
### Decoding
|
||||
|
||||
- From parameter
|
||||
|
||||
```console
|
||||
$ decode64 b2gtbXktenNo
|
||||
oh-my-zsh%
|
||||
$ d64 b2gtbXktenNo
|
||||
oh-my-zsh%
|
||||
```
|
||||
|
||||
- From piping
|
||||
|
||||
```console
|
||||
$ echo "b2gtbXktenNoCg==" | decode64
|
||||
oh-my-zsh
|
||||
$ echo "b2gtbXktenNoCg==" | decode64
|
||||
oh-my-zsh
|
||||
```
|
17
plugins/gem/README.md
Normal file
17
plugins/gem/README.md
Normal file
|
@ -0,0 +1,17 @@
|
|||
# Gem plugin
|
||||
|
||||
This plugin adds completions and aliases for [Gem](https://rubygems.org/). The completions include the common `gem` subcommands as well as the installed gems in the current directory.
|
||||
|
||||
To use it, add `gem` to the plugins array in your zshrc file:
|
||||
|
||||
```zsh
|
||||
plugins=(... gem)
|
||||
```
|
||||
|
||||
## Aliases
|
||||
|
||||
| Alias | Command | Description |
|
||||
|----------------------|-------------------------------|--------------------------------------------|
|
||||
| gemb | `gem build *.gemspec` | Build a gem from a gemspec |
|
||||
| gemp | `gem push *.gem` | Push a gem up to the gem server |
|
||||
| gemy [gem] [version] | `gem yank [gem] -v [version]` | Remove a pushed gem version from the index |
|
138
plugins/gitfast/README.md
Normal file
138
plugins/gitfast/README.md
Normal file
|
@ -0,0 +1,138 @@
|
|||
# Gitfast plugin
|
||||
|
||||
This plugin adds completion for Git, using the zsh completion from git.git folks, which is much faster than the official one from zsh. A lot of zsh-specific features are not supported, like descriptions for every argument, but everything the bash completion has, this one does too (as it is using it behind the scenes). Not only is it faster, it should be more robust, and updated regularly to the latest git upstream version..
|
||||
|
||||
To use it, add `gitfast` to the plugins array in your zshrc file:
|
||||
|
||||
```zsh
|
||||
plugins=(... gitfast)
|
||||
```
|
||||
|
||||
## Aliases
|
||||
|
||||
| Alias | Command |
|
||||
| -------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| g | `git` |
|
||||
| ga | `git add` |
|
||||
| gaa | `git add --all` |
|
||||
| gapa | `git add --patch` |
|
||||
| gau | `git add --update` |
|
||||
| gb | `git branch` |
|
||||
| gba | `git branch -a` |
|
||||
| gbd | `git branch -d` |
|
||||
| gbda | `git branch --no-color --merged | command grep -vE "^(\*|\s*(master|develop|dev)\s*$)" | command xargs -n 1 git branch -d` |
|
||||
| gbl | `git blame -b -w` |
|
||||
| gbnm | `git branch --no-merged` |
|
||||
| gbr | `git branch --remote` |
|
||||
| gbs | `git bisect` |
|
||||
| gbsb | `git bisect bad` |
|
||||
| gbsg | `git bisect good` |
|
||||
| gbsr | `git bisect reset` |
|
||||
| gbss | `git bisect start` |
|
||||
| gc | `git commit -v` |
|
||||
| gc! | `git commit -v --amend` |
|
||||
| gca | `git commit -v -a` |
|
||||
| gca! | `git commit -v -a --amend` |
|
||||
| gcam | `git commit -a -m` |
|
||||
| gcan! | `git commit -v -a --no-edit --amend` |
|
||||
| gcans! | `git commit -v -a -s --no-edit --amend` |
|
||||
| gcb | `git checkout -b` |
|
||||
| gcd | `git checkout develop` |
|
||||
| gcf | `git config --list` |
|
||||
| gcl | `git clone --recursive` |
|
||||
| gclean | `git clean -fd` |
|
||||
| gcm | `git checkout master` |
|
||||
| gcmsg | `git commit -m` |
|
||||
| gcn! | `git commit -v --no-edit --amend` |
|
||||
| gco | `git checkout` |
|
||||
| gcount | `git shortlog -sn` |
|
||||
| gcp | `git cherry-pick` |
|
||||
| gcpa | `git cherry-pick --abort` |
|
||||
| gcpc | `git cherry-pick --continue` |
|
||||
| gcs | `git commit -S` |
|
||||
| gcsm | `git commit -s -m` |
|
||||
| gd | `git diff` |
|
||||
| gdca | `git diff --cached` |
|
||||
| gdct | `` git describe --tags `git rev-list --tags --max-count=1` `` |
|
||||
| gdt | `git diff-tree --no-commit-id --name-only -r` |
|
||||
| gdw | `git diff --word-diff` |
|
||||
| gf | `git fetch` |
|
||||
| gfa | `git fetch --all --prune` |
|
||||
| gfo | `git fetch origin` |
|
||||
| gg | `git gui citool` |
|
||||
| gga | `git gui citool --amend` |
|
||||
| ggpull | `git pull origin $(git_current_branch)` |
|
||||
| ggpur | `ggu` |
|
||||
| ggpush | `git push origin $(git_current_branch)` |
|
||||
| ggsup | `git branch --set-upstream-to=origin/$(git_current_branch)` |
|
||||
| ghh | `git help` |
|
||||
| gignore | `git update-index --assume-unchanged` |
|
||||
| gignored | `git ls-files -v | grep "^[[:lower:]]"` |
|
||||
| git-svn-dcommit-push | `git svn dcommit && git push github master:svntrunk` |
|
||||
| gk | `\gitk --all --branches` |
|
||||
| gke | `\gitk --all $(git log -g --pretty=%h)` |
|
||||
| gl | `git pull` |
|
||||
| glg | `git log --stat` |
|
||||
| glgg | `git log --graph` |
|
||||
| glgga | `git log --graph --decorate --all` |
|
||||
| glgm | `git log --graph --max-count=10` |
|
||||
| glgp | `git log --stat -p` |
|
||||
| glo | `git log --oneline --decorate` |
|
||||
| glog | `git log --oneline --decorate --graph` |
|
||||
| gloga | `git log --oneline --decorate --graph --all` |
|
||||
| glol | `git log --graph --pretty='\''%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset'\'' --abbrev-commit` |
|
||||
| glola | `git log --graph --pretty='\''%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset'\'' --abbrev-commit --all` |
|
||||
| glp | `_git_log_prettily` |
|
||||
| glum | `git pull upstream master` |
|
||||
| gm | `git merge` |
|
||||
| gmom | `git merge origin/master` |
|
||||
| gmt | `git mergetool --no-prompt` |
|
||||
| gmtvim | `git mergetool --no-prompt --tool=vimdiff` |
|
||||
| gmum | `git merge upstream/master` |
|
||||
| gp | `git push` |
|
||||
| gpd | `git push --dry-run` |
|
||||
| gpoat | `git push origin --all && git push origin --tags` |
|
||||
| gpristine | `git reset --hard && git clean -dfx` |
|
||||
| gpsup | `git push --set-upstream origin $(git_current_branch)` |
|
||||
| gpu | `git push upstream` |
|
||||
| gpv | `git push -v` |
|
||||
| gr | `git remote` |
|
||||
| gra | `git remote add` |
|
||||
| grb | `git rebase` |
|
||||
| grba | `git rebase --abort` |
|
||||
| grbc | `git rebase --continue` |
|
||||
| grbi | `git rebase -i` |
|
||||
| grbm | `git rebase master` |
|
||||
| grbs | `git rebase --skip` |
|
||||
| grh | `git reset HEAD` |
|
||||
| grhh | `git reset HEAD --hard` |
|
||||
| grmv | `git remote rename` |
|
||||
| grrm | `git remote remove` |
|
||||
| grset | `git remote set-url` |
|
||||
| grt | `cd $(git rev-parse --show-toplevel || echo ".")` |
|
||||
| gru | `git reset --` |
|
||||
| grup | `git remote update` |
|
||||
| grv | `git remote -v` |
|
||||
| gsb | `git status -sb` |
|
||||
| gsd | `git svn dcommit` |
|
||||
| gsi | `git submodule init` |
|
||||
| gsps | `git show --pretty=short --show-signature` |
|
||||
| gsr | `git svn rebase` |
|
||||
| gss | `git status -s` |
|
||||
| gst | `git status` |
|
||||
| gsta | `git stash save` |
|
||||
| gstaa | `git stash apply` |
|
||||
| gstc | `git stash clear` |
|
||||
| gstd | `git stash drop` |
|
||||
| gstl | `git stash list` |
|
||||
| gstp | `git stash pop` |
|
||||
| gsts | `git stash show --text` |
|
||||
| gsu | `git submodule update` |
|
||||
| gts | `git tag -s` |
|
||||
| gtv | `git tag | sort -V` |
|
||||
| gunignore | `git update-index --no-assume-unchanged` |
|
||||
| gunwip | `git log -n 1 | grep -q -c "\-\-wip\-\-" && git reset HEAD~1` |
|
||||
| gup | `git pull --rebase` |
|
||||
| gupv | `git pull --rebase -v` |
|
||||
| gwch | `git whatchanged -p --abbrev-commit --pretty=medium` |
|
||||
| gwip | `git add -A; git rm $(git ls-files --deleted) 2> /dev/null; git commit --no-verify -m "--wip-- [skip ci]"` |
|
1
plugins/go/README.md
Normal file
1
plugins/go/README.md
Normal file
|
@ -0,0 +1 @@
|
|||
The go plugin is deprecated. Use the [golang plugin](https://github.com/robbyrussell/oh-my-zsh/tree/master/plugins/golang) instead.
|
29
plugins/golang/README.md
Normal file
29
plugins/golang/README.md
Normal file
|
@ -0,0 +1,29 @@
|
|||
# Golang plugin
|
||||
|
||||
This plugin adds completion for the [Go Programming Language](https://golang.org/),
|
||||
as well as some aliases for common Golang commands.
|
||||
|
||||
To use it, add `golang` to the plugins array in your zshrc file:
|
||||
|
||||
```zsh
|
||||
plugins=(... golang)
|
||||
```
|
||||
|
||||
## Aliases
|
||||
|
||||
| Alias | Command | Description |
|
||||
| ------- | ----------------------- | ------------------------------------------------------------- |
|
||||
| gob | `go build` | Build your code |
|
||||
| goc | `go clean` | Removes object files from package source directories |
|
||||
| god | `go doc` | Prints documentation comments |
|
||||
| gof | `go fmt` | Gofmt formats (aligns and indents) Go programs. |
|
||||
| gofa | `go fmt ./...` | Run go fmt for all packages in current directory, recursively |
|
||||
| gog | `go get` | Downloads packages and then installs them to $GOPATH |
|
||||
| goi | `go install` | Compiles and installs packages to $GOPATH |
|
||||
| gol | `go list` | Lists Go packages |
|
||||
| gop | `cd $GOPATH` | Takes you to $GOPATH |
|
||||
| gopb | `cd $GOPATH/bin` | Takes you to $GOPATH/bin |
|
||||
| gops | `cd $GOPATH/src` | Takes you to $GOPATH/src |
|
||||
| gor | `go run` | Compiles and runs your code |
|
||||
| got | `go test` | Runs tests |
|
||||
| gov | `go vet` | Vet examines Go source code and reports suspicious constructs |
|
23
plugins/gradle/README.md
Normal file
23
plugins/gradle/README.md
Normal file
|
@ -0,0 +1,23 @@
|
|||
## Gradle Plugin
|
||||
|
||||
This plugin adds completions and aliases for [Gradle](https://gradle.org/).
|
||||
|
||||
To use it, add `gradle` to the plugins array in your zshrc file:
|
||||
|
||||
```zsh
|
||||
plugins=(... gradle)
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
This plugin creates an alias `gradle` which is used to determine whether the current working directory has a gradlew file. If gradlew is present it will be used otherwise `gradle` is used directly. Gradle tasks can be executed directly without regard for whether it is `gradle` or `gradlew`
|
||||
|
||||
Examples:
|
||||
```zsh
|
||||
gradle test
|
||||
gradle build
|
||||
```
|
||||
|
||||
## Completion
|
||||
|
||||
The completion provided for this plugin caches the parsed tasks into a file named `.gradletasknamecache` in the current working directory, so you might want to add that to your `.gitignore` file so that it's not accidentally committed.
|
37
plugins/grunt/README.md
Normal file
37
plugins/grunt/README.md
Normal file
|
@ -0,0 +1,37 @@
|
|||
# grunt plugin
|
||||
|
||||
This plugin adds completions for [grunt](https://github.com/gruntjs/grunt).
|
||||
|
||||
To use it, add `grunt` to the plugins array of your `.zshrc` file:
|
||||
```zsh
|
||||
plugins=(... grunt)
|
||||
```
|
||||
|
||||
## Enable caching
|
||||
|
||||
If you want to use the cache, set the following in your `.zshrc`:
|
||||
```zsh
|
||||
zstyle ':completion:*' use-cache yes
|
||||
```
|
||||
|
||||
## Settings
|
||||
|
||||
* Show grunt file path:
|
||||
```zsh
|
||||
zstyle ':completion::complete:grunt::options:' show_grunt_path yes
|
||||
```
|
||||
* Cache expiration days (default: 7):
|
||||
```zsh
|
||||
zstyle ':completion::complete:grunt::options:' expire 1
|
||||
```
|
||||
* Not update options cache if target gruntfile is changed.
|
||||
```zsh
|
||||
zstyle ':completion::complete:grunt::options:' no_update_options yes
|
||||
```
|
||||
|
||||
Note that if you change the zstyle settings, you should delete the cache file and restart zsh.
|
||||
|
||||
```zsh
|
||||
$ rm ~/.zcompcache/grunt
|
||||
$ exec zsh
|
||||
```
|
8
plugins/gulp/README.md
Normal file
8
plugins/gulp/README.md
Normal file
|
@ -0,0 +1,8 @@
|
|||
# gulp plugin
|
||||
|
||||
This plugin adds autocompletion for your [`gulp`](https://gulpjs.com/) tasks. It grabs all available tasks from the `gulpfile.js` in the current directory.
|
||||
|
||||
To use it, add `gulp` to the plugins array of your `.zshrc` file:
|
||||
```
|
||||
plugins=(... gulp)
|
||||
```
|
29
plugins/iterm2/README.md
Normal file
29
plugins/iterm2/README.md
Normal file
|
@ -0,0 +1,29 @@
|
|||
# iTerm2 plugin
|
||||
|
||||
This plugin adds a few functions that are useful when using [iTerm2](https://www.iterm2.com/).
|
||||
|
||||
To use it, add _iterm2_ to the plugins array of your zshrc file:
|
||||
```
|
||||
plugins=(... iterm2)
|
||||
```
|
||||
|
||||
## Plugin commands
|
||||
|
||||
* `_iterm2_command <iterm2-command>`
|
||||
executes an arbitrary iTerm2 command via an escape code sequence.
|
||||
See https://iterm2.com/documentation-escape-codes.html for all supported commands.
|
||||
|
||||
* `iterm2_profile <profile-name>`
|
||||
changes the current terminal window's profile (colors, fonts, settings, etc).
|
||||
`profile-name` is the name of another iTerm2 profile. The profile name can contain spaces.
|
||||
|
||||
* `iterm2_tab_color <red> <green> <blue>`
|
||||
changes the color of iTerm2's currently active tab.
|
||||
`red`/`green`/`blue` are on the range 0-255.
|
||||
|
||||
* `iterm2_tab_color_reset`
|
||||
resets the color of iTerm2's current tab back to default.
|
||||
|
||||
## Contributors
|
||||
|
||||
- [Aviv Rosenberg](https://github.com/avivrosenberg)
|
19
plugins/jump/README.md
Normal file
19
plugins/jump/README.md
Normal file
|
@ -0,0 +1,19 @@
|
|||
# Jump plugin
|
||||
|
||||
This plugin allows to easily jump around the file system by manually adding marks.
|
||||
Those marks are stored as symbolic links in the directory `$MARKPATH` (default `$HOME/.marks`)
|
||||
|
||||
To use it, add `jump` to the plugins array in your zshrc file:
|
||||
|
||||
```zsh
|
||||
plugins=(... jump)
|
||||
```
|
||||
|
||||
## Commands
|
||||
|
||||
| Command | Description |
|
||||
|----------------------|-------------------------------------------------------------------------------------------------|
|
||||
| `jump <mark-name>` | Jump to the given mark |
|
||||
| `mark [mark-name]` | Create a mark with the given name or with the name of the current directory if none is provided |
|
||||
| `unmark <mark-name>` | Remove the given mark |
|
||||
| `marks` | List the existing marks and the directories they point to |
|
|
@ -19,7 +19,7 @@ mark() {
|
|||
MARK="$1"
|
||||
fi
|
||||
if read -q \?"Mark $PWD as ${MARK}? (y/n) "; then
|
||||
mkdir -p "$MARKPATH"; ln -s "$PWD" "$MARKPATH/$MARK"
|
||||
mkdir -p "$MARKPATH"; ln -sfn "$PWD" "$MARKPATH/$MARK"
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
20
plugins/kate/README.md
Normal file
20
plugins/kate/README.md
Normal file
|
@ -0,0 +1,20 @@
|
|||
# Kate plugin
|
||||
|
||||
This plugin adds aliases for the [Kate editor](https://kate-editor.org).
|
||||
|
||||
To use it, add kate to the plugins array of your zshrc file:
|
||||
```
|
||||
plugins=(... kate)
|
||||
```
|
||||
|
||||
## Aliases
|
||||
|
||||
| Alias | Command | Description |
|
||||
|-------|------------------------|---------------------|
|
||||
| kate | `kate >/dev/null 2>&1` | Start kate silently |
|
||||
|
||||
## Functions
|
||||
|
||||
| Function | Description |
|
||||
|------------|------------------------------------------|
|
||||
| `kt <dir>` | Change to directory and start kate there |
|
|
@ -1,6 +1,7 @@
|
|||
# Laravel
|
||||
|
||||
Enable some cool aliases for Laravel [artisan console](https://laravel.com/docs/5.7/artisan). To use it, add `laravel` to the plugins array of your zshrc file:
|
||||
This plugin adds aliases and autocompletion for Laravel [Artisan](https://laravel.com/docs/artisan) and [Bob](http://daylerees.github.io/laravel-bob/) command-line interfaces.
|
||||
|
||||
```
|
||||
plugins=(... laravel)
|
||||
```
|
||||
|
|
18
plugins/laravel4/README.md
Normal file
18
plugins/laravel4/README.md
Normal file
|
@ -0,0 +1,18 @@
|
|||
# Laravel 4 plugin
|
||||
|
||||
This plugin adds some aliases for common [Laravel 4](https://laravel.com/docs/4.2) commands.
|
||||
|
||||
To use it, add `laravel4` to the plugins array in your zshrc file:
|
||||
|
||||
```zsh
|
||||
plugins=(... laravel4)
|
||||
```
|
||||
|
||||
## Aliases
|
||||
|
||||
| Alias | Command | Description |
|
||||
|-----------|-------------------------------------------|-------------------------------------------------------------|
|
||||
| la4 | `php artisan` | Main Artisan command |
|
||||
| la4dump | `php artisan dump-autoload` | Regenerate framework autoload files |
|
||||
| la4cache | `php artisan cache:clear` | Flush the application cache |
|
||||
| la4routes | `php artisan routes` | List all registered routes |
|
18
plugins/laravel5/README.md
Normal file
18
plugins/laravel5/README.md
Normal file
|
@ -0,0 +1,18 @@
|
|||
# Laravel 5 plugin
|
||||
|
||||
This plugin adds some aliases for common [Laravel 5](https://laravel.com/docs) commands.
|
||||
|
||||
To use it, add `laravel5` to the plugins array in your zshrc file:
|
||||
|
||||
```zsh
|
||||
plugins=(... laravel5)
|
||||
```
|
||||
|
||||
## Aliases
|
||||
|
||||
| Alias | Command | Description |
|
||||
|-----------|------------------------------|----------------------------------------------------|
|
||||
| la5 | `php artisan` | Main Artisan command |
|
||||
| la5cache | `php artisan cache:clear` | Flush the application cache |
|
||||
| la5routes | `php artisan route:list` | List all registered routes |
|
||||
| la5vendor | `php artisan vendor:publish` | Publish any publishable assets from vendor package |
|
83
plugins/lol/README.md
Normal file
83
plugins/lol/README.md
Normal file
|
@ -0,0 +1,83 @@
|
|||
# lol
|
||||
|
||||
Plugin for adding catspeak aliases, because why not
|
||||
|
||||
## Enabling the plugin
|
||||
|
||||
1. Open your `.zshrc` file and add `lol` in the plugins section:
|
||||
|
||||
```zsh
|
||||
plugins=(
|
||||
# all your enabled plugins
|
||||
lol
|
||||
)
|
||||
```
|
||||
|
||||
2. Reload the source file or restart your Terminal session:
|
||||
|
||||
```console
|
||||
$ source ~/.zshrc
|
||||
$
|
||||
```
|
||||
|
||||
## Aliases
|
||||
|
||||
| Alias | Command |
|
||||
| ------------ | ---------------------------------------------------------------- |
|
||||
| `:3` | `echo` |
|
||||
| `alwayz` | `tail -f` |
|
||||
| `bringz` | `git pull` |
|
||||
| `btw` | `nice` |
|
||||
| `byes` | `exit` |
|
||||
| `chicken` | `git add` |
|
||||
| `cya` | `reboot` |
|
||||
| `donotwant` | `rm` |
|
||||
| `dowant` | `cp` |
|
||||
| `gimmeh` | `touch` |
|
||||
| `gtfo` | `mv` |
|
||||
| `hackzor` | `git init` |
|
||||
| `hai` | `cd` |
|
||||
| `icanhas` | `mkdir` |
|
||||
| `ihasbucket` | `df -h` |
|
||||
| `iminurbase` | `finger` |
|
||||
| `inur` | `locate` |
|
||||
| `invisible` | `cat` |
|
||||
| `iz` | `ls` |
|
||||
| `kthxbai` | `halt` |
|
||||
| `letcat` | `git checkout` |
|
||||
| `moar` | `more` |
|
||||
| `nomnom` | `killall` |
|
||||
| `nomz` | `ps aux` |
|
||||
| `nowai` | `chmod` |
|
||||
| `oanward` | `git commit -m` |
|
||||
| `obtw` | `nohup` |
|
||||
| `onoz` | `cat /var/log/errors.log` |
|
||||
| `ooanward` | `git commit -am` |
|
||||
| `plz` | `pwd` |
|
||||
| `pwned` | `ssh` |
|
||||
| `rtfm` | `man` |
|
||||
| `rulz` | `git push` |
|
||||
| `tldr` | `less` |
|
||||
| `violenz` | `git rebase` |
|
||||
| `visible` | `echo` |
|
||||
| `wtf` | `dmesg` |
|
||||
| `yolo` | `git commit -m "$(curl -s https://whatthecommit.com/index.txt)"` |
|
||||
|
||||
## Usage Examples
|
||||
|
||||
```sh
|
||||
# mkdir new-directory
|
||||
icanhas new-directory
|
||||
|
||||
# killall firefox
|
||||
nomnom firefox
|
||||
|
||||
# chmod u=r,go= some.file
|
||||
nowai u=r,go= some.file
|
||||
|
||||
# ssh root@catserver.org
|
||||
pwned root@catserver.org
|
||||
|
||||
# git commit -m "$(curl -s https://whatthecommit.com/index.txt)"
|
||||
yolo
|
||||
```
|
21
plugins/macports/README.md
Normal file
21
plugins/macports/README.md
Normal file
|
@ -0,0 +1,21 @@
|
|||
# Macports plugin
|
||||
|
||||
This plugin adds completion for the package manager [Macports](https://macports.com/),
|
||||
as well as some aliases for common Macports commands.
|
||||
|
||||
To use it, add `macports` to the plugins array in your zshrc file:
|
||||
|
||||
```zsh
|
||||
plugins=(... macports)
|
||||
```
|
||||
|
||||
## Aliases
|
||||
|
||||
| Alias | Command | Description |
|
||||
|-------|------------------------------------|--------------------------------------------------------------|
|
||||
| pc | `sudo port clean --all installed` | Clean up intermediate installation files for installed ports |
|
||||
| pi | `sudo port install` | Install package given as argument |
|
||||
| psu | `sudo port selfupdate` | Update ports tree with MacPorts repository |
|
||||
| puni | `sudo port uninstall inactive` | Uninstall inactive ports |
|
||||
| puo | `sudo port upgrade outdated` | Upgrade ports with newer versions available |
|
||||
| pup | `psu && puo` | Update ports tree, then upgrade ports to newest versions |
|
|
@ -1,8 +1,6 @@
|
|||
#Aliases
|
||||
alias pc="sudo port clean --all installed"
|
||||
alias pi="sudo port install $1"
|
||||
alias pi="sudo port install"
|
||||
alias psu="sudo port selfupdate"
|
||||
alias puni="sudo port uninstall inactive"
|
||||
alias puo="sudo port upgrade outdated"
|
||||
alias pup="psu && puo"
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
# Mercurial
|
||||
alias hga='hg add'
|
||||
alias hgc='hg commit'
|
||||
alias hgb='hg branch'
|
||||
alias hgba='hg branches'
|
||||
|
|
|
@ -16,3 +16,4 @@ plugins=(... mix)
|
|||
| Phoenix v1.3.0 and above| [Phoenix](https://hexdocs.pm/phoenix/Phoenix.html) |
|
||||
| Ecto | [Ecto](https://hexdocs.pm/ecto/Ecto.html) |
|
||||
| Hex | [Hex](https://hex.pm/) |
|
||||
| Nerves | [Nerves](https://nerves-project.org/) |
|
||||
|
|
|
@ -31,6 +31,9 @@ _1st_arguments=(
|
|||
'ecto.migrations:Displays the up / down migration status'
|
||||
'ecto.rollback:Reverts applied migrations'
|
||||
'escript.build:Builds an escript for the project'
|
||||
'firmware:Nerves - Build a firmware image for the selected target platform'
|
||||
'firmware.burn:Nerves - Writes the generated firmware image to an attached SDCard or file'
|
||||
'firmware.image:Nerves - Create a firmware image file that can be copied byte-for-byte'
|
||||
'help:Print help information for tasks'
|
||||
'hex:Print hex help information'
|
||||
'hex.config:Read or update hex config'
|
||||
|
@ -48,6 +51,11 @@ _1st_arguments=(
|
|||
'local.phoenix:Updates Phoenix locally'
|
||||
'local.phx:Updates the Phoenix project generator locally'
|
||||
'local.rebar:Install rebar locally'
|
||||
'nerves.artifact:Create an artifact for a specified Nerves package'
|
||||
'nerves.artifact.get:Nerves get artifacts'
|
||||
'nerves.info:Prints Nerves system information'
|
||||
'nerves.new:Create a new Nerves application'
|
||||
'nerves.release.init:Prepare a new Nerves project for use with releases'
|
||||
'new:Create a new Elixir project'
|
||||
'phoenix.digest:Digests and compress static files'
|
||||
'phoenix.gen.channel:Generates a Phoenix channel'
|
||||
|
|
9
plugins/mosh/README.md
Normal file
9
plugins/mosh/README.md
Normal file
|
@ -0,0 +1,9 @@
|
|||
# Mosh Plugin
|
||||
|
||||
This plugin allows SSH tab completion for [mosh](https://mosh.org/) hostnames.
|
||||
|
||||
To use it, add `mosh` to the plugins array in your zshrc file:
|
||||
|
||||
```
|
||||
plugins=(... mosh)
|
||||
```
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
ng_opts='addon asset-sizes b build completion d destroy doc e2e g generate get github-pages:deploy gh-pages:deploy h help i init install lint make-this-awesome new s serve server set t test v version -h --help'
|
||||
ng_opts='addon asset-sizes b build completion d destroy doc e2e g generate get github-pages:deploy gh-pages:deploy h help i init install lint make-this-awesome new s serve server set t test update v version -h --help'
|
||||
|
||||
_ng_completion () {
|
||||
local words cword opts
|
||||
|
@ -56,6 +56,10 @@ _ng_completion () {
|
|||
opts='--browsers --colors --config-file --environment --filter --host --launch --log-level --module --path --port --query --reporter --server --silent --test-page --test-port --watch -H -c -cf -e -f -m -r -s -tp -w'
|
||||
;;
|
||||
|
||||
update )
|
||||
opts='--all --dryRun --force --from --migrate-only --next --registry --to -d'
|
||||
;;
|
||||
|
||||
v | version )
|
||||
opts='--verbose'
|
||||
;;
|
||||
|
|
16
plugins/node/README.md
Normal file
16
plugins/node/README.md
Normal file
|
@ -0,0 +1,16 @@
|
|||
# node plugin
|
||||
|
||||
To use it, add `node` to the plugins array of your zshrc file:
|
||||
```zsh
|
||||
plugins=(... node)
|
||||
```
|
||||
|
||||
This plugin adds `node-docs` function that open specific section in [Node.js](https://nodejs.org) documentation (depending on the installed version).
|
||||
For example:
|
||||
|
||||
```zsh
|
||||
# Opens https://nodejs.org/docs/latest-v10.x/api/fs.html
|
||||
$ node-docs fs
|
||||
# Opens https://nodejs.org/docs/latest-v10.x/api/path.html
|
||||
$ node-docs path
|
||||
```
|
9
plugins/nvm/README.md
Normal file
9
plugins/nvm/README.md
Normal file
|
@ -0,0 +1,9 @@
|
|||
# nvm plugin
|
||||
|
||||
This plugin adds autocompletions for [nvm](https://github.com/creationix/nvm) — a Node.js version manager.
|
||||
It also automatically sources nvm, so you don't need to do it manually in your `.zshrc`.
|
||||
|
||||
To use it, add `nvm` to the plugins array of your zshrc file:
|
||||
```zsh
|
||||
plugins=(... nvm)
|
||||
```
|
8
plugins/pep8/README.md
Normal file
8
plugins/pep8/README.md
Normal file
|
@ -0,0 +1,8 @@
|
|||
# pep8 plugin
|
||||
|
||||
This plugin adds completion for [pep8](https://pep8.readthedocs.io/en/release-1.7.x/#), a tool to check your Python code against some of the style conventions in [PEP 8](http://www.python.org/dev/peps/pep-0008/).
|
||||
|
||||
To use it, add pep8 to the plugins array of your zshrc file:
|
||||
```
|
||||
plugins=(... pep8)
|
||||
```
|
22
plugins/postgres/README.md
Normal file
22
plugins/postgres/README.md
Normal file
|
@ -0,0 +1,22 @@
|
|||
# Postgres plugin
|
||||
|
||||
This plugin adds some aliases for useful Postgres commands.
|
||||
|
||||
:warning: this plugin works exclusively with Postgres installed via Homebrew on OSX
|
||||
because Postgres paths are hardcoded to `/usr/local/var/postgres`.
|
||||
|
||||
To use it, add `postgres` to the plugins array in your zshrc file:
|
||||
|
||||
```zsh
|
||||
plugins=(... postgres)
|
||||
```
|
||||
|
||||
## Aliases
|
||||
|
||||
| Alias | Command | Description |
|
||||
|-------------|---------------------------------------------------------------------------------|-------------------------------------------------------------|
|
||||
| startpost | `pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start` | Start postgres server |
|
||||
| stoppost | `pg_ctl -D /usr/local/var/postgres stop -s -m fast` | Stop postgres server |
|
||||
| restartpost | `stoppost && sleep 1 && startpost` | Restart (calls stop, then start) |
|
||||
| reloadpost | `pg_ctl reload -D /usr/local/var/postgres -s` | Reload postgres configuration (some setting require restart)|
|
||||
| statuspost | `pg_ctl status -D /usr/local/var/postgres -s` | Check startus of postgres server (running, stopped) |
|
20
plugins/ruby/README.md
Normal file
20
plugins/ruby/README.md
Normal file
|
@ -0,0 +1,20 @@
|
|||
# Ruby plugin
|
||||
|
||||
This plugin adds aliases for common commands used in dealing with [Ruby](https://www.ruby-lang.org/en/) and [gem packages](https://rubygems.org/).
|
||||
|
||||
To use it, add `ruby` to the plugins array in your zshrc file:
|
||||
|
||||
```zsh
|
||||
plugins=(... ruby)
|
||||
```
|
||||
|
||||
## Aliases
|
||||
|
||||
| Alias | Command | Description |
|
||||
|-------|----------------------------------------|------------------------------------------------------|
|
||||
| rb | `ruby` | The Ruby command |
|
||||
| sgem | `sudo gem` | Run sudo gem on the system ruby, not the active ruby |
|
||||
| rfind | `find . -name "*.rb" \| xargs grep -n` | Find ruby file |
|
||||
| gin | `gem install` | Install a gem into the local repository |
|
||||
| gun | `gem uninstall` | Uninstall gems from the local repository |
|
||||
| gli | `gem list` | Display gems installed locally |
|
|
@ -72,14 +72,16 @@ _swift_build() {
|
|||
"--build-path[Specify build/cache directory ]:Specify build/cache directory :_files"
|
||||
"(--chdir -C)"{--chdir,-C}"[]: :_files"
|
||||
"--package-path[Change working directory before any other operation]:Change working directory before any other operation:_files"
|
||||
"--sanitize[Turn on runtime checks for erroneous behavior]: :{_values '' 'address[enable Address sanitizer]' 'thread[enable Thread sanitizer]'}"
|
||||
"--disable-prefetching[]"
|
||||
"--skip-update[Skip updating dependencies from their remote during a resolution]"
|
||||
"--disable-sandbox[Disable using the sandbox when executing subprocesses]"
|
||||
"--version[]"
|
||||
"--destination[]: :_files"
|
||||
"(--verbose -v)"{--verbose,-v}"[Increase verbosity of informational output]"
|
||||
"--no-static-swift-stdlib[Do not link Swift stdlib statically]"
|
||||
"--no-static-swift-stdlib[Do not link Swift stdlib statically \[default\]]"
|
||||
"--static-swift-stdlib[Link Swift stdlib statically]"
|
||||
"--enable-build-manifest-caching[Enable llbuild manifest caching [Experimental]]"
|
||||
"--enable-build-manifest-caching[Enable llbuild manifest caching \[Experimental\]]"
|
||||
"--build-tests[Build both source and test targets]"
|
||||
"--product[Build the specified product]:Build the specified product: "
|
||||
"--target[Build the specified target]:Build the specified target: "
|
||||
|
@ -106,14 +108,16 @@ _swift_run() {
|
|||
"--build-path[Specify build/cache directory ]:Specify build/cache directory :_files"
|
||||
"(--chdir -C)"{--chdir,-C}"[]: :_files"
|
||||
"--package-path[Change working directory before any other operation]:Change working directory before any other operation:_files"
|
||||
"--sanitize[Turn on runtime checks for erroneous behavior]: :{_values '' 'address[enable Address sanitizer]' 'thread[enable Thread sanitizer]'}"
|
||||
"--disable-prefetching[]"
|
||||
"--skip-update[Skip updating dependencies from their remote during a resolution]"
|
||||
"--disable-sandbox[Disable using the sandbox when executing subprocesses]"
|
||||
"--version[]"
|
||||
"--destination[]: :_files"
|
||||
"(--verbose -v)"{--verbose,-v}"[Increase verbosity of informational output]"
|
||||
"--no-static-swift-stdlib[Do not link Swift stdlib statically]"
|
||||
"--no-static-swift-stdlib[Do not link Swift stdlib statically \[default\]]"
|
||||
"--static-swift-stdlib[Link Swift stdlib statically]"
|
||||
"--enable-build-manifest-caching[Enable llbuild manifest caching [Experimental]]"
|
||||
"--enable-build-manifest-caching[Enable llbuild manifest caching \[Experimental\]]"
|
||||
"--skip-build[Skip building the executable product]"
|
||||
)
|
||||
_arguments $arguments && return
|
||||
|
@ -136,14 +140,16 @@ _swift_package() {
|
|||
"--build-path[Specify build/cache directory ]:Specify build/cache directory :_files"
|
||||
"(--chdir -C)"{--chdir,-C}"[]: :_files"
|
||||
"--package-path[Change working directory before any other operation]:Change working directory before any other operation:_files"
|
||||
"--sanitize[Turn on runtime checks for erroneous behavior]: :{_values '' 'address[enable Address sanitizer]' 'thread[enable Thread sanitizer]'}"
|
||||
"--disable-prefetching[]"
|
||||
"--skip-update[Skip updating dependencies from their remote during a resolution]"
|
||||
"--disable-sandbox[Disable using the sandbox when executing subprocesses]"
|
||||
"--version[]"
|
||||
"--destination[]: :_files"
|
||||
"(--verbose -v)"{--verbose,-v}"[Increase verbosity of informational output]"
|
||||
"--no-static-swift-stdlib[Do not link Swift stdlib statically]"
|
||||
"--no-static-swift-stdlib[Do not link Swift stdlib statically \[default\]]"
|
||||
"--static-swift-stdlib[Link Swift stdlib statically]"
|
||||
"--enable-build-manifest-caching[Enable llbuild manifest caching [Experimental]]"
|
||||
"--enable-build-manifest-caching[Enable llbuild manifest caching \[Experimental\]]"
|
||||
'(-): :->command'
|
||||
'(-)*:: :->arg'
|
||||
)
|
||||
|
@ -152,81 +158,139 @@ _swift_package() {
|
|||
(command)
|
||||
local modes
|
||||
modes=(
|
||||
'update:Update package dependencies'
|
||||
'show-dependencies:Print the resolved dependency graph'
|
||||
'resolve:Resolve package dependencies'
|
||||
'fetch:'
|
||||
'completion-tool:Completion tool (for shell completions)'
|
||||
'edit:Put a package in editable mode'
|
||||
'tools-version:Manipulate tools version of the current package'
|
||||
'describe:Describe the current package'
|
||||
'clean:Delete build artifacts'
|
||||
'reset:Reset the complete cache/build directory'
|
||||
'unedit:Remove a package from editable mode'
|
||||
'generate-xcodeproj:Generates an Xcode project'
|
||||
'init:Initialize a new package'
|
||||
'dump-package:Print parsed Package.swift as JSON'
|
||||
'describe:Describe the current package'
|
||||
'unedit:Remove a package from editable mode'
|
||||
'update:Update package dependencies'
|
||||
'completion-tool:Completion tool (for shell completions)'
|
||||
'tools-version:Manipulate tools version of the current package'
|
||||
'reset:Reset the complete cache/build directory'
|
||||
'resolve:Resolve package dependencies'
|
||||
'generate-xcodeproj:Generates an Xcode project'
|
||||
'fetch:'
|
||||
'show-dependencies:Print the resolved dependency graph'
|
||||
)
|
||||
_describe "mode" modes
|
||||
;;
|
||||
(arg)
|
||||
case ${words[1]} in
|
||||
(update)
|
||||
_swift_package_update
|
||||
;;
|
||||
(show-dependencies)
|
||||
_swift_package_show-dependencies
|
||||
;;
|
||||
(resolve)
|
||||
_swift_package_resolve
|
||||
;;
|
||||
(fetch)
|
||||
_swift_package_fetch
|
||||
;;
|
||||
(completion-tool)
|
||||
_swift_package_completion-tool
|
||||
;;
|
||||
(edit)
|
||||
_swift_package_edit
|
||||
;;
|
||||
(tools-version)
|
||||
_swift_package_tools-version
|
||||
;;
|
||||
(describe)
|
||||
_swift_package_describe
|
||||
;;
|
||||
(clean)
|
||||
_swift_package_clean
|
||||
;;
|
||||
(reset)
|
||||
_swift_package_reset
|
||||
;;
|
||||
(unedit)
|
||||
_swift_package_unedit
|
||||
;;
|
||||
(generate-xcodeproj)
|
||||
_swift_package_generate-xcodeproj
|
||||
;;
|
||||
(init)
|
||||
_swift_package_init
|
||||
;;
|
||||
(dump-package)
|
||||
_swift_package_dump-package
|
||||
;;
|
||||
(describe)
|
||||
_swift_package_describe
|
||||
;;
|
||||
(unedit)
|
||||
_swift_package_unedit
|
||||
;;
|
||||
(update)
|
||||
_swift_package_update
|
||||
;;
|
||||
(completion-tool)
|
||||
_swift_package_completion-tool
|
||||
;;
|
||||
(tools-version)
|
||||
_swift_package_tools-version
|
||||
;;
|
||||
(reset)
|
||||
_swift_package_reset
|
||||
;;
|
||||
(resolve)
|
||||
_swift_package_resolve
|
||||
;;
|
||||
(generate-xcodeproj)
|
||||
_swift_package_generate-xcodeproj
|
||||
;;
|
||||
(fetch)
|
||||
_swift_package_fetch
|
||||
;;
|
||||
(show-dependencies)
|
||||
_swift_package_show-dependencies
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
_swift_package_edit() {
|
||||
arguments=(
|
||||
":The name of the package to edit:_swift_dependency"
|
||||
"--revision[The revision to edit]:The revision to edit: "
|
||||
"--branch[The branch to create]:The branch to create: "
|
||||
"--path[Create or use the checkout at this path]:Create or use the checkout at this path:_files"
|
||||
)
|
||||
_arguments $arguments && return
|
||||
}
|
||||
|
||||
_swift_package_clean() {
|
||||
arguments=(
|
||||
)
|
||||
_arguments $arguments && return
|
||||
}
|
||||
|
||||
_swift_package_init() {
|
||||
arguments=(
|
||||
"--type[empty|library|executable|system-module]: :{_values '' 'empty[generates an empty project]' 'library[generates project for a dynamic library]' 'executable[generates a project for a cli executable]' 'system-module[generates a project for a system module]'}"
|
||||
)
|
||||
_arguments $arguments && return
|
||||
}
|
||||
|
||||
_swift_package_dump-package() {
|
||||
arguments=(
|
||||
)
|
||||
_arguments $arguments && return
|
||||
}
|
||||
|
||||
_swift_package_describe() {
|
||||
arguments=(
|
||||
"--type[json|text]: :{_values '' 'text[describe using text format]' 'json[describe using JSON format]'}"
|
||||
)
|
||||
_arguments $arguments && return
|
||||
}
|
||||
|
||||
_swift_package_unedit() {
|
||||
arguments=(
|
||||
":The name of the package to unedit:_swift_dependency"
|
||||
"--force[Unedit the package even if it has uncommited and unpushed changes.]"
|
||||
)
|
||||
_arguments $arguments && return
|
||||
}
|
||||
|
||||
_swift_package_update() {
|
||||
arguments=(
|
||||
)
|
||||
_arguments $arguments && return
|
||||
}
|
||||
|
||||
_swift_package_show-dependencies() {
|
||||
_swift_package_completion-tool() {
|
||||
arguments=(
|
||||
": :{_values '' 'generate-bash-script[generate Bash completion script]' 'generate-zsh-script[generate Bash completion script]' 'list-dependencies[list all dependencies' names]' 'list-executables[list all executables' names]'}"
|
||||
)
|
||||
_arguments $arguments && return
|
||||
}
|
||||
|
||||
_swift_package_tools-version() {
|
||||
arguments=(
|
||||
"--set[Set tools version of package to the given value]:Set tools version of package to the given value: "
|
||||
"--set-current[Set tools version of package to the current tools version in use]"
|
||||
)
|
||||
_arguments $arguments && return
|
||||
}
|
||||
|
||||
_swift_package_reset() {
|
||||
arguments=(
|
||||
"--format[text|dot|json|flatlist]: :{_values '' 'text[list dependencies using text format]' 'dot[list dependencies using dot format]' 'json[list dependencies using JSON format]'}"
|
||||
)
|
||||
_arguments $arguments && return
|
||||
}
|
||||
|
@ -241,82 +305,26 @@ _swift_package_resolve() {
|
|||
_arguments $arguments && return
|
||||
}
|
||||
|
||||
_swift_package_generate-xcodeproj() {
|
||||
arguments=(
|
||||
"--xcconfig-overrides[Path to xcconfig file]:Path to xcconfig file:_files"
|
||||
"--enable-code-coverage[Enable code coverage in the generated project]"
|
||||
"--output[Path where the Xcode project should be generated]:Path where the Xcode project should be generated:_files"
|
||||
"--legacy-scheme-generator[Use the legacy scheme generator]"
|
||||
"--watch[Watch for changes to the Package manifest to regenerate the Xcode project]"
|
||||
)
|
||||
_arguments $arguments && return
|
||||
}
|
||||
|
||||
_swift_package_fetch() {
|
||||
arguments=(
|
||||
)
|
||||
_arguments $arguments && return
|
||||
}
|
||||
|
||||
_swift_package_completion-tool() {
|
||||
arguments=(
|
||||
": :{_values '' 'generate-bash-script[generate Bash completion script]' 'generate-zsh-script[generate Bash completion script]' 'list-dependencies[list all dependencies' names]' 'list-executables[list all executables' names]'}"
|
||||
)
|
||||
_arguments $arguments && return
|
||||
}
|
||||
|
||||
_swift_package_edit() {
|
||||
arguments=(
|
||||
":The name of the package to edit:_swift_dependency"
|
||||
"--revision[The revision to edit]:The revision to edit: "
|
||||
"--branch[The branch to create]:The branch to create: "
|
||||
"--path[Create or use the checkout at this path]:Create or use the checkout at this path:_files"
|
||||
)
|
||||
_arguments $arguments && return
|
||||
}
|
||||
|
||||
_swift_package_tools-version() {
|
||||
arguments=(
|
||||
"--set[Set tools version of package to the given value]:Set tools version of package to the given value: "
|
||||
"--set-current[Set tools version of package to the current tools version in use]"
|
||||
)
|
||||
_arguments $arguments && return
|
||||
}
|
||||
|
||||
_swift_package_describe() {
|
||||
arguments=(
|
||||
"--type[json|text]: :{_values '' 'text[describe using text format]' 'json[describe using JSON format]'}"
|
||||
)
|
||||
_arguments $arguments && return
|
||||
}
|
||||
|
||||
_swift_package_clean() {
|
||||
arguments=(
|
||||
)
|
||||
_arguments $arguments && return
|
||||
}
|
||||
|
||||
_swift_package_reset() {
|
||||
arguments=(
|
||||
)
|
||||
_arguments $arguments && return
|
||||
}
|
||||
|
||||
_swift_package_unedit() {
|
||||
arguments=(
|
||||
":The name of the package to unedit:_swift_dependency"
|
||||
"--force[Unedit the package even if it has uncommited and unpushed changes.]"
|
||||
)
|
||||
_arguments $arguments && return
|
||||
}
|
||||
|
||||
_swift_package_generate-xcodeproj() {
|
||||
arguments=(
|
||||
"--xcconfig-overrides[Path to xcconfig file]:Path to xcconfig file:_files"
|
||||
"--enable-code-coverage[Enable code coverage in the generated project]"
|
||||
"--output[Path where the Xcode project should be generated]:Path where the Xcode project should be generated:_files"
|
||||
)
|
||||
_arguments $arguments && return
|
||||
}
|
||||
|
||||
_swift_package_init() {
|
||||
arguments=(
|
||||
"--type[empty|library|executable|system-module]: :{_values '' 'empty[generates an empty project]' 'library[generates project for a dynamic library]' 'executable[generates a project for a cli executable]' 'system-module[generates a project for a system module]'}"
|
||||
)
|
||||
_arguments $arguments && return
|
||||
}
|
||||
|
||||
_swift_package_dump-package() {
|
||||
_swift_package_show-dependencies() {
|
||||
arguments=(
|
||||
"--format[text|dot|json|flatlist]: :{_values '' 'text[list dependencies using text format]' 'dot[list dependencies using dot format]' 'json[list dependencies using JSON format]'}"
|
||||
)
|
||||
_arguments $arguments && return
|
||||
}
|
||||
|
@ -338,19 +346,22 @@ _swift_test() {
|
|||
"--build-path[Specify build/cache directory ]:Specify build/cache directory :_files"
|
||||
"(--chdir -C)"{--chdir,-C}"[]: :_files"
|
||||
"--package-path[Change working directory before any other operation]:Change working directory before any other operation:_files"
|
||||
"--sanitize[Turn on runtime checks for erroneous behavior]: :{_values '' 'address[enable Address sanitizer]' 'thread[enable Thread sanitizer]'}"
|
||||
"--disable-prefetching[]"
|
||||
"--skip-update[Skip updating dependencies from their remote during a resolution]"
|
||||
"--disable-sandbox[Disable using the sandbox when executing subprocesses]"
|
||||
"--version[]"
|
||||
"--destination[]: :_files"
|
||||
"(--verbose -v)"{--verbose,-v}"[Increase verbosity of informational output]"
|
||||
"--no-static-swift-stdlib[Do not link Swift stdlib statically]"
|
||||
"--no-static-swift-stdlib[Do not link Swift stdlib statically \[default\]]"
|
||||
"--static-swift-stdlib[Link Swift stdlib statically]"
|
||||
"--enable-build-manifest-caching[Enable llbuild manifest caching [Experimental]]"
|
||||
"--enable-build-manifest-caching[Enable llbuild manifest caching \[Experimental\]]"
|
||||
"--skip-build[Skip building the test target]"
|
||||
"(--list-tests -l)"{--list-tests,-l}"[Lists test methods in specifier format]"
|
||||
"--generate-linuxmain[Generate LinuxMain.swift entries for the package]"
|
||||
"--parallel[Run the tests in parallel.]"
|
||||
"(--specifier -s)"{--specifier,-s}"[]: : "
|
||||
"--xunit-output[]: :_files"
|
||||
"--filter[Run test cases matching regular expression, Format: <test-target>.<test-case> or <test-target>.<test-case>/<test>]:Run test cases matching regular expression, Format: <test-target>.<test-case> or <test-target>.<test-case>/<test>: "
|
||||
)
|
||||
_arguments $arguments && return
|
||||
|
|
53
plugins/systemd/README.md
Normal file
53
plugins/systemd/README.md
Normal file
|
@ -0,0 +1,53 @@
|
|||
# Systemd plugin
|
||||
|
||||
The systemd plugin provides many useful aliases for systemd.
|
||||
|
||||
To use it, add systemd to the plugins array of your zshrc file:
|
||||
```
|
||||
plugins=(... systemd)
|
||||
```
|
||||
|
||||
## Aliases
|
||||
|
||||
| Alias | Command | Description |
|
||||
|:-----------------------|:-----------------------------------|:-----------------------------------------------------------------|
|
||||
| `sc-list-units` | `systemctl list-units` | List all units systemd has in memory |
|
||||
| `sc-is-active` | `systemctl is-active` | Show whether a unit is active |
|
||||
| `sc-status` | `systemctl status` | Show terse runtime status information about one or more units |
|
||||
| `sc-show` | `systemctl show` | Show properties of units, jobs, or the manager itself |
|
||||
| `sc-help` | `systemctl help` | Show man page of units |
|
||||
| `sc-list-unit-files` | `systemctl list-unit-files` | List unit files installed on the system |
|
||||
| `sc-is-enabled` | `systemctl is-enabled` | Checks whether any of the specified unit files are enabled |
|
||||
| `sc-list-jobs` | `systemctl list-jobs` | List jobs that are in progress |
|
||||
| `sc-show-environment` | `systemctl show-environment` | Dump the systemd manager environment block |
|
||||
| `sc-cat` | `systemctl cat` | Show backing files of one or more units |
|
||||
| `sc-list-timers` | `systemctl list-timers` | List timer units currently in memory |
|
||||
| **Aliases with sudo** |
|
||||
| `sc-start` | `sudo systemctl start` | Start Unit(s) |
|
||||
| `sc-stop` | `sudo systemctl stop` | Stop Unit(s) |
|
||||
| `sc-reload` | `sudo systemctl reload` | Reload Unit(s) |
|
||||
| `sc-restart` | `sudo systemctl restart` | Restart Unit(s) |
|
||||
| `sc-try-restart` | `sudo systemctl try-restart` | Restart Unit(s) |
|
||||
| `sc-isolate` | `sudo systemctl isolate` | Start a unit and its dependencies and stop all others |
|
||||
| `sc-kill` | `sudo systemctl kill` | Kill unit(s) |
|
||||
| `sc-reset-failed` | `sudo systemctl reset-failed` | Reset the "failed" state of the specified units, |
|
||||
| `sc-enable` | `sudo systemctl enable` | Enable unit(s) |
|
||||
| `sc-disable` | `sudo systemctl disable` | Disable unit(s) |
|
||||
| `sc-reenable` | `sudo systemctl reenable` | Reenable unit(s) |
|
||||
| `sc-preset` | `sudo systemctl preset` | Reset the enable/disable status one or more unit files |
|
||||
| `sc-mask` | `sudo systemctl mask` | Mask unit(s) |
|
||||
| `sc-unmask` | `sudo systemctl unmask` | Unmask unit(s) |
|
||||
| `sc-link` | `sudo systemctl link` | Link a unit file into the unit file search path |
|
||||
| `sc-load` | `sudo systemctl load` | Load unit(s) |
|
||||
| `sc-cancel` | `sudo systemctl cancel` | Cancel job(s) |
|
||||
| `sc-set-environment` | `sudo systemctl set-environment` | Set one or more systemd manager environment variables |
|
||||
| `sc-unset-environment` | `sudo systemctl unset-environment` | Unset one or more systemd manager environment variables |
|
||||
| `sc-edit` | `sudo systemctl edit` | Edit a drop-in snippet or a whole replacement file with `--full` |
|
||||
| `sc-enable-now` | `sudo systemctl enable --now` | Enable and start unit(s) |
|
||||
| `sc-disable-now` | `sudo systemctl disable --now` | Disable and stop unit(s) |
|
||||
| `sc-mask-now` | `sudo systemctl mask --now` | Mask and stop unit(s) |
|
||||
|
||||
### User aliases
|
||||
|
||||
You can use the above aliases as `--user` by using the prefix `scu` instead of `sc`.
|
||||
For example: `scu-list-units` will be aliased to `systemctl --user list-units`.
|
|
@ -1,4 +1,6 @@
|
|||
function tf_prompt_info() {
|
||||
# dont show 'default' workspace in home dir
|
||||
[[ "$PWD" == ~ ]] && return
|
||||
# check if in terraform dir
|
||||
if [ -d .terraform ]; then
|
||||
workspace=$(terraform workspace show 2> /dev/null) || return
|
||||
|
|
18
plugins/themes/README.md
Normal file
18
plugins/themes/README.md
Normal file
|
@ -0,0 +1,18 @@
|
|||
# Themes Plugin
|
||||
|
||||
This plugin allows you to change ZSH theme on the go.
|
||||
|
||||
To use it, add `themes` to the plugins array in your zshrc file:
|
||||
|
||||
```
|
||||
plugins=(... themes)
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
`theme <theme_name>` - Changes the ZSH theme to specified theme.
|
||||
|
||||
`theme ` - Changes the ZSH theme to some random theme.
|
||||
|
||||
`lstheme ` - Lists installed ZSH themes.
|
||||
|
|
@ -8,9 +8,9 @@ function theme
|
|||
source "$RANDOM_THEME"
|
||||
echo "[oh-my-zsh] Random theme '$RANDOM_THEME' loaded..."
|
||||
else
|
||||
if [ -f "$ZSH_CUSTOM/$1.zsh-theme" ]
|
||||
if [ -f "$ZSH_CUSTOM/themes/$1.zsh-theme" ]
|
||||
then
|
||||
source "$ZSH_CUSTOM/$1.zsh-theme"
|
||||
source "$ZSH_CUSTOM/themes/$1.zsh-theme"
|
||||
else
|
||||
source "$ZSH/themes/$1.zsh-theme"
|
||||
fi
|
||||
|
|
52
plugins/ubuntu/README.md
Normal file
52
plugins/ubuntu/README.md
Normal file
|
@ -0,0 +1,52 @@
|
|||
# Ubuntu plugin
|
||||
|
||||
This plugin adds completions and aliases for [Ubuntu](https://www.ubuntu.com/).
|
||||
|
||||
To use it, add `ubuntu` to the plugins array in your zshrc file:
|
||||
|
||||
```zsh
|
||||
plugins=(... ubuntu)
|
||||
```
|
||||
|
||||
## Aliases
|
||||
|
||||
Commands that use `$APT` will use apt if installed or defer to apt-get otherwise.
|
||||
|
||||
| Alias | Command | Description |
|
||||
|---------|------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------|
|
||||
| acs | `apt-cache search` | Search the apt-cache with the specified criteria |
|
||||
| acp | `apt-cache policy` | Display the package source priorities |
|
||||
| afs | `apt-file search --regexp` | Perform a regular expression apt-file search |
|
||||
| afu | `sudo apt-file update` | Generates or updates the apt-file package database |
|
||||
| ag | `sudo $APT` | Run apt-get with sudo |
|
||||
| aga | `sudo $APT autoclean` | Clears out the local reposityory of retrieved package files that can no longer be downloaded |
|
||||
| agb | `sudo $APT build-dep <source_pkg>` | Installs/Removes packages to satisfy the dependencies of a specified build pkg |
|
||||
| agc | `sudo $APT clean` | Clears out the local repository of retrieved package files leaving everything from the lock files |
|
||||
| agd | `sudo $APT dselect-upgrade` | Follows dselect choices for package installation |
|
||||
| agi | `sudo $APT install <pkg>` | Install the specified package |
|
||||
| agli | `apt list --installed` | List the installed packages |
|
||||
| aglu | `sudo apt-get -u upgrade --assume-no` | Run an apt-get upgrade assuming no to all prompts |
|
||||
| agp | `sudo $APT purge <pkg>` | Remove a package including any configuration files |
|
||||
| agr | `sudo $APT remove <pkg>` | Remove a package |
|
||||
| ags | `$APT source <pkg>` | Fetch the source for the specified package |
|
||||
| agu | `sudo $APT update` | Update package list |
|
||||
| agud | `sudo $APT update && sudo $APT dist-upgrade` | Update packages list and perform a distribution upgrade |
|
||||
| agug | `sudo $APT upgrade` | Upgrade available packages |
|
||||
| agar | `sudo $APT autoremove` | Remove automatically installed packages no longer needed |
|
||||
| aguu | `sudo $APT update && sudo $APT upgrade` | Update packages list and upgrade available packages |
|
||||
| allpkgs | `dpkg --get-selections \| grep -v deinstall` | Print all installed packages |
|
||||
| kclean | `sudo aptitude remove -P ?and(~i~nlinux-(ima\|hea) ?not(~n$(uname -r)))` |Remove ALL kernel images and headers EXCEPT the one in use |
|
||||
| mydeb | `time dpkg-buildpackage -rfakeroot -us -uc` | Create a basic .deb package |
|
||||
| ppap | `sudo ppa-purge <ppa>` | Remove the specified PPA |
|
||||
|
||||
|
||||
## Functions
|
||||
|
||||
| Function | Usage |Description |
|
||||
|-------------------|---------------------------------------|--------------------------------------------------------------------------|
|
||||
| aar | `aar ppa:xxxxxx/xxxxxx [packagename]` | apt-add-repository with automatic install/upgrade of the desired package |
|
||||
| apt-history | `apt-history <action>` | Prints the Apt history of the specified action |
|
||||
| apt-list-packages | `apt-list-packages` | List packages by size |
|
||||
| kerndeb | `kerndeb` | Kernel-package building shortcut |
|
||||
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
This plugin was created because the aliases in the debian plugin are inconsistent and hard to remember. Also this apt-priority detection that switched between apt-get and aptitude was dropped to keep it simpler. This plugin uses apt-get for everything but a few things that are only possible with aptitude I guess. Ubuntu does not have aptitude installed by default.
|
||||
|
||||
acs = Apt-Cache Search
|
||||
acp = Apt-Cache Policy
|
||||
|
||||
ag = sudo Apt-Get
|
||||
agi = sudo Apt-Get Install
|
||||
agd = sudo Apt-Get Dselect-upgrade
|
||||
By now you already can guess almost all aliases
|
||||
|
||||
There are two exeptions since ...
|
||||
agu = sudo Apt-Get Update - we have ...
|
||||
agug = sudo Apt-Get UpGrade - as the exceptional 4 letter alias for a single command.
|
||||
|
||||
afs = Apt-File Search --regexp - this has the regexp switch on without being represented in the alias, I guess this makes sense since the debian plugin has it, I never used that command.
|
||||
|
||||
Then there are the 2 other 4 letter aliases for combined commands, that are straight forward and easy to remember.
|
||||
aguu = sudo Apt-Get Update && sudo apt-get Upgrade - better then adg or not?
|
||||
agud = sudo Apt-Get Update && sudo apt-get full-upgrade
|
||||
|
||||
For a full list aliases and the functions just watch the plugins code https://github.com/robbyrussell/oh-my-zsh/blob/master/plugins/ubuntu/ubuntu.plugin.zsh, look at the comments if you want to switch from the debian plugin. Ubuntu, Mint and & co users will like the new aar function to install packages from ppas with a single command.
|
10
plugins/vagrant/README.md
Normal file
10
plugins/vagrant/README.md
Normal file
|
@ -0,0 +1,10 @@
|
|||
# Vagrant plugin
|
||||
|
||||
This plugin adds autocompletion for [Vagrant](https://www.vagrantup.com/) commands, task names, box names and built-in handy documentation.
|
||||
|
||||
To use it, add `vagrant` to the plugins array in your zshrc file:
|
||||
|
||||
```zsh
|
||||
plugins=(... vagrant)
|
||||
```
|
||||
|
19
plugins/vundle/README.md
Normal file
19
plugins/vundle/README.md
Normal file
|
@ -0,0 +1,19 @@
|
|||
# Vundle plugin
|
||||
|
||||
This plugin adds functions to control [vundle](https://github.com/VundleVim/Vundle.vim) plug-in manager for vim.
|
||||
|
||||
To use it, add `vundle` to the plugins array in your zshrc file:
|
||||
|
||||
```zsh
|
||||
plugins=(... vundle)
|
||||
```
|
||||
|
||||
## Functions
|
||||
|
||||
| Function | Usage | Description |
|
||||
|---------------|-----------------|----------------------------------------------------------------------------|
|
||||
| vundle-init | `vundle-init` | Install vundle by cloning git repository into ~/.vim folder |
|
||||
| vundle | `vundle` | Install plugins set in .vimrc (equals `:PluginInstall`) |
|
||||
| vundle-update | `vundle-update` | Update plugins set in .vimrc (equals `:PluginInstall!`) |
|
||||
| vundle-clean | `vundle-clean` | Delete plugins that have been removed from .vimrc (equals `:PluginClean!`) |
|
||||
|
50
plugins/web-search/README.md
Normal file
50
plugins/web-search/README.md
Normal file
|
@ -0,0 +1,50 @@
|
|||
# web-search plugin
|
||||
|
||||
This plugin adds aliases for searching with Google, Wiki, Bing, YouTube and other popular services.
|
||||
|
||||
Open your `~/.zshrc` file and enable the `web-search` plugin:
|
||||
|
||||
```zsh
|
||||
plugins=( ... web-search)
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
You can use the `web-search` plugin in these two forms:
|
||||
|
||||
* `web_search <context> <term> [more terms if you want]`
|
||||
* `<context> <term> [more terms if you want]`
|
||||
|
||||
For example, these two are equivalent:
|
||||
|
||||
```zsh
|
||||
$ web_search google oh-my-zsh
|
||||
$ google oh-my-zsh
|
||||
```
|
||||
|
||||
Available search contexts are:
|
||||
|
||||
| Context | URL |
|
||||
|-----------------------|------------------------------------------|
|
||||
| `bing` | `https://www.bing.com/search?q=` |
|
||||
| `google` | `https://www.google.com/search?q=` |
|
||||
| `yahoo` | `https://search.yahoo.com/search?p=` |
|
||||
| `ddg` or `duckduckgo` | `https://www.duckduckgo.com/?q=` |
|
||||
| `sp` or `startpage` | `https://www.startpage.com/do/search?q=` |
|
||||
| `yandex` | `https://yandex.ru/yandsearch?text=` |
|
||||
| `github` | `https://github.com/search?q=` |
|
||||
| `baidu` | `https://www.baidu.com/s?wd=` |
|
||||
| `ecosia` | `https://www.ecosia.org/search?q=` |
|
||||
| `goodreads` | `https://www.goodreads.com/search?q=` |
|
||||
| `qwant` | `https://www.qwant.com/?q=` |
|
||||
|
||||
Also there are aliases for bang-searching DuckDuckGo:
|
||||
|
||||
| Context | Bang |
|
||||
|-----------|-------|
|
||||
| `wiki` | `!w` |
|
||||
| `news` | `!n` |
|
||||
| `youtube` | `!yt` |
|
||||
| `map` | `!m` |
|
||||
| `image` | `!i` |
|
||||
| `ducky` | `!` |
|
27
plugins/yum/README.md
Normal file
27
plugins/yum/README.md
Normal file
|
@ -0,0 +1,27 @@
|
|||
# Yum plugin
|
||||
|
||||
This plugin adds useful aliases for common [Yum](http://yum.baseurl.org/) commands.
|
||||
|
||||
To use it, add `yum` to the plugins array in your zshrc file:
|
||||
|
||||
```
|
||||
plugins=(... yum)
|
||||
```
|
||||
|
||||
## Aliases
|
||||
|
||||
| Alias | Command | Description |
|
||||
|-------|-----------------------------------|------------------------------|
|
||||
| ys | `yum search` | Search package |
|
||||
| yp | `yum info` | Show package info |
|
||||
| yl | `yum list` | List packages |
|
||||
| ygl | `yum grouplist` | List package groups |
|
||||
| yli | `yum list installed` | Print all installed packages |
|
||||
| ymc | `yum makecache` | Rebuild the yum package list |
|
||||
| yu | `sudo yum update` | Upgrade packages |
|
||||
| yi | `sudo yum install` | Install package |
|
||||
| ygi | `sudo yum groupinstall` | Install package group |
|
||||
| yr | `sudo yum remove` | Remove package |
|
||||
| ygr | `sudo yum groupremove` | Remove pagage group |
|
||||
| yrl | `sudo yum remove --remove-leaves` | Remove package and leaves |
|
||||
| yc | `sudo yum clean all` | Clean yum cache |
|
|
@ -9,7 +9,7 @@ rbenv_version() {
|
|||
}
|
||||
|
||||
PROMPT='
|
||||
%{$fg_bold[green]%}${PWD/#$HOME/~}%{$reset_color%}$(git_prompt_info) ⌚ %{$fg_bold[red]%}%*%{$reset_color%}
|
||||
%{$fg_bold[green]%}%~%{$reset_color%}$(git_prompt_info) ⌚ %{$fg_bold[red]%}%*%{$reset_color%}
|
||||
$ '
|
||||
|
||||
# Must use Powerline font, for \uE0A0 to render.
|
||||
|
|
|
@ -17,7 +17,7 @@ function box_name {
|
|||
}
|
||||
|
||||
PROMPT='
|
||||
%{$fg[magenta]%}%n%{$reset_color%}@%{$fg[yellow]%}$(box_name)%{$reset_color%}:%{$fg_bold[green]%}${PWD/#$HOME/~}%{$reset_color%}$(hg_prompt_info)$(git_prompt_info)
|
||||
%{$fg[magenta]%}%n%{$reset_color%}@%{$fg[yellow]%}$(box_name)%{$reset_color%}:%{$fg_bold[green]%}%~%{$reset_color%}$(hg_prompt_info)$(git_prompt_info)
|
||||
%(?,,%{${fg_bold[white]}%}[%?]%{$reset_color%} )$ '
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX=" (%{$fg[magenta]%}branch: "
|
||||
|
|
|
@ -9,7 +9,7 @@ function virtualenv_info {
|
|||
}
|
||||
|
||||
PROMPT='
|
||||
%{$fg[magenta]%}%n%{$reset_color%} at %{$fg[yellow]%}%m%{$reset_color%} in %{$fg_bold[green]%}${PWD/#$HOME/~}%{$reset_color%}$(git_prompt_info)
|
||||
%{$fg[magenta]%}%n%{$reset_color%} at %{$fg[yellow]%}%m%{$reset_color%} in %{$fg_bold[green]%}%~%{$reset_color%}$(git_prompt_info)
|
||||
$(virtualenv_info)$(prompt_char) '
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX=" on %{$fg[magenta]%}"
|
||||
|
|
|
@ -30,11 +30,10 @@ if type rvm-prompt &>/dev/null; then
|
|||
rvm_ruby='using%{$FG[243]%}‹$(rvm-prompt i v g)›%{$reset_color%}'
|
||||
fi
|
||||
|
||||
local current_dir='${PWD/#$HOME/~}'
|
||||
local git_info='$(git_prompt_info)'
|
||||
|
||||
|
||||
PROMPT="╭─%{$FG[040]%}%n%{$reset_color%} %{$FG[239]%}at%{$reset_color%} %{$FG[033]%}$(box_name)%{$reset_color%} %{$FG[239]%}in%{$reset_color%} %{$terminfo[bold]$FG[226]%}${current_dir}%{$reset_color%}${git_info} %{$FG[239]%}${rvm_ruby} %D - %*
|
||||
PROMPT="╭─%{$FG[040]%}%n%{$reset_color%} %{$FG[239]%}at%{$reset_color%} %{$FG[033]%}$(box_name)%{$reset_color%} %{$FG[239]%}in%{$reset_color%} %{$terminfo[bold]$FG[226]%}%~%{$reset_color%}${git_info} %{$FG[239]%}${rvm_ruby} %D - %*
|
||||
╰─$(virtualenv_info)$(prompt_char) "
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX=" %{$FG[239]%}on%{$reset_color%} %{$fg[255]%}"
|
||||
|
|
|
@ -29,12 +29,11 @@ else
|
|||
fi
|
||||
fi
|
||||
|
||||
local current_dir='${PWD/#$HOME/~}'
|
||||
local git_info='$(git_prompt_info)'
|
||||
local prompt_char='$(prompt_char)'
|
||||
|
||||
|
||||
PROMPT="╭─%{$FG[040]%}%n%{$reset_color%} %{$FG[239]%}at%{$reset_color%} %{$FG[033]%}$(box_name)%{$reset_color%} %{$FG[239]%}in%{$reset_color%} %{$terminfo[bold]$FG[226]%}${current_dir}%{$reset_color%}${git_info} %{$FG[239]%}${ruby_env}
|
||||
PROMPT="╭─%{$FG[040]%}%n%{$reset_color%} %{$FG[239]%}at%{$reset_color%} %{$FG[033]%}$(box_name)%{$reset_color%} %{$FG[239]%}in%{$reset_color%} %{$terminfo[bold]$FG[226]%}%~%{$reset_color%}${git_info} %{$FG[239]%}${ruby_env}
|
||||
╰─${prompt_char}%{$reset_color%} "
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX=" %{$FG[239]%}on%{$reset_color%} %{$fg[255]%}"
|
||||
|
|
Loading…
Reference in a new issue