Unverified Commit 8c95c523 authored by Kozlov Alexander's avatar Kozlov Alexander Committed by GitHub
Browse files

Merge branch 'master' into master

parents dd30cf10 3d8f2bda
# LOL!!1
# Source: http://aur.archlinux.org/packages/lolbash/lolbash/lolbash.sh
# Source: https://aur.archlinux.org/packages/lolbash/lolbash/lolbash.sh
alias wtf='dmesg'
alias onoz='cat /var/log/errors.log'
......@@ -45,6 +45,7 @@ alias bringz='git pull'
alias chicken='git add'
alias oanward='git commit -m'
alias ooanward='git commit -am'
alias yolo='git commit -m "$(curl -s https://whatthecommit.com/index.txt)"'
alias letcat='git checkout'
alias violenz='git rebase'
# 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 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"
## Magic Enter
**Maintainer:** [@dufferzafar](https://github.com/dufferzafar)
Makes your enter key magical, by binding commonly used commands to it.
You can set the commands to be run in your .zshrc, before the line containing plugins!
```bash
MAGIC_ENTER_GIT_COMMAND='git status -u .'
MAGIC_ENTER_OTHER_COMMAND='ls -lh .'
plugins=(magic-enter)
```
# Bind quick stuff to enter!
#
# Pressing enter in a git directory runs `git status`
# in other directories `ls`
magic-enter () {
# If commands are not already set, use the defaults
[ -z "$MAGIC_ENTER_GIT_COMMAND" ] && MAGIC_ENTER_GIT_COMMAND="git status -u ."
[ -z "$MAGIC_ENTER_OTHER_COMMAND" ] && MAGIC_ENTER_OTHER_COMMAND="ls -lh ."
if [[ -z $BUFFER ]]; then
echo ""
if git rev-parse --is-inside-work-tree &>/dev/null; then
eval "$MAGIC_ENTER_GIT_COMMAND"
else
eval "$MAGIC_ENTER_OTHER_COMMAND"
fi
zle redisplay
else
zle accept-line
fi
}
zle -N magic-enter
bindkey "^M" magic-enter
# Man plugin
This plugin adds a shortcut to insert man before the previous command.
To use it, add `man` to the plugins array in your zshrc file:
```zsh
plugins=(... man)
```
# Keyboard Shortcuts
| Shortcut | Description |
|-----------------------------------|------------------------------------------------------------------------|
| <kbd>Esc</kbd> + man | add man before the previous command to see the manual for this command |
......@@ -5,7 +5,7 @@
# * Jerry Ling<jerryling315@gmail.com>
#
# ------------------------------------------------------------------------------
# Usgae
# Usage
# -----
#
# man will be inserted before the command
......
# Mercurial
alias hga='hg add'
alias hgc='hg commit'
alias hgb='hg branch'
alias hgba='hg branches'
......
......@@ -13,19 +13,38 @@ _meteor_installed_packages() {
local -a _1st_arguments
_1st_arguments=(
'run:[Default] Run this project in local development mode'
'create:Create a new project'
'update:Upgrade this project to the latest version of Meteor'
'add:Add a package to this project'
'remove:Remove a package from this project'
'list:List available packages'
'help:Display Meteor help'
'bundle:Pack this project up into a tarball'
'mongo:Connect to the Mongo database for the specified site'
'deploy:Deploy this project to Meteor'
'logs:Show logs for specified site'
'reset:Reset the project state. Erases the local database.'
'test-packages:Test one or more packages'
"add-platform:Add a platform to this project."
"add:Add a package to this project."
"admin:Administrative commands."
"authorized:View or change authorized users and organizations for a site."
"build:Build this project for all platforms."
"claim:Claim a site deployed with an old Meteor version."
"configure-android:Run the Android configuration tool from Meteor's ADK environment."
"create:Create a new project."
"debug:Run the project, but suspend the server process for debugging."
"deploy:Deploy this project to Meteor."
"install-sdk:Installs SDKs for a platform."
"lint:Build this project and run the linters printing all errors and warnings."
"list-platforms:List the platforms added to your project."
"list-sites:List sites for which you are authorized."
"list:List the packages explicitly used by your project."
"login:Log in to your Meteor developer account."
"logout:Log out of your Meteor developer account."
"logs:Show logs for specified site."
"mongo:Connect to the Mongo database for the specified site."
"publish-for-arch:Builds an already-published package for a new platform."
"publish-release:Publish a new meteor release to the package server."
"publish:Publish a new version of a package to the package server."
"remove-platform:Remove a platform from this project."
"remove:Remove a package from this project."
"reset:Reset the project state. Erases the local database."
"run:[default] Run this project in local development mode."
"search:Search through the package server database."
"shell:Launch a Node REPL for interactively evaluating server-side code."
"show:Show detailed information about a release or package."
"test-packages:Test one or more packages."
"update:Upgrade this project's dependencies to their latest versions."
"whoami:Prints the username of your Meteor developer account."
)
local expl
......
# minikube
This plugin provides completion for [minikube](https://github.com/kubernetes/minikube).
To use it, add `minikube` to the plugins array in your zshrc file.
```
plugins=(... minikube)
```
# Autocompletion for Minikube.
#
if [ $commands[minikube] ]; then
source <(minikube completion zsh)
fi
......@@ -8,7 +8,7 @@ to update cache you should remove .mix_tasks file
Inspired by and based on rake-fast zsh plugin.
This is entirely based on [this pull request by Ullrich Schäfer](https://github.com/robb/.dotfiles/pull/10/), which is inspired by [this Ruby on Rails trick from 2006](http://weblog.rubyonrails.org/2006/3/9/fast-mix-task-completion-for-zsh/).
This is entirely based on [this pull request by Ullrich Schäfer](https://github.com/robb/.dotfiles/pull/10/), which is inspired by [this Ruby on Rails trick from 2006](https://weblog.rubyonrails.org/2006/3/9/fast-rake-task-completion-for-zsh/).
## Installation
......
......@@ -12,7 +12,7 @@ _mix_does_task_list_need_generating () {
}
_mix_generate () {
mix --help | grep -v 'iex -S' | tail -n +2 | cut -d " " -f 2 > .mix_tasks
mix help | grep -v 'iex -S' | tail -n +2 | cut -d " " -f 2 > .mix_tasks
}
_mix () {
......
# Mix plugin
This plugin adds completions for the [Elixir's Mix build tool](https://hexdocs.pm/mix/Mix.html).
To use it, add `mix` to the plugins array in your zshrc file:
```zsh
plugins=(... mix)
```
## Supported Task Types
| Task Type | Documentation |
|-------------------------|----------------------------------------------------------|
| Elixir | [Elixir Lang](https://elixir-lang.org/) |
| Phoenix v1.2.1 and below| [Phoenix](https://hexdocs.pm/phoenix/1.2.1/Phoenix.html) |
| 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/) |
......@@ -21,7 +21,19 @@ _1st_arguments=(
'deps.unlock:Unlock the given dependencies'
'deps.update:Update the given dependencies'
'do:Executes the tasks separated by comma'
'ecto.create:Create Ecto database'
'ecto.drop:Drop the storage for the given repository'
'ecto.dump:Dumps the current environment’s database structure'
'ecto.gen.migration:Generates a migration'
'ecto.gen.repo:Generates a new repository'
'ecto.load:Loads the current environment’s database structure'
'ecto.migrate:Runs Ecto migration'
'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'
......@@ -39,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'
......
# 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)
```
......@@ -20,6 +20,15 @@ BACKGROUND_CYAN=$(tput setab 6)
BACKGROUND_WHITE=$(tput setab 7)
RESET_FORMATTING=$(tput sgr0)
# if found an executable ./mvnw file execute it otherwise execute orignal mvn
mvn-or-mvnw() {
if [ -x ./mvnw ] ; then
echo "executing mvnw instead of mvn"
./mvnw "$@";
else
mvn "$@";
fi
}
# Wrapper function for Maven's mvn command.
mvn-color() {
......@@ -40,6 +49,9 @@ mvn-color() {
# Override the mvn command with the colorized one.
#alias mvn="mvn-color"
# either use orignal mvn oder the mvn wrapper
alias mvn="mvn-or-mvnw"
# aliases
alias mvncie='mvn clean install eclipse:eclipse'
alias mvnci='mvn clean install'
......@@ -59,11 +71,13 @@ alias mvn-updates='mvn versions:display-dependency-updates'
alias mvntc7='mvn tomcat7:run'
alias mvntc='mvn tomcat:run'
alias mvnjetty='mvn jetty:run'
alias mvnboot='mvn spring-boot:run'
alias mvndt='mvn dependency:tree'
alias mvns='mvn site'
alias mvnsrc='mvn dependency:sources'
alias mvndocs='mvn dependency:resolve -Dclassifier=javadoc'
function listMavenCompletions {
reply=(
# common lifecycle
......@@ -274,3 +288,5 @@ function listMavenCompletions {
}
compctl -K listMavenCompletions mvn
compctl -K listMavenCompletions mvn-or-mvnw
File mode changed from 100755 to 100644
# Nanoc plugin
This plugin adds some aliases and autocompletion for common [Nanoc](https://nanoc.ws) commands.
To use it, add `nanoc` to the plugins array in your zshrc file:
```zsh
plugins=(... nanoc)
```
## Aliases
| Alias | Command | Description |
|-------|-----------------------|-----------------------------------------------------------------------------------|
| n | `nanoc` | Main Nanoc command |
| nco | `nanoc compile` | Compile all items of the current site |
| ncs | `nanoc create-site` | Create a new site at the given path. The site will use the filesystem data source |
| nd | `nanoc deploy` | Deploy the compiled site to the destination (specified with `--target`) |
| np | `nanoc prune` | Remove files not managed by Nanoc from the output directory |
| nv | `nanoc view` | Start the static web server (on port 3000 and all IP addresses, unless specified) |
#compdef nanoc
#autoload
# nanoc zsh completion - based on the homebrew zsh completion
# requires the 'nanoc' gem to be installed
local -a _1st_arguments
_1st_arguments=(
'autocompile:start the autocompiler'
'check:run issue checks'
'compile:compile items of this site'
'create-item:create an item'
'create-layout:create a layout'
'create-site:create a site'
'deploy:deploy the compiled site'
'help:show help'
'prune:remove files not managed by nanoc from the output directory'
'shell:open a shell on the Nanoc environment'
'show-data:show data in this site'
'show-plugins:show all available plugins'
'show-rules:describe the rules for each item'
'update:update the data stored by the data source to a newer version'
'validate-css:validate the site’s CSS'
'validate-html:validate the site’s HTML'
'validate-links:validate links in site'
'view:start the web server that serves static files'
'watch:start the watcher'
)
local expl
......@@ -31,13 +24,68 @@ local -a pkgs installed_pkgs
_arguments \
'(--color)--color[enable color]' \
'(--debug)--debug[enable debugging]' \
'(--env)--env[set environment]' \
'(--help)--help[show the help message and quit]' \
'(--no-color)--no-color[disable color]' \
'(--verbose)--verbose[make nanoc output more detailed]' \
'(--verbose)--verbose[make output more detailed]' \
'(--version)--version[show version information and quit]' \
'(--warn)--warn[enable warnings]' \
'*:: :->subcmds' && return 0
case "$state" in
subcmds)
case $words[1] in
check)
_arguments \
'(--preprocess)--preprocess[run preprocessor]'
;;
compile)
_arguments \
'(--diff)--diff[generate diff]'
;;
compile)
_arguments \
'(--diff)--diff[generate diff]'
;;
create-site)
_arguments \
'(--force)--force[force creation of new site]'
;;
deploy)
_arguments \
'(--target)--target[specify the location to deploy to (default: `default`)]' \
'(--no-check)--no-check[do not run the issue checks marked for deployment]' \
'(--list)--list[list available locations to deploy to]' \
'(--list-deployers)--list-deployers[list available deployers]' \
'(--dry-run)--dry-run[show what would be deployed]'
;;
prune)
_arguments \
'(--yes)--yes[confirm deletion]' \
'(--dry-run)--dry-run[print files to be deleted instead of actually deleting them]'
;;
shell)
_arguments \
'(--preprocess)--preprocess[run preprocessor]'
;;
view)
_arguments \
'(--handler)--handler[specify the handler to use (webrick/mongrel/...)]' \
'(--host)--host[specify the host to listen on (default: 127.0.0.1)]' \
'(--port)--port[specify the port to listen on (default: 3000]' \
'(--live-reload)--live-reload[reload on changes]'
;;
esac
;;
esac
if (( CURRENT == 1 )); then
_describe -t commands "nanoc subcommand" _1st_arguments
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