Unverified Commit ed401bc5 authored by Luiz Guilherme Fonseca Rosa's avatar Luiz Guilherme Fonseca Rosa Committed by GitHub
Browse files

Merge branch 'master' into master

parents c2113d7c 7b29684a
# 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 |
# Laravel # 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) plugins=(... laravel)
``` ```
......
# 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 |
# 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 |
# 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
```
# 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 |
#Aliases
alias pc="sudo port clean --all installed" alias pc="sudo port clean --all installed"
alias pi="sudo port install $1" alias pi="sudo port install"
alias psu="sudo port selfupdate" alias psu="sudo port selfupdate"
alias puni="sudo port uninstall inactive" alias puni="sudo port uninstall inactive"
alias puo="sudo port upgrade outdated" alias puo="sudo port upgrade outdated"
alias pup="psu && puo" alias pup="psu && puo"
# Mercurial # Mercurial
alias hga='hg add'
alias hgc='hg commit' alias hgc='hg commit'
alias hgb='hg branch' alias hgb='hg branch'
alias hgba='hg branches' alias hgba='hg branches'
......
...@@ -16,3 +16,4 @@ plugins=(... mix) ...@@ -16,3 +16,4 @@ plugins=(... mix)
| Phoenix v1.3.0 and above| [Phoenix](https://hexdocs.pm/phoenix/Phoenix.html) | | Phoenix v1.3.0 and above| [Phoenix](https://hexdocs.pm/phoenix/Phoenix.html) |
| Ecto | [Ecto](https://hexdocs.pm/ecto/Ecto.html) | | Ecto | [Ecto](https://hexdocs.pm/ecto/Ecto.html) |
| Hex | [Hex](https://hex.pm/) | | Hex | [Hex](https://hex.pm/) |
| Nerves | [Nerves](https://nerves-project.org/) |
...@@ -31,6 +31,9 @@ _1st_arguments=( ...@@ -31,6 +31,9 @@ _1st_arguments=(
'ecto.migrations:Displays the up / down migration status' 'ecto.migrations:Displays the up / down migration status'
'ecto.rollback:Reverts applied migrations' 'ecto.rollback:Reverts applied migrations'
'escript.build:Builds an escript for the project' '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' 'help:Print help information for tasks'
'hex:Print hex help information' 'hex:Print hex help information'
'hex.config:Read or update hex config' 'hex.config:Read or update hex config'
...@@ -48,6 +51,11 @@ _1st_arguments=( ...@@ -48,6 +51,11 @@ _1st_arguments=(
'local.phoenix:Updates Phoenix locally' 'local.phoenix:Updates Phoenix locally'
'local.phx:Updates the Phoenix project generator locally' 'local.phx:Updates the Phoenix project generator locally'
'local.rebar:Install rebar 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' 'new:Create a new Elixir project'
'phoenix.digest:Digests and compress static files' 'phoenix.digest:Digests and compress static files'
'phoenix.gen.channel:Generates a Phoenix channel' 'phoenix.gen.channel:Generates a Phoenix channel'
......
# 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)
```
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 () { _ng_completion () {
local words cword opts local words cword opts
...@@ -56,6 +56,10 @@ _ng_completion () { ...@@ -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' 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 ) v | version )
opts='--verbose' opts='--verbose'
;; ;;
......
# 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
```
# 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)
```
# 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)
```
# 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) |
# 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() { ...@@ -72,14 +72,16 @@ _swift_build() {
"--build-path[Specify build/cache directory ]:Specify build/cache directory :_files" "--build-path[Specify build/cache directory ]:Specify build/cache directory :_files"
"(--chdir -C)"{--chdir,-C}"[]: :_files" "(--chdir -C)"{--chdir,-C}"[]: :_files"
"--package-path[Change working directory before any other operation]:Change working directory before any other operation:_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[]" "--disable-prefetching[]"
"--skip-update[Skip updating dependencies from their remote during a resolution]"
"--disable-sandbox[Disable using the sandbox when executing subprocesses]" "--disable-sandbox[Disable using the sandbox when executing subprocesses]"
"--version[]" "--version[]"
"--destination[]: :_files" "--destination[]: :_files"
"(--verbose -v)"{--verbose,-v}"[Increase verbosity of informational output]" "(--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]" "--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]" "--build-tests[Build both source and test targets]"
"--product[Build the specified product]:Build the specified product: " "--product[Build the specified product]:Build the specified product: "
"--target[Build the specified target]:Build the specified target: " "--target[Build the specified target]:Build the specified target: "
...@@ -106,14 +108,16 @@ _swift_run() { ...@@ -106,14 +108,16 @@ _swift_run() {
"--build-path[Specify build/cache directory ]:Specify build/cache directory :_files" "--build-path[Specify build/cache directory ]:Specify build/cache directory :_files"
"(--chdir -C)"{--chdir,-C}"[]: :_files" "(--chdir -C)"{--chdir,-C}"[]: :_files"
"--package-path[Change working directory before any other operation]:Change working directory before any other operation:_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[]" "--disable-prefetching[]"
"--skip-update[Skip updating dependencies from their remote during a resolution]"
"--disable-sandbox[Disable using the sandbox when executing subprocesses]" "--disable-sandbox[Disable using the sandbox when executing subprocesses]"
"--version[]" "--version[]"
"--destination[]: :_files" "--destination[]: :_files"
"(--verbose -v)"{--verbose,-v}"[Increase verbosity of informational output]" "(--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]" "--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]" "--skip-build[Skip building the executable product]"
) )
_arguments $arguments && return _arguments $arguments && return
...@@ -136,14 +140,16 @@ _swift_package() { ...@@ -136,14 +140,16 @@ _swift_package() {
"--build-path[Specify build/cache directory ]:Specify build/cache directory :_files" "--build-path[Specify build/cache directory ]:Specify build/cache directory :_files"
"(--chdir -C)"{--chdir,-C}"[]: :_files" "(--chdir -C)"{--chdir,-C}"[]: :_files"
"--package-path[Change working directory before any other operation]:Change working directory before any other operation:_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[]" "--disable-prefetching[]"
"--skip-update[Skip updating dependencies from their remote during a resolution]"
"--disable-sandbox[Disable using the sandbox when executing subprocesses]" "--disable-sandbox[Disable using the sandbox when executing subprocesses]"
"--version[]" "--version[]"
"--destination[]: :_files" "--destination[]: :_files"
"(--verbose -v)"{--verbose,-v}"[Increase verbosity of informational output]" "(--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]" "--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' '(-): :->command'
'(-)*:: :->arg' '(-)*:: :->arg'
) )
...@@ -152,135 +158,133 @@ _swift_package() { ...@@ -152,135 +158,133 @@ _swift_package() {
(command) (command)
local modes local modes
modes=( modes=(
'edit:Put a package in editable mode'
'clean:Delete build artifacts'
'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' 'update:Update package dependencies'
'show-dependencies:Print the resolved dependency graph'
'resolve:Resolve package dependencies'
'fetch:'
'completion-tool:Completion tool (for shell completions)' 'completion-tool:Completion tool (for shell completions)'
'edit:Put a package in editable mode'
'tools-version:Manipulate tools version of the current package' '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' 'reset:Reset the complete cache/build directory'
'unedit:Remove a package from editable mode' 'resolve:Resolve package dependencies'
'generate-xcodeproj:Generates an Xcode project' 'generate-xcodeproj:Generates an Xcode project'
'init:Initialize a new package' 'fetch:'
'dump-package:Print parsed Package.swift as JSON' 'show-dependencies:Print the resolved dependency graph'
) )
_describe "mode" modes _describe "mode" modes
;; ;;
(arg) (arg)
case ${words[1]} in case ${words[1]} in
(update) (edit)
_swift_package_update _swift_package_edit
;; ;;
(show-dependencies) (clean)
_swift_package_show-dependencies _swift_package_clean
;; ;;
(resolve) (init)
_swift_package_resolve _swift_package_init
;; ;;
(fetch) (dump-package)
_swift_package_fetch _swift_package_dump-package
;;
(describe)
_swift_package_describe
;;
(unedit)
_swift_package_unedit
;;
(update)
_swift_package_update
;; ;;
(completion-tool) (completion-tool)
_swift_package_completion-tool _swift_package_completion-tool
;; ;;
(edit)
_swift_package_edit
;;
(tools-version) (tools-version)
_swift_package_tools-version _swift_package_tools-version
;; ;;
(describe)
_swift_package_describe
;;
(clean)
_swift_package_clean
;;
(reset) (reset)
_swift_package_reset _swift_package_reset
;; ;;
(unedit) (resolve)
_swift_package_unedit _swift_package_resolve
;; ;;
(generate-xcodeproj) (generate-xcodeproj)
_swift_package_generate-xcodeproj _swift_package_generate-xcodeproj
;; ;;
(init) (fetch)
_swift_package_init _swift_package_fetch
;; ;;
(dump-package) (show-dependencies)
_swift_package_dump-package _swift_package_show-dependencies
;; ;;
esac esac
;; ;;
esac esac
} }
_swift_package_update() { _swift_package_edit() {
arguments=( 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 _arguments $arguments && return
} }
_swift_package_show-dependencies() { _swift_package_clean() {
arguments=( 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 _arguments $arguments && return
} }
_swift_package_resolve() { _swift_package_init() {
arguments=( arguments=(
":The name of the package to resolve:_swift_dependency" "--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]'}"
"--version[The version to resolve at]:The version to resolve at: "
"--branch[The branch to resolve at]:The branch to resolve at: "
"--revision[The revision to resolve at]:The revision to resolve at: "
) )
_arguments $arguments && return _arguments $arguments && return
} }
_swift_package_fetch() { _swift_package_dump-package() {
arguments=( arguments=(
) )
_arguments $arguments && return _arguments $arguments && return
} }
_swift_package_completion-tool() { _swift_package_describe() {
arguments=( 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]'}" "--type[json|text]: :{_values '' 'text[describe using text format]' 'json[describe using JSON format]'}"
) )
_arguments $arguments && return _arguments $arguments && return
} }
_swift_package_edit() { _swift_package_unedit() {
arguments=( arguments=(
":The name of the package to edit:_swift_dependency" ":The name of the package to unedit:_swift_dependency"
"--revision[The revision to edit]:The revision to edit: " "--force[Unedit the package even if it has uncommited and unpushed changes.]"
"--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 _arguments $arguments && return
} }
_swift_package_tools-version() { _swift_package_update() {
arguments=( 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 _arguments $arguments && return
} }
_swift_package_describe() { _swift_package_completion-tool() {
arguments=( arguments=(
"--type[json|text]: :{_values '' 'text[describe using text format]' 'json[describe using JSON format]'}" ": :{_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 _arguments $arguments && return
} }
_swift_package_clean() { _swift_package_tools-version() {
arguments=( 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 _arguments $arguments && return
} }
...@@ -291,10 +295,12 @@ _swift_package_reset() { ...@@ -291,10 +295,12 @@ _swift_package_reset() {
_arguments $arguments && return _arguments $arguments && return
} }
_swift_package_unedit() { _swift_package_resolve() {
arguments=( arguments=(
":The name of the package to unedit:_swift_dependency" ":The name of the package to resolve:_swift_dependency"
"--force[Unedit the package even if it has uncommited and unpushed changes.]" "--version[The version to resolve at]:The version to resolve at: "
"--branch[The branch to resolve at]:The branch to resolve at: "
"--revision[The revision to resolve at]:The revision to resolve at: "
) )
_arguments $arguments && return _arguments $arguments && return
} }
...@@ -304,19 +310,21 @@ _swift_package_generate-xcodeproj() { ...@@ -304,19 +310,21 @@ _swift_package_generate-xcodeproj() {
"--xcconfig-overrides[Path to xcconfig file]:Path to xcconfig file:_files" "--xcconfig-overrides[Path to xcconfig file]:Path to xcconfig file:_files"
"--enable-code-coverage[Enable code coverage in the generated project]" "--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" "--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 _arguments $arguments && return
} }
_swift_package_init() { _swift_package_fetch() {
arguments=( 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 _arguments $arguments && return
} }
_swift_package_dump-package() { _swift_package_show-dependencies() {
arguments=( 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 _arguments $arguments && return
} }
...@@ -338,19 +346,22 @@ _swift_test() { ...@@ -338,19 +346,22 @@ _swift_test() {
"--build-path[Specify build/cache directory ]:Specify build/cache directory :_files" "--build-path[Specify build/cache directory ]:Specify build/cache directory :_files"
"(--chdir -C)"{--chdir,-C}"[]: :_files" "(--chdir -C)"{--chdir,-C}"[]: :_files"
"--package-path[Change working directory before any other operation]:Change working directory before any other operation:_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[]" "--disable-prefetching[]"
"--skip-update[Skip updating dependencies from their remote during a resolution]"
"--disable-sandbox[Disable using the sandbox when executing subprocesses]" "--disable-sandbox[Disable using the sandbox when executing subprocesses]"
"--version[]" "--version[]"
"--destination[]: :_files" "--destination[]: :_files"
"(--verbose -v)"{--verbose,-v}"[Increase verbosity of informational output]" "(--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]" "--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]" "--skip-build[Skip building the test target]"
"(--list-tests -l)"{--list-tests,-l}"[Lists test methods in specifier format]" "(--list-tests -l)"{--list-tests,-l}"[Lists test methods in specifier format]"
"--generate-linuxmain[Generate LinuxMain.swift entries for the package]" "--generate-linuxmain[Generate LinuxMain.swift entries for the package]"
"--parallel[Run the tests in parallel.]" "--parallel[Run the tests in parallel.]"
"(--specifier -s)"{--specifier,-s}"[]: : " "(--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>: " "--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 _arguments $arguments && return
......
# 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`.
function tf_prompt_info() { function tf_prompt_info() {
# dont show 'default' workspace in home dir
[[ "$PWD" == ~ ]] && return
# check if in terraform dir # check if in terraform dir
if [ -d .terraform ]; then if [ -d .terraform ]; then
workspace=$(terraform workspace show 2> /dev/null) || return workspace=$(terraform workspace show 2> /dev/null) || return
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment