Commit 906a451b authored by AdminXVII's avatar AdminXVII

Merge branch 'master' of

parents 9c8aa52b a9e3fcb3
Pipeline #5643 passed with stages
in 1 minute and 14 seconds
......@@ -12,38 +12,29 @@ git clone ~/.config/ion/plugins
### 2. Use it in your config (~/.config/ion/initrc)
#### For now
source ~/.config/ion/plugins/themes/<theme>/init.ion
source ~/.config/ion/plugins/<plugin>/init.ion
#### Planned API
... rest of initrc
source ~/.config/ion/plugins/init.ion
load_theme robbyrussel
load [ git yarn ... ]
## What's provided
### Plugins
Use them by adding their identifiers to the `load` array parameter. A list of plugins is simply the folders that are included in the repo
## How to use plugins
Use them by sourcing their files. A list of plugins can be found [here](
#### Adding your own
## Creating your own
Plugins are stored in a directory under ~/.config/ion/plugins with the following structure:
- init.ion
- <plugin>.ion
The init.ion is read at the shell lauch and should register its functions.
The ion script is read at the shell launch and should register its functions.
A comment describing the plugin should be placed at the begining of the file if you wish to send it upstream. It will be sourced for the pages documentation.
### Themes
Themes are stored under ~/.config/ion/plugins/themes. You can load the one you like with `load_theme <your theme>`
## Themes
Themes are provided for example in the themes folder. Note however that it is highly recommended that you create your own, as it is quite simple to build with colors in Ion. For more complex logic, plugins provide with helpers.
For native rust theming, see the [candypaint]( repo.
For powerline, see [powerline-rs](
## Contributors
Feel free to pick an issue and/or send patches for additional features.
# This plugin adds useful aliases for common [Yum]( commands.
# This plugin adds useful aliases for common [Yum]( and `dnf` commands.
# `dnf` is the new package manager for RPM-based distributions, which
# replaces `yum`.
## Aliases
## Yum
alias ys = 'yum search' # search package
alias yp = 'yum info' # show package info
......@@ -16,3 +19,19 @@ alias yr = 'sudo yum remove' # remove package
alias ygr = 'sudo yum groupremove' # remove pagage group
alias yrl = 'sudo yum remove --remove-leaves' # remove package and leaves
alias yc = 'sudo yum clean all' # clean cache
## DNF
alias dnfl="dnf list" # List packages
alias dnfli="dnf list installed" # List installed packages
alias dnfgl="dnf grouplist" # List package groups
alias dnfmc="dnf makecache" # Generate metadata cache
alias dnfp="dnf info" # Show package information
alias dnfs="dnf search" # Search package
alias dnfu="sudo dnf upgrade" # Upgrade package
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 package group
alias dnfc="sudo dnf clean all" # Clean cache
......@@ -15,7 +15,11 @@ section.faq(ref="rootEl")
div(:class="generateQuestionClasses(i)" @click="makeActive(i)")
button.button--green(@click.stop="$emit('update', item)") Add
v-if="value.indexOf(item) === -1"
@click.stop="$emit('update', item)"
) Select
button.button--red(v-else @click.stop="$emit('update', item)") Remove
div.accordion__value(v-if="i === activeQuestionIndex")
......@@ -31,7 +35,11 @@ section.faq(ref="rootEl")
span(v-for="description, name in item.funcs") fn {{ name }} -- {{ description }}
button.button--green(@click="$emit('update', item)") Add
v-if="value.indexOf(item) === -1"
@click.stop="$emit('update', item)"
) Select
button.button--red(v-else @click.stop="$emit('update', item)") Remove
......@@ -40,9 +48,7 @@ import { CollapseTransition } from 'vue2-transitions';
export default {
name: 'VueFaqAccordion',
components: {
components: { CollapseTransition },
data() {
return {
activeTab: 0,
......@@ -51,15 +57,14 @@ export default {
props: {
* Array of items
* Object style {questionProperty: string, answerProperty: string, tabName: string}
* You can change object keys names using other props (questionProperty, answerProperty, tabName)
items: {
type: Array,
required: true,
value: {
type: Array,
required: true,
computed: {
categories() {
......@@ -103,7 +108,6 @@ export default {
}, 300);
generateCategoryClasses(category) {
console.log(this.activeTab, category);
return [
this.activeTab === category
......@@ -234,13 +238,14 @@ export default {
&__toggle-button {
position: relative;
width: 1em;
height: 1em;
width: 1.25em;
height: 1.25em;
transition: all 0.3s;
transform-origin: 50% 50%;
padding-left: 16px;
padding-left: 1.25em;
margin-left: 2em;
cursor: pointer;
vertical-align: middle;
&::after {
......@@ -26,25 +26,33 @@ html {
$button: #3b8070;
.button--green {
.button {
display: inline-block;
border-radius: 4px;
border: 1px solid #3b8070;
text-decoration: none;
padding: 10px 30px;
border-radius: .25em;
padding: 0 3em;
color: #fff;
background-color: $button;
cursor: pointer;
height: 3em;
&:hover {
background: darken($button, 10%);
@mixin button_color($color, $name) {
.button--#{$name} {
@extend .button;
background-color: $color;
&:hover {
background: darken($color, 10%);
&:active {
background: darken($button, 15%);
&:active {
background: darken($color, 15%);
@include button_color(#3b8070, green);
@include button_color(#BC5666, red);
code {
display: inline-block;
border-radius: .5em;
......@@ -12,7 +12,7 @@ section.container
code.block {{ initrc }}
plugin-selector(:items="items" @update="toggle(`${$event.category}/${event.title}.ion`)")
plugin-selector(:items="items" :value="selection" @update="toggle($event)")
......@@ -33,7 +33,7 @@ export default {
if (this.selection.length !== 0) {
initrc += '\n\n# Your list of plugins';
return [...this.selection].reduce((rest, item) => `${rest}\nsource ~/.config/ion/plugins/${item}`, initrc);
return [...this.selection].reduce((rest, item) => `${rest}\nsource ~/.config/ion/plugins/${item.category}/${item.title}.ion`, initrc);
methods: {
......@@ -131,7 +131,7 @@ h1 {
.explanations {
height: 50vh;
min-height: 50vh;
margin: 10vh 10vw 0;
This diff is collapsed.
# This plugin adds aliases for common commands of the [Go Programming Language](
alias gob='go build'
alias goc='go clean'
alias god='go doc'
alias gof='go fmt'
alias gofa='go fmt ./...'
alias gog='go get'
alias goi='go install'
alias gol='go list'
alias gom='go mod'
alias gop='cd $GOPATH'
alias gopb='cd $GOPATH/bin'
alias gops='cd $GOPATH/src'
alias gor='go run'
alias got='go test'
alias gov='go vet'
# The plugin adds several aliases for common [brew]( commands.
alias brewp='brew pin'
alias brews='brew list -1'
alias brewsp='brew list --pinned'
alias bubo='brew update && brew outdated'
alias bubc='brew upgrade && brew cleanup'
alias bubu='bubo && bubc'
alias bcubo='brew update && brew cask outdated'
alias bcubc='brew cask reinstall $(brew cask outdated) && brew cleanup'
# Common aliases for bundler
alias be="bundle exec"
alias bl="bundle list"
alias bp="bundle package"
alias bo="bundle open"
alias bout="bundle outdated"
alias bu="bundle update"
alias bi="bundle_install"
alias bcn="bundle clean"
# Aliases for [CakePHP](
alias c3='bin/cake'
alias c3cache='bin/cake orm_cache clear'
alias c3migrate='bin/cake migrations migrate'
# Some Useful CloudFoundry Aliases & Functions
alias cfl = 'cf login'
alias cft = 'cf target'
alias cfa = 'cf apps'
alias cfs = 'cf services'
alias cfm = 'cf marketplace'
alias cfp = 'cf push'
alias cfcs = 'cf create-service'
alias cfbs = 'cf bind-service'
alias cfus = 'cf unbind-service'
alias cfds = 'cf delete-service'
alias cfup = 'cf cups'
alias cflg = 'cf logs'
alias cfr = 'cf routes'
alias cfe = 'cf env'
alias cfsh = 'cf ssh'
alias cfsc = 'cf scale'
alias cfev = 'cf events'
alias cfdor = 'cf delete-orphaned-routes'
alias cfbpk = 'cf buildpacks'
alias cfdm = 'cf domains'
alias cfsp = 'cf spaces'
alias cfap = 'cf app'
alias cfpm = 'cf push -f'
alias cflr = 'cf logs --recent'
alias cfsrt = 'cf start'
alias cfstp = 'cf stop'
alias cfstg = 'cf restage'
alias cfdel = 'cf delete'
alias cfsrtall = 'cf apps | awk '"'"'/stopped/ { system("cf start " $1)}'"'"
alias cfstpall = 'cf apps | awk '"'"'/started/ { system("cf stop " $1)}'"'"
# Based upon the work of Daniel Gomes (
# Adds a few useful aliases as well as composer's global binaries' paths to $PATH
alias c = 'composer'
alias csu = 'composer self-update'
alias cu = 'composer update'
alias cr = 'composer require'
alias crm = 'composer remove'
alias ci = 'composer install'
alias ccp = 'composer create-project'
alias cdu = 'composer dump-autoload'
alias cdo = 'composer dump-autoload --optimize-autoloader'
alias cgu = 'composer global update'
alias cgr = 'composer global require'
alias cgrm = 'composer global remove'
# install composer in the current directory
alias cget = 'curl -s | php'
# Add Composer's global binaries to PATH, using Composer if available.
if which composer &> /dev/null
export PATH = $PATH:$(composer global config bin-dir --absolute ^>/dev/null)
if test -d $HOME/.composer/vendor/bin
export PATH=$PATH:$HOME/.composer/vendor/bin
if test -d $HOME/.config/composer/vendor/bin
export PATH=$PATH:$HOME/.config/composer/vendor/bin
# This plugin provides aliases for frequent [docker-compose]( commands
# Based upon the work of [tristola](
# Docker-compose related aliases
# Use dco as alias for docker-compose, since dc on *nix is 'dc - an arbitrary precision calculator'
alias dco='docker-compose'
alias dcb='docker-compose build'
alias dce='docker-compose exec'
alias dcps='docker-compose ps'
alias dcrestart='docker-compose restart'
alias dcrm='docker-compose rm'
alias dcr='docker-compose run'
alias dcstop='docker-compose stop'
alias dcup='docker-compose up'
alias dcupd='docker-compose up -d'
alias dcdn='docker-compose down'
alias dcl='docker-compose logs'
alias dclf='docker-compose logs -f'
alias dcpull='docker-compose pull'
alias dcstart='docker-compose start'
fn drf choice:str
if eq $choice ''
drush core-config
drush core-config --choice=$choice
fn drnew
echo "Website's name: "
let HOST = "http://$(hostname -i)/"
if exists -f WEBSITE_NAME
let MINUTES = $(date +%M:%S)
echo "Your website will be named: $WEBSITE_NAME"
drush dl drupal --drupal-project-rename=$WEBSITE_NAME
echo "Type your localhost directory: (Leave empty for /var/www/html/)"
let DIRECTORY ?= "/var/www/html/"
echo "Database's user: "
echo "Database's password: "
echo "Database's name for your project: "
let DB_URL = "mysql://$DATABASE_USR:$DATABASE_PWD\@localhost/$DATABASE"
drush site-install standard --db-url=$DB_URL --site-name=$WEBSITE_NAME
# TODO: zsh's open_command
echo "Done"
# Aliases, sorted alphabetically.
alias dr = 'drush'
alias drca = 'drush cc all' # Deprecated for Drush 8
alias drcb = 'drush cc block' # Deprecated for Drush 8
alias drcg = 'drush cc registry' # Deprecated for Drush 8
alias drcj = 'drush cc css-js'
alias drcm = 'drush cc menu'
alias drcml = 'drush cc module-list'
alias drcr = 'drush core-cron'
alias drct = 'drush cc theme-registry'
alias drcv = 'drush cc views'
alias drdmp = 'drush sql-dump --ordered-dump --result-file=dump.sql'
alias dren = 'drush en -y '
alias drf = 'drush features'
alias drfi = 'drush field-info'
alias drfr = 'drush features-revert -y'
alias drfu = 'drush features-update -y'
alias drfra = 'drush features-revert-all'
alias drif = 'drush image-flush --all'
alias dris = 'drush pm-disable -y'
alias drpm = 'drush pm-list --type=module'
alias drpu = 'drush pm-uninstall -y'
alias drst = 'drush core-status'
alias drup = 'drush updatedb'
alias drups = 'drush updatedb-status'
alias drv = 'drush version'
alias drvd = 'drush variable-del'
alias drvg = 'drush variable-get'
alias drvs = 'drush variable-set'
# ## Based upon the work of [BilalBudhani](, [eubenesa](, [scottkidder](]
# Ember CLI (
# Visit to view user guide
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 ets='ember test --serve'
alias eu='ember update'
# version
alias ev='ember version'
# This plugin adds some aliases and functions for FirewallD using the `firewalld-cmd` command
alias fw = 'sudo firewall-cmd'
alias fwp = 'sudo firewall-cmd --permanent'
alias fwr = 'sudo firewall-cmd --reload'
alias fwrp = 'sudo firewall-cmd --runtime-to-permanent'
fn fwl
# converts output to zsh array ()
let zones = @split($(sudo firewall-cmd --get-active-zones | grep -v 'interfaces\|sources') '\n')
for i in @zones
sudo firewall-cmd --zone $i --list-all
echo 'Direct Rules:'
sudo firewall-cmd --direct --get-all-rules
alias angular='frontend angular'
alias angularjs='frontend angularjs'
alias bem='frontend bem'
alias bootsnipp='frontend bootsnipp'
alias bundlephobia='frontend bundlephobia'
alias caniuse='frontend caniuse'
alias codepen='frontend codepen'
alias compassdoc='frontend compassdoc'
alias cssflow='frontend cssflow'
alias dartlang='frontend dartlang'
alias emberjs='frontend emberjs'
alias flowtype='frontend flowtype'
alias fontello='frontend fontello'
alias github='frontend github'
alias html5please='frontend html5please'
alias jestjs='frontend jestjs'
alias jquery='frontend jquery'
alias lodash='frontend lodash'
alias mdn='frontend mdn'
alias nodejs='frontend nodejs'
alias npmjs='frontend npmjs'
alias qunit='frontend qunit'
alias reactjs='frontend reactjs'
alias smacss='frontend smacss'
alias stackoverflow='frontend stackoverflow'
alias typescript='frontend typescript'
alias unheap='frontend unheap'
alias vuejs='frontend vuejs'
# define search context URLS
let _frontend_urls:hmap[str] = [
angular='' \
angularjs='' \
bem='' \
bootsnipp='' \
bundlephobia='' \
caniuse='' \
codepen='' \
compassdoc='' \
cssflow='' \
dartlang='' \
emberjs='' \
flowtype='' \
fontello='' \
github='' \
html5please='' \
jestjs='' \
jquery='' \
lodash='' \
mdn='' \
nodejs='' \
npmjs='' \
qunit='' \
reactjs='' \
smacss='' \
stackoverflow='' \
typescript='' \
unheap='' \
vuejs='' \
fn frontend engine:str terms:[str]
# check whether the search context is supported
if test -z @_frontend_urls[$engine]
echo "Search context \"$engine\" currently not supported."
echo ""
echo "Valid contexts are:"
echo ""
echo " angular, angularjs, bem, bootsnipp, caniuse, codepen, compassdoc, cssflow,"
echo " dartlang, emberjs, fontello, github, html5please, jest, jquery, lodash,"
echo " mdn, npmjs, nodejs, qunit, reactjs, smacss, stackoverflow, unheap, vuejs, bundlephobia"
echo ""
return 1
# build search url:
# join arguments passed with '%20', then append to search context URL
# TODO substitute for proper urlencode method
let url = "@_frontend_urls[$engine]$join(@terms '%20')"
echo "Opening $url ..."
# TODO: open_command like zsh
xdg-open "$url"
# # Git-Flow plugin
# This plugin adds aliases for the [`git-flow`]( command.
# [More information about `git-flow` commands](
alias gfl='git flow'
alias gfli='git flow init'
alias gcd='git checkout develop'
alias gch='git checkout hotfix'
alias gcr='git checkout release'
alias gflf='git flow feature'
alias gflh='git flow hotfix'
alias gflr='git flow release'
alias gflfs='git flow feature start'
alias gflhs='git flow hotfix start'
alias gflrs='git flow release start'
alias gflff='git flow feature finish'
alias gflfp='git flow feature publish'
alias gflhf='git flow hotfix finish'
alias gflrf='git flow release finish'
alias gflfp='git flow feature publish'
alias gflhp='git flow hotfix publish'
alias gflrp='git flow release publish'
alias gflfpll='git flow feature pull'
# # git-hubflow plugin
# This plugin adds completion for [HubFlow]( (GitFlow for GitHub), as well as some
# aliases for common commands. HubFlow is a git extension to make it easy to use GitFlow with GitHub. Based on the
# original gitflow extension for git.
# The hubflow tool has to be [installed]( separately.
alias ghf='git hf'
alias ghff='git hf feature'
alias ghfr='git hf release'
alias ghfh='git hf hotfix'
alias ghfs='git hf support'
alias ghfu='git hf update'
# Set up hub wrapper for git, if it is available;
if which hub &> /dev/null
alias git = 'hub'
fn empty_gh repo:str -- Creates a new repo with a blank in it and pushes it up to GitHub.
mkdir $repo
touch "$repo/"
new_gh $repo
fn new_gh repo:str -- Add all non-hidden files to git
set -e
cd $repo
git init