Commit e4fdb083 authored by Andrew Janke's avatar Andrew Janke
Browse files

Merge branch 'master' into copyfile-portability

parents 5c8b0cc0 b05ef103
#compdef codeclimate
_codeclimate_all_engines() {
engines_all=(`codeclimate engines:list | tail -n +2 | gawk '{ print $2 }' | gawk -F: '{ print $1 }'`)
}
_codeclimate_installed_engines() {
_codeclimate_all_engines
engines_installed=()
if [ -e .codeclimate.yml ]
then
for engine in $engines_all
do
if grep -q $engine ".codeclimate.yml"
then
engines_installed+=$engine
fi
done
fi
}
_codeclimate_not_installed_engines() {
_codeclimate_all_engines
engines_not_installed=()
if [ -e .codeclimate.yml ]
then
for engine in $engines_all
do
if ! grep -q $engine ".codeclimate.yml"
then
engines_not_installed+=$engine
fi
done
fi
}
local curcontext="$curcontext" state line ret=1
local expl
local -a engines_all engines_installed engines_not_installed
_arguments \
'1: :->cmds' \
'*:: :->args' && ret=0
case $state in
cmds)
_values "bundle command" \
"analyze[Analyze all relevant files in the current working directory]" \
"console[Start an interactive session providing access to the classes within the CLI]" \
"engines\:disable[Prevents the engine from being used in this project]" \
"engines\:enable[This engine will be run the next time your project is analyzed]" \
"engines\:install[Compares the list of engines in your .codeclimate.yml file to those that are currently installed, then installs any missing engines]" \
"engines\:list[Lists all available engines in the Code Climate Docker Hub]" \
"engines\:remove[Removes an engine from your .codeclimate.yml file]" \
"help[Displays a list of commands that can be passed to the Code Climate CLI]" \
"init[Generates a new .codeclimate.yml file in the current working directory]" \
"validate-config[Validates the .codeclimate.yml file in the current working directory]" \
"version[Displays the current version of the Code Climate CLI]"
ret=0
;;
args)
case $line[1] in
engines:enable)
_codeclimate_not_installed_engines
_wanted engines_not_installed expl 'not installed engines' compadd -a engines_not_installed ;;
engines:disable|engines:remove)
_codeclimate_installed_engines
_wanted engines_installed expl 'installed engines' compadd -a engines_installed ;;
analyze)
_arguments \
'-f:Output Format:(text json)'
ret=0
;;
esac
;;
esac
return ret
......@@ -2,11 +2,11 @@
# compile a string of coffeescript and print to output
cf () {
coffee -peb $1
coffee -peb "$1"
}
# compile & copy to clipboard
cfc () {
cf $1 | clipcopy
cf "$1" | clipcopy
}
# compile from clipboard & print
......
......@@ -27,7 +27,7 @@ __docker_all_containers() {
# output a selectable list of all docker images
__docker_images() {
declare -a img_cmd
img_cmd=($(docker images | awk 'NR>1{print $1}'))
img_cmd=($(docker images | awk 'NR>1{print $1}'| sed 's/:/\\:/g'))
_describe 'images' img_cmd
}
......
# Ember-cli
# Ember CLI
**Maintainer:** [BilalBudhani](http://www.github.com/BilalBudhani)
**Maintainers:** [BilalBudhani](http://www.github.com/BilalBudhani), [eubenesa](http://www.github.com/eubenesa)
Ember-cli (http://www.ember-cli.com/)
Ember CLI (http://www.ember-cli.com/)
### List of Aliases
alias es='ember serve'
alias ea='ember addon'
alias eb='ember build'
alias ed='ember destroy'
alias eg='ember generate'
alias eh='ember help'
alias ein='ember init'
alias eia='ember install:addon'
alias eib='ember install:bower'
alias ein='ember install:npm'
alias ei='ember install'
alias et='ember test'
alias eu='ember update'
alias ev='ember version'
alias es='ember serve'
alias ea='ember addon'
alias eb='ember build'
alias ed='ember destroy'
alias eg='ember generate'
alias eh='ember help'
alias ein='ember init'
alias ei='ember install'
alias et='ember test'
alias eu='ember update'
alias ev='ember version'
# Ember ClI
# visit http://www.ember-cli.com/ to view user guid
# Ember CLI
# Visit http://www.ember-cli.com/ to view user guide
alias es='ember serve'
alias ea='ember addon'
......@@ -8,9 +8,6 @@ alias ed='ember destroy'
alias eg='ember generate'
alias eh='ember help'
alias ein='ember init'
alias eia='ember install:addon'
alias eib='ember install:bower'
alias ein='ember install:npm'
alias ei='ember install'
alias et='ember test'
alias eu='ember update'
......
......@@ -7,8 +7,12 @@
# $emoji - which maps character names to Unicode characters
# $emoji_flags - maps country names to Unicode flag characters using region indicators
# Main emoji
typeset -gAH emoji
# National flags
typeset -gAH emoji_flags
# Combining modifiers
typeset -gAH emoji_mod
emoji[copyright_sign]=$'\U00A9'
emoji[registered_sign]=$'\U00AE'
......@@ -448,10 +452,15 @@ emoji[badminton_racquet_and_shuttlecock]=$'\U1F3F8'
emoji[bow_and_arrow]=$'\U1F3F9'
emoji[amphora]=$'\U1F3FA'
emoji[emoji_modifier_fitzpatrick_type_1_2]=$'\U1F3FB'
emoji_mod[emoji_modifier_fitzpatrick_type_1_2]=$'\U1F3FB'
emoji[emoji_modifier_fitzpatrick_type_3]=$'\U1F3FC'
emoji_mod[emoji_modifier_fitzpatrick_type_3]=$'\U1F3FC'
emoji[emoji_modifier_fitzpatrick_type_4]=$'\U1F3FD'
emoji_mod[emoji_modifier_fitzpatrick_type_4]=$'\U1F3FD'
emoji[emoji_modifier_fitzpatrick_type_5]=$'\U1F3FE'
emoji_mod[emoji_modifier_fitzpatrick_type_5]=$'\U1F3FE'
emoji[emoji_modifier_fitzpatrick_type_6]=$'\U1F3FF'
emoji_mod[emoji_modifier_fitzpatrick_type_6]=$'\U1F3FF'
emoji[rat]=$'\U1F400'
emoji[mouse]=$'\U1F401'
emoji[ox]=$'\U1F402'
......
......@@ -76,8 +76,6 @@ emoji_skintone[6]=$'\U1F3FF'
# These are stored in a single associative array, $emoji_groups, to avoid cluttering up the global
# namespace, and to allow adding additional group definitions at run time.
# The keys are the group names, and the values are whitespace-separated lists of emoji character names.
#
# These extra local arrays are used to allow more convenient formatting of the source code.
emoji_groups[fruits]="
tomato
......@@ -255,9 +253,10 @@ function random_emoji() {
if [[ -z "$group" || "$group" == "all" ]]; then
names=(${(k)emoji})
else
names=(${=emoji_groups[$group_name]})
names=(${=emoji_groups[$group]})
fi
local list_size=$#names
local list_size=${#names}
[[ $list_size -eq 0 ]] && return 1
local random_index=$(( ( RANDOM % $list_size ) + 1 ))
local name=${names[$random_index]}
echo ${emoji[$name]}
......
......@@ -88,7 +88,7 @@ typeset -gAH emoji_mod
}
# Modifiers are included in both the main set and their separate map,
# because they have a standalone representation as a color swatch.
if ( $modifier_status == "modifier" ) {
if ( $modifier_status eq "modifier" ) {
$outfh->print("emoji_mod[$omz_name]=\$'$zsh_code'\n");
}
} else {
......
# ------------------------------------------------------------------------------
# FILE: emotty.plugin.zsh
# DESCRIPTION: Return an emoji for the current $TTY number.
# AUTHOR: Alexis Hildebrandt (afh[at]surryhill.net)
# VERSION: 1.0.0
# DEPENDS: emoji plugin
#
# There are different sets of emoji characters available, to choose a different
# set export emotty_set to the name of the set you would like to use, e.g.:
# % export emotty_set=nature
# ------------------------------------------------------------------------------
typeset -gAH _emotty_sets
local _emotty_plugin_dir="${0:h}"
source "$_emotty_plugin_dir/emotty_stellar_set.zsh"
source "$_emotty_plugin_dir/emotty_floral_set.zsh"
source "$_emotty_plugin_dir/emotty_zodiac_set.zsh"
source "$_emotty_plugin_dir/emotty_nature_set.zsh"
source "$_emotty_plugin_dir/emotty_emoji_set.zsh"
source "$_emotty_plugin_dir/emotty_love_set.zsh"
unset _emotty_plugin_dir
emotty_default_set=emoji
function emotty() {
# Use emotty set defined by user, fallback to default
local emotty=${_emotty_sets[${emotty_set:-$emotty_default_set}]}
# Parse $TTY number, normalizing it to an emotty set index
(( tty = (${TTY##/dev/ttys} % ${#${=emotty}}) + 1 ))
local character_name=${${=emotty}[tty]}
echo "${emoji[${character_name}]}${emoji2[emoji_style]}"
}
function display_emotty() {
local name=$1
for i in ${=_emotty_sets[$name]}; do
printf "${emoji[$i]}${emoji2[emoji_style]} "
done
print
for i in ${=_emotty_sets[$name]}; do
print "${emoji[$i]}${emoji2[emoji_style]} = $i"
done
}
#!/usr/bin/env zsh
# vim:ft=zsh ts=2 sw=2 sts=2
_emotty_sets[emoji]="
crystal_ball
ghost
jack_o_lantern
see_no_evil_monkey
hear_no_evil_monkey
speak_no_evil_monkey
smiling_cat_face_with_open_mouth
extraterrestrial_alien
rocket
billiards
bomb
pill
japanese_symbol_for_beginner
direct_hit
cyclone
diamond_shape_with_a_dot_inside
sparkle
eight_spoked_asterisk
eight_pointed_black_star
"
#!/usr/bin/env zsh
# vim:ft=zsh ts=2 sw=2 sts=2
_emotty_sets[floral]="
hibiscus
cherry_blossom
blossom
sunflower
bouquet
tulip
rose
four_leaf_clover
seedling
herb
palm_tree
evergreen_tree
deciduous_tree
"
#!/usr/bin/env zsh
# vim:ft=zsh ts=2 sw=2 sts=2
# Note: The heavy_black_heart emoji requires $emoji2[emoji_style]
# to be rendered as the emoji red heart.
_emotty_sets[love]="
green_heart
blue_heart
purple_heart
yellow_heart
heavy_black_heart
broken_heart
heart_with_arrow
heart_with_ribbon
sparkling_heart
two_hearts
revolving_hearts
growing_heart
beating_heart
heart_decoration
couple_with_heart
kiss
man_and_woman_holding_hands
two_women_holding_hands
two_men_holding_hands
kiss_mark
smiling_face_with_heart_shaped_eyes
kissing_face
face_throwing_a_kiss
kissing_face_with_smiling_eyes
kissing_face_with_closed_eyes
smiling_cat_face_with_heart_shaped_eyes
kissing_cat_face_with_closed_eyes
"
#!/usr/bin/env zsh
# vim:ft=zsh ts=2 sw=2 sts=2
_emotty_sets[nature]="
mouse_face
hamster_face
rabbit_face
dog_face
cat_face
tiger_face
bear_face
monkey_face
koala
panda_face
chicken
baby_chick
bird
penguin
cow_face
pig_face
frog_face
boar
wolf_face
horse_face
snail
bug
ant
honeybee
lady_beetle
spouting_whale
dolphin
octopus
fish
tropical_fish
snake
turtle
lemon
tangerine
peach
mushroom
tomato
strawberry
red_apple
cherries
grapes
aubergine
watermelon
banana
pineapple
melon
pear
green_apple
ear_of_maize
sunflower
seedling
herb
four_leaf_clover
"
#!/usr/bin/env zsh
# vim:ft=zsh ts=2 sw=2 sts=2
# NOTE: The following emoji show as $'character' in the title
# white_medium_star
# sparkles
# dizzy_symbol
_emotty_sets[stellar]="
full_moon_symbol
waning_gibbous_moon_symbol
waning_crescent_moon_symbol
last_quarter_moon_symbol
new_moon_symbol
new_moon_with_face
waxing_crescent_moon_symbol
first_quarter_moon_symbol
waxing_gibbous_moon_symbol
full_moon_with_face
sun_with_face
glowing_star
crescent_moon
first_quarter_moon_with_face
last_quarter_moon_with_face
"
#!/usr/bin/env zsh
# vim:ft=zsh ts=2 sw=2 sts=2
_emotty_sets[zodiac]="
aries
taurus
gemini
cancer
leo
virgo
libra
scorpius
sagittarius
capricorn
aquarius
pisces
rat
ox
tiger
rabbit
dragon
snake
horse
goat
monkey
rooster
dog
pig
"
# Use Ctrl-Z to switch back to Vim
I frequently need to execute random command in my shell. To achieve it I pause
Vim by pressing Ctrl-z, type command and press fg<Enter> to switch back to Vim.
The fg part really hurt sme. I just wanted to hit Ctrl-z once again to get back
to Vim. I could not find a solution, so I developed one on my own that
works wonderfully with ZSH
Source: http://sheerun.net/2014/03/21/how-to-boost-your-vim-productivity/
Credits:
- original idea by @sheerun
- added to OMZ by @mbologna
fancy-ctrl-z () {
if [[ $#BUFFER -eq 0 ]]; then
BUFFER="fg"
zle accept-line
else
zle push-input
zle clear-screen
fi
}
zle -N fancy-ctrl-z
bindkey '^Z' fancy-ctrl-z
This is a plugin based on yum plugin, but using dnf as main frontend
(from Fedora 22 onwards, yum is deprecated in favor of dnf).
## Aliases
alias dnfs="dnf search" # search package
alias dnfp="dnf info" # show package info
alias dnfl="dnf list" # list packages
alias dnfgl="dnf grouplist" # list package groups
alias dnfli="dnf list installed" # print all installed packages
alias dnfmc="dnf makecache" # rebuilds the dnf package list
alias dnfu="sudo dnf upgrade" # upgrade packages
alias dnfi="sudo dnf install" # install package
alias dnfgi="sudo dnf groupinstall" # install package group
alias dnfr="sudo dnf remove" # remove package
alias dnfgr="sudo dnf groupremove" # remove pagage group
alias dnfrl="sudo dnf remove --remove-leaves" # remove package and leaves
alias dnfc="sudo dnf clean all" # clean cache
## Rationale ##
## Introduction ##
> Searches for your Frontend contents more easier
> Searches for your frontend web development made easier
## Instalation ##
## Installation ##
Open your `~/.zshrc` file and enable the `frontend-search` plugin:
Open your `.zshrc` file and load `frontend-search` plugin
```zsh
plugins=( ... frontend-search)
```bash
...
plugins=( <your-plugins-list>... frontend-search)
...
```
## Commands ##
All command searches are accept only in format
* `frontend <search-content> <search-term>`
The search content are
* `jquery <api.jquery.com>`
* `mdn <developer.mozilla.org>`
* `compass <compass-style.org>`
* `html5please <html5please.com>`
* `caniuse <caniuse.com>`
* `aurajs <aurajs.com>`
* `dartlang <api.dartlang.org/apidocs/channels/stable/dartdoc-viewer>`
* `lodash <search>`
* `qunit <api.qunitjs.com>`
* `fontello <fontello.com>`
* `bootsnipp <bootsnipp.com>`
* `cssflow <cssflow.com>`
* `codepen <codepen.io>`
* `unheap <www.unheap.com>`
* `bem <google.com/search?as_q=<search-term>&as_sitesearch=bem.info>`
* `smacss <google.com/search?as_q=<search-term>&as_sitesearch=smacss.com>`
* `angularjs <google.com/search?as_q=<search-term>&as_sitesearch=angularjs.org>`
* `reactjs <google.com/search?as_q=<search-term>&as_sitesearch=facebook.github.io/react>`
* `emberjs <emberjs.com>`
* `stackoverflow <stackoverflow.com>`
## Aliases ##
There are a few aliases presented as well:
* `jquery` A shorthand for `frontend jquery`
* `mdn` A shorthand for `frontend mdn`
* `compass` A shorthand for `frontend compass`
* `html5please` A shorthand for `frontend html5please`
* `caniuse` A shorthand for `frontend caniuse`
* `aurajs` A shorthand for `frontend aurajs`
* `dartlang` A shorthand for `frontend dartlang`
* `lodash` A shorthand for `frontend lodash`
* `qunit` A shorthand for `frontend qunit`
* `fontello` A shorthand for `frontend fontello`
* `bootsnipp` A shorthand for `frontend bootsnipp`
* `cssflow` A shorthand for `frontend cssflow`
* `codepen` A shorthand for `frontend codepen`
* `unheap` A shorthand for `frontend unheap`
* `bem` A shorthand for `frontend bem`
* `smacss` A shorthand for `frontend smacss`
* `angularjs` A shorthand for `frontend angularjs`
* `reactjs` A shorthand for `frontend reactjs`
* `emberjs` A shorthand for `frontend emberjs`
* `stackoverflow` A shorthand for `frontend stackoverflow`
## Usage ##
You can use the frontend-search plugin in these two forms:
* `frontend <context> <term> [more terms if you want]`
* `<context> <term> [more terms if you want]`
For example, these two are equivalent:
```zsh
$ frontend angularjs dependency injection
$ angularjs dependency injection
```
Available search contexts are:
| context | URL |
|---------------|--------------------------------------------------------------------------|
| angularjs | `https://google.com/search?as_sitesearch=angularjs.org&as_q=` |
| aurajs | `http://aurajs.com/api/#stq=` |
| bem | `https://google.com/search?as_sitesearch=bem.info&as_q=` |
| bootsnipp | `http://bootsnipp.com/search?q=` |
| caniuse | `http://caniuse.com/#search=` |
| codepen | `http://codepen.io/search?q=` |
| compass | `http://compass-style.org/search?q=` |
| cssflow | `http://www.cssflow.com/search?q=` |
| dartlang | `https://api.dartlang.org/apidocs/channels/stable/dartdoc-viewer/dart:` |
| emberjs | `http://emberjs.com/api/#stp=1&stq=` |
| fontello | `http://fontello.com/#search=` |
| html5please | `http://html5please.com/#` |
| jquery | `https://api.jquery.com/?s=` |
| lodash | `https://devdocs.io/lodash/index#` |
| mdn | `https://developer.mozilla.org/search?q=` |
| npmjs | `https://www.npmjs.com/search?q=` |
| qunit | `https://api.qunitjs.com/?s=` |
| reactjs | `https://google.com/search?as_sitesearch=facebook.github.io/react&as_q=` |
| smacss | `https://google.com/search?as_sitesearch=smacss.com&as_q=` |
| stackoverflow | `http://stackoverflow.com/search?q=` |
| unheap | `http://www.unheap.com/?s=` |
If you want to have another context, open an Issue and tell us!
## Author
......@@ -77,5 +63,3 @@ There are a few aliases presented as well:
+ <https://plus.google.com/+WilsonMendes>
+ <https://twitter.com/willmendesneto>
+ <http://github.com/willmendesneto>
New features comming soon.
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