From c42e3e8b211d63ac3028bd1fc62342a9c3386d80 Mon Sep 17 00:00:00 2001 From: Ira Abramov Date: Tue, 10 Mar 2020 10:16:02 +0200 Subject: [PATCH] Removed trailing whitespaces --- aliases/available/clipboard.aliases.bash | 2 +- completion/available/gem.completion.bash | 4 +- completion/available/git_flow.completion.bash | 40 ++++++------ completion/available/jboss7.completion.bash | 40 ++++++------ completion/available/laravel.completion.bash | 3 +- completion/available/salt.completion.bash | 61 +++++++++---------- completion/available/sqlmap.completion.bash | 8 +-- completion/available/ssh.completion.bash | 4 +- completion/available/virsh.completion.bash | 4 +- .../available/virtualbox.completion.bash | 28 ++++----- completion/available/vuejs.completion.bash | 2 +- completion/available/wpscan.completion.bash | 3 +- plugins/available/autojump.plugin.bash | 2 +- plugins/available/git.plugin.bash | 4 +- plugins/available/postgres.plugin.bash | 11 ++-- plugins/available/powerline.plugin.bash | 2 +- themes/atomic/atomic.theme.bash | 16 ++--- themes/barbuk/README.md | 2 +- themes/codeword/README.md | 2 +- themes/essential/essential.theme.bash | 2 +- themes/hawaii50/hawaii50.theme.bash | 16 ++--- themes/n0qorg/n0qorg.theme.bash | 2 +- themes/parrot/parrot.theme.bash | 2 +- themes/powerline-multiline/README.md | 2 +- themes/pure/pure.theme.bash | 10 +-- themes/ramses/ramses.theme.bash | 6 +- themes/sirup/sirup.theme.bash | 2 +- themes/zork/zork.theme.bash | 6 +- 28 files changed, 140 insertions(+), 146 deletions(-) diff --git a/aliases/available/clipboard.aliases.bash b/aliases/available/clipboard.aliases.bash index 528e2d0e..c6c15519 100644 --- a/aliases/available/clipboard.aliases.bash +++ b/aliases/available/clipboard.aliases.bash @@ -7,7 +7,7 @@ case $OSTYPE in [[ $XCLIP ]] && \ alias pbcopy="$XCLIP -selection clipboard" && \ alias pbpaste="$XCLIP -selection clipboard -o" - ;; + ;; esac # to use it just install xclip on your distribution and it would work like: diff --git a/completion/available/gem.completion.bash b/completion/available/gem.completion.bash index de986e08..2d098529 100644 --- a/completion/available/gem.completion.bash +++ b/completion/available/gem.completion.bash @@ -6,7 +6,7 @@ _installcomp() { then REMOTE_GEMS=( $(gem list --remote --no-versions | tr '\n' ' ') ) fi - + local cur=${COMP_WORDS[COMP_CWORD]} COMPREPLY=( $(compgen -W "${REMOTE_GEMS[*]}" -- $cur) ) } @@ -16,7 +16,7 @@ _uninstallcomp() { then LOCAL_GEMS=( $(gem list --no-versions | sed 's/\*\*\* LOCAL GEMS \*\*\*//' | tr '\n' ' ') ) fi - + local cur=${COMP_WORDS[COMP_CWORD]} COMPREPLY=( $(compgen -W "${LOCAL_GEMS[*]}" -- $cur) ) } diff --git a/completion/available/git_flow.completion.bash b/completion/available/git_flow.completion.bash index c76d323b..04f20ccd 100644 --- a/completion/available/git_flow.completion.bash +++ b/completion/available/git_flow.completion.bash @@ -2,47 +2,47 @@ # # git-flow-completion # =================== -# +# # Bash completion support for [git-flow](http://github.com/nvie/gitflow) -# +# # The contained completion routines provide support for completing: -# +# # * git-flow init and version # * feature, hotfix and release branches # * remote feature branch names (for `git-flow feature track`) -# -# +# +# # Installation # ------------ -# +# # To achieve git-flow completion nirvana: -# +# # 0. Install git-completion. -# +# # 1. Install this file. Either: -# +# # a. Place it in a `bash-completion.d` folder: -# +# # * /etc/bash-completion.d # * /usr/local/etc/bash-completion.d # * ~/bash-completion.d -# +# # b. Or, copy it somewhere (e.g. ~/.git-flow-completion.sh) and put the following line in # your .bashrc: -# +# # source ~/.git-flow-completion.sh -# +# # 2. If you are using Git < 1.7.1: Edit git-completion.sh and add the following line to the giant # $command case in _git: -# +# # flow) _git_flow ;; -# -# +# +# # The Fine Print # -------------- -# +# # Copyright (c) 2010 [Justin Hileman](http://justinhileman.com) -# +# # Distributed under the [MIT License](http://creativecommons.org/licenses/MIT/) _git_flow () @@ -128,7 +128,7 @@ __git_flow_release () __gitcomp "$subcommands" return fi - + case "$subcommand" in finish) __gitcomp "$(__git_flow_list_releases)" @@ -174,4 +174,4 @@ __git_flow_list_hotfixes () # temporarily wrap __git_find_on_cmdline() for backwards compatibility if [ -z "`type -t __git_find_subcommand`" ]; then alias __git_find_subcommand=__git_find_on_cmdline -fi \ No newline at end of file +fi diff --git a/completion/available/jboss7.completion.bash b/completion/available/jboss7.completion.bash index 66d07179..0bb44f15 100644 --- a/completion/available/jboss7.completion.bash +++ b/completion/available/jboss7.completion.bash @@ -14,17 +14,17 @@ _serverProfiles(){ # assume is domain.sh serverdir="../domain/configuration/" fi - + for i in ${!COMP_WORDS[*]} do if [[ "${COMP_WORDS[i]}" == "-Djboss.server.base.dir" || "${COMP_WORDS[i]}" == "-Djboss.domain.base.dir" ]]; then serverdir="${COMP_WORDS[i+2]}/configuration" - fi - + fi + done if [ -d "${serverdir}" ] then - + IFS=$'\n' tmp="$(ls "${serverdir}" | grep xml)" local fls="${tmp[@]// /\ }" unset IFS @@ -42,13 +42,13 @@ _bindingAddress(){ } _jboss(){ - + local cur prev words cword COMPREPLY=() _get_comp_words_by_ref -n = cur prev words cword - + case $cur in - + -Djboss.socket.binding.port-offset=*) cur=${cur#*=} #static list of common bindings sets @@ -70,13 +70,13 @@ _jboss(){ COMPREPLY=( $(compgen -W "${booleans}" -- ${cur}) ) return 0 ;; - + -Djboss.server.base.dir=*|-Djboss.home.dir=*|-Djboss.domain.base.dir=*) cur=${cur#*=} _filedir -d return 0 ;; - + -Djboss.domain.master.address=*|-Djboss.bind.address*=*) cur=${cur#*=} _bindingAddress @@ -85,8 +85,8 @@ _jboss(){ --server-config=*|-c=|--host-config=*) cur=${cur#*=} _serverProfiles - return 0 - + return 0 + esac @@ -110,14 +110,14 @@ _jboss(){ ;; esac # *** from jboss5 ******************** - # *** -modulepath -c -m -g -l -d -p -n -B -L -C -Djboss.platform.mbeanserver -Djboss.server.base.directory + # *** -modulepath -c -m -g -l -d -p -n -B -L -C -Djboss.platform.mbeanserver -Djboss.server.base.directory # *** -Djboss.Domain -Djboss.modcluster.proxyList -Djboss.jvmRoute -Djboss.default.jgroups.stack -Dorg.jboss.ejb3.remoting.IsLocalInterceptor.passByRef -Djboss.platform.mbeanserver -Dcom.sun.management.jmxremote.port -Dcom.sun.management.jmxremote.ssl # ************************************* - + # standard commands for standalone and domain mode local commandsWithoutEqualSign='-b -bmanagement -bunsecure -bpublic --admin-only -h -help -u -version -V -v' local commandsWithEqualSign='-P -Djboss.node.name -Djboss.home.dir -Djboss.socket.binding.port-offset -Djboss.bind.address.management -Djboss.bind.address -Djboss.bind.address.unsecure' - + if [[ $COMP_WORDS == *standalone.sh* ]] then commandsWithoutEqualSign="${commandsWithoutEqualSign} -c" @@ -127,15 +127,15 @@ _jboss(){ commandsWithoutEqualSign="${commandsWithoutEqualSign} --backup --cached-dc" commandsWithEqualSign="${commandsWithEqualSign} -Djboss.domain.master.address --host-config -Djboss.domain.master.port -Djboss.domain.base.dir " fi - - - - COMPREPLY=( $( compgen -W "$commandsWithoutEqualSign" -- "$cur" ) - $( compgen -W "$commandsWithEqualSign" -S '=' -- "$cur" ) ) + + + + COMPREPLY=( $( compgen -W "$commandsWithoutEqualSign" -- "$cur" ) + $( compgen -W "$commandsWithEqualSign" -S '=' -- "$cur" ) ) return 0 - + } complete -o nospace -F _jboss standalone.sh complete -o nospace -F _jboss domain.sh diff --git a/completion/available/laravel.completion.bash b/completion/available/laravel.completion.bash index bf24f67e..7bd6f223 100644 --- a/completion/available/laravel.completion.bash +++ b/completion/available/laravel.completion.bash @@ -10,7 +10,6 @@ if command -v laravel > /dev/null; then fi done } - + complete -F __laravel_completion laravel fi - diff --git a/completion/available/salt.completion.bash b/completion/available/salt.completion.bash index e8cb5b25..7634dcdc 100644 --- a/completion/available/salt.completion.bash +++ b/completion/available/salt.completion.bash @@ -13,7 +13,7 @@ _salt_get_grains(){ - if [ "$1" = 'local' ] ; then + if [ "$1" = 'local' ] ; then salt-call --out=txt -- grains.ls | sed 's/^.*\[//' | tr -d ",']" |sed 's:\([a-z0-9]\) :\1\: :g' else salt '*' --timeout 2 --out=txt -- grains.ls | sed 's/^.*\[//' | tr -d ",']" |sed 's:\([a-z0-9]\) :\1\: :g' @@ -22,15 +22,15 @@ _salt_get_grains(){ _salt_get_grain_values(){ if [ "$1" = 'local' ] ; then - salt-call --out=txt -- grains.item $1 |sed 's/^\S*:\s//' |grep -v '^\s*$' + salt-call --out=txt -- grains.item $1 |sed 's/^\S*:\s//' |grep -v '^\s*$' else - salt '*' --timeout 2 --out=txt -- grains.item $1 |sed 's/^\S*:\s//' |grep -v '^\s*$' + salt '*' --timeout 2 --out=txt -- grains.item $1 |sed 's/^\S*:\s//' |grep -v '^\s*$' fi } _salt(){ - local cur prev opts _salt_grains _salt_coms pprev ppprev + local cur prev opts _salt_grains _salt_coms pprev ppprev COMPREPLY=() cur="${COMP_WORDS[COMP_CWORD]}" prev="${COMP_WORDS[COMP_CWORD-1]}" @@ -58,11 +58,11 @@ _salt(){ case "${pprev}" in -G|--grain|--grain-pcre) if [ "${cur}" = ":" ]; then - COMPREPLY=($(compgen -W "`_salt_get_grain_values ${prev}`" )) + COMPREPLY=($(compgen -W "`_salt_get_grain_values ${prev}`" )) return 0 fi ;; - esac + esac case "${ppprev}" in -G|--grain|--grain-pcre) if [ "${prev}" = ":" ]; then @@ -70,17 +70,17 @@ _salt(){ return 0 fi ;; - esac - + esac + if [ "${cur}" = "=" ] && [[ "${prev}" == --* ]]; then - cur="" + cur="" fi if [ "${prev}" = "=" ] && [[ "${pprev}" == --* ]]; then prev="${pprev}" fi - + case "${prev}" in - + -c|--config) COMPREPLY=($(compgen -f -- ${cur})) return 0 @@ -89,12 +89,12 @@ _salt(){ COMPREPLY=($(compgen -W "\'*\' ${opts} `salt-key --no-color -l acc`" -- ${cur})) return 0 ;; - -E|--pcre) + -E|--pcre) COMPREPLY=($(compgen -W "`salt-key --no-color -l acc`" -- ${cur})) return 0 ;; -G|--grain|--grain-pcre) - COMPREPLY=($(compgen -W "$(_salt_get_grains)" -- ${cur})) + COMPREPLY=($(compgen -W "$(_salt_get_grains)" -- ${cur})) return 0 ;; -C|--compound) @@ -109,10 +109,10 @@ _salt(){ COMPREPLY=($(compgen -W "1 2 3 4 5 6 7 8 9 10 15 20 30 40 50 60 70 80 90 100 120 150 200")) return 0 ;; - -N|--nodegroup) + -N|--nodegroup) MASTER_CONFIG='/etc/salt/master' - COMPREPLY=($(compgen -W "`awk -F ':' 'BEGIN {print_line = 0}; /^nodegroups/ {print_line = 1;getline } print_line && /^ */ {print $1} /^[^ ]/ {print_line = 0}' <${MASTER_CONFIG}`" -- ${cur})) - return 0 + COMPREPLY=($(compgen -W "`awk -F ':' 'BEGIN {print_line = 0}; /^nodegroups/ {print_line = 1;getline } print_line && /^ */ {print $1} /^[^ ]/ {print_line = 0}' <${MASTER_CONFIG}`" -- ${cur})) + return 0 ;; esac @@ -133,8 +133,8 @@ _saltkey(){ prev="${COMP_WORDS[COMP_CWORD-1]}" opts="-c --config-dir= -h --help --version --versions-report -q --quiet \ -y --yes --gen-keys= --gen-keys-dir= --keysize= --key-logfile= \ - -l --list= -L --list-all -a --accept= -A --accept-all \ - -r --reject= -R --reject-all -p --print= -P --print-all \ + -l --list= -L --list-all -a --accept= -A --accept-all \ + -r --reject= -R --reject-all -p --print= -P --print-all \ -d --delete= -D --delete-all -f --finger= -F --finger-all \ --out=pprint --out=yaml --out=overstatestage --out=json --out=raw \ --out=highstate --out=key --out=txt --no-color --out-indent= " @@ -150,13 +150,13 @@ _saltkey(){ fi if [ "${cur}" = "=" ] && [[ "${prev}" == --* ]]; then - cur="" + cur="" fi if [ "${prev}" = "=" ] && [[ "${pprev}" == --* ]]; then prev="${pprev}" fi - case "${prev}" in + case "${prev}" in -a|--accept) COMPREPLY=($(compgen -W "$(salt-key -l un --no-color; salt-key -l rej --no-color)" -- ${cur})) return 0 @@ -177,7 +177,7 @@ _saltkey(){ COMPREPLY=($(compgen -W "2048 3072 4096 5120 6144" -- ${cur})) return 0 ;; - --gen-keys) + --gen-keys) return 0 ;; --gen-keys-dir) @@ -221,14 +221,14 @@ _saltcall(){ COMPREPLY=($(compgen -W "${opts}" -- ${cur})) return 0 fi - + if [ "${cur}" = "=" ] && [[ ${prev} == --* ]]; then cur="" fi if [ "${prev}" = "=" ] && [[ ${pprev} == --* ]]; then prev="${pprev}" fi - + case ${prev} in -m|--module-dirs) COMPREPLY=( $(compgen -d ${cur} )) @@ -262,7 +262,7 @@ _saltcp(){ prev="${COMP_WORDS[COMP_CWORD-1]}" opts="-t --timeout= -s --static -b --batch= --batch-size= \ -h --help --version --versions-report -c --config-dir= \ - -E --pcre -L --list -G --grain --grain-pcre -N --nodegroup \ + -E --pcre -L --list -G --grain --grain-pcre -N --nodegroup \ -R --range -C --compound -I --pillar \ --out=pprint --out=yaml --out=overstatestage --out=json --out=raw \ --out=highstate --out=key --out=txt --no-color --out-indent= " @@ -270,19 +270,19 @@ _saltcp(){ COMPREPLY=($(compgen -W "${opts}" -- ${cur})) return 0 fi - + if [ "${cur}" = "=" ] && [[ "${prev}" == --* ]]; then - cur="" + cur="" fi if [ "${prev}" = "=" ] && [[ "${pprev}" == --* ]]; then prev=${pprev} fi - + case ${prev} in salt-cp) COMPREPLY=($(compgen -W "${opts} `salt-key -l acc --no-color`" -- ${cur})) return 0 - ;; + ;; -t|--timeout) # those numbers are just a hint COMPREPLY=($(compgen -W "2 3 4 8 10 15 20 25 30 40 60 90 120 180 240 300" -- ${cur} )) @@ -303,7 +303,7 @@ _saltcp(){ return 0 ;; -G|--grain|--grain-pcre) - COMPREPLY=($(compgen -W "$(_salt_get_grains)" -- ${cur})) + COMPREPLY=($(compgen -W "$(_salt_get_grains)" -- ${cur})) return 0 ;; # FIXME @@ -320,10 +320,9 @@ _saltcp(){ return 0 ;; esac - + # default is using opts: COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) } complete -F _saltcp salt-cp - diff --git a/completion/available/sqlmap.completion.bash b/completion/available/sqlmap.completion.bash index e80eb796..16addf85 100644 --- a/completion/available/sqlmap.completion.bash +++ b/completion/available/sqlmap.completion.bash @@ -4,7 +4,7 @@ # | # Thanks to Alexander Korznikov | # http://www.korznikov.com/2014/12/bash-tab-completion-for-awesome-tool.html | -# | +# | # ---------------------------------------------------------------------------+ if command -v sqlmap > /dev/null; then @@ -18,7 +18,7 @@ if command -v sqlmap > /dev/null; then prev=$(_get_pword) case $prev in - + # List directory content --tamper) COMPREPLY=( $( compgen -W "$tamper" -- "$cur" ) ) @@ -108,7 +108,7 @@ if command -v sqlmap > /dev/null; then -z --alert --answers --beep --check-waf --cleanup \ --dependencies --disable-coloring --gpage --identify-waf \ --mobile --page-rank --purge-output --smart \ - --sqlmap-shell --wizard' -- "$cur" ) ) + --sqlmap-shell --wizard' -- "$cur" ) ) # this removes any options from the list of completions that have # already been specified somewhere on the command line, as long as # these options can only be used once (in a word, "options", in @@ -155,7 +155,7 @@ if command -v sqlmap > /dev/null; then done printf '%s ' "${COMPREPLY[@]}") <<<"${COMP_WORDS[@]}" ) ) - + # else # _filedir bat fi diff --git a/completion/available/ssh.completion.bash b/completion/available/ssh.completion.bash index 0e066091..1f71f112 100644 --- a/completion/available/ssh.completion.bash +++ b/completion/available/ssh.completion.bash @@ -13,8 +13,8 @@ _sshcomplete() { # parse all defined hosts from .ssh/config and files included there for fl in "$HOME/.ssh/config" \ - $(grep "^\s*Include" "$HOME/.ssh/config" | - awk '{for (i=2; i<=NF; i++) print $i}' | + $(grep "^\s*Include" "$HOME/.ssh/config" | + awk '{for (i=2; i<=NF; i++) print $i}' | sed -Ee "s|^([^/~])|$HOME/.ssh/\1|" -e "s|^~/|$HOME/|") do if [ -r "$fl" ]; then diff --git a/completion/available/virsh.completion.bash b/completion/available/virsh.completion.bash index 14f03d73..4090a24a 100644 --- a/completion/available/virsh.completion.bash +++ b/completion/available/virsh.completion.bash @@ -10,7 +10,7 @@ _contain_cmd() { local e f local array1=($1) array2=($2) - + for e in "${array1[@]}" do for f in "${array2[@]}" @@ -80,7 +80,7 @@ _virsh_list_nwfilters() virsh -q nwfilter-list | cut -d\ -f4 | awk '{print $1}' } -_virsh() +_virsh() { local cur prev cmds doms options nets pools cmds_help local flag_all=1 array ret a b ifaces nwfilters files diff --git a/completion/available/virtualbox.completion.bash b/completion/available/virtualbox.completion.bash index 56e0e673..d0d41df2 100644 --- a/completion/available/virtualbox.completion.bash +++ b/completion/available/virtualbox.completion.bash @@ -23,16 +23,16 @@ __vboxmanage_startvm() { __vboxmanage_list() { INPUT=$(vboxmanage list | tr -s '[\[\]\|\n]' ' ' | cut -d' ' -f4-) - + PRUNED="" if [ "$1" == "long" ]; then for WORD in $INPUT; do [ "$WORD" == "-l" ] && continue; [ "$WORD" == "--long" ] && continue; - + PRUNED="$PRUNED $WORD" done - else + else PRUNED=$INPUT fi @@ -47,7 +47,7 @@ __vboxmanage_list_vms() { else SEPARATOR=$1 fi - + for VM in $(vboxmanage list vms | cut -d' ' -f1 | tr -d '"'); do [ "$VMS" != "" ] && VMS="${VMS}${SEPARATOR}" VMS="${VMS}${VM}" @@ -63,7 +63,7 @@ __vboxmanage_list_runningvms() { else SEPARATOR=$1 fi - + for VM in $(vboxmanage list runningvms | cut -d' ' -f1 | tr -d '"'); do [ "$VMS" != "" ] && VMS="${VMS}${SEPARATOR}" VMS="${VMS}${VM}" @@ -81,7 +81,7 @@ __vboxmanage_controlvm() { echo "screenshotpng setcredentials teleport plugcpu unplugcpu" echo "cpuexecutioncap" -# setlinkstate<1-N> +# setlinkstate<1-N> # nic<1-N> null|nat|bridged|intnet|hostonly|generic # [] | # nictrace<1-N> on|off @@ -136,9 +136,9 @@ __vboxmanage_default() { done (( $MATCH == 1 )) && continue; pruned="$pruned $WORD" - + done - + # COMPREPLY=($(compgen -W "${pruned}" -- ${cur})) echo $pruned return 0 @@ -156,13 +156,13 @@ _vboxmanage() { # In case current is complete command case $cur in - startvm|list|controlvm) + startvm|list|controlvm) COMPREPLY=($(compgen -W "$cur ")) return 0 ;; esac - case $prev in + case $prev in -v|--version) return 0 ;; @@ -170,13 +170,13 @@ _vboxmanage() { -l|--long) opts=$(__vboxmanage_list "long") COMPREPLY=($(compgen -W "${opts}" -- ${cur})) - return 0 + return 0 ;; startvm|list) opts=$(__vboxmanage_$prev) COMPREPLY=($(compgen -W "${opts}" -- ${cur})) - return 0 - ;; + return 0 + ;; --type) COMPREPLY=($(compgen -W "gui headless" -- ${cur})) return 0 @@ -204,7 +204,7 @@ _vboxmanage() { # echo "previous: $pprev" case $pprev in startvm) - opts="--type" + opts="--type" COMPREPLY=($(compgen -W "${opts}" -- ${cur})) return 0 ;; diff --git a/completion/available/vuejs.completion.bash b/completion/available/vuejs.completion.bash index 2959f29b..69794785 100644 --- a/completion/available/vuejs.completion.bash +++ b/completion/available/vuejs.completion.bash @@ -10,6 +10,6 @@ if command -v vue > /dev/null; then fi done } - + complete -F __vuejs_completion vue fi diff --git a/completion/available/wpscan.completion.bash b/completion/available/wpscan.completion.bash index 3630183e..f9ea5790 100644 --- a/completion/available/wpscan.completion.bash +++ b/completion/available/wpscan.completion.bash @@ -10,7 +10,6 @@ if command -v wpscan > /dev/null; then fi done } - + complete -F __wpscan_completion wpscan fi - diff --git a/plugins/available/autojump.plugin.bash b/plugins/available/autojump.plugin.bash index a050ace2..345ecadb 100644 --- a/plugins/available/autojump.plugin.bash +++ b/plugins/available/autojump.plugin.bash @@ -8,5 +8,5 @@ if command -v brew &>/dev/null && [[ -s $(brew --prefix)/etc/profile.d/autojump. elif command -v dpkg &>/dev/null && dpkg -s autojump &>/dev/null ; then . "$(dpkg-query -S autojump.sh | cut -d' ' -f2)" elif command -v pacman &>/dev/null && pacman -Q autojump &>/dev/null ; then - . "$(pacman -Ql autojump | grep autojump.sh | cut -d' ' -f2)" + . "$(pacman -Ql autojump | grep autojump.sh | cut -d' ' -f2)" fi diff --git a/plugins/available/git.plugin.bash b/plugins/available/git.plugin.bash index d5aa6d8f..b2c05b60 100644 --- a/plugins/available/git.plugin.bash +++ b/plugins/available/git.plugin.bash @@ -227,7 +227,7 @@ function gitignore-reload() { example '$ gitignore-reload' # The .gitignore file should not be reloaded if there are uncommited changes. - # Firstly, require a clean work tree. The function require_clean_work_tree() + # Firstly, require a clean work tree. The function require_clean_work_tree() # was stolen with love from https://www.spinics.net/lists/git/msg142043.html # Begin require_clean_work_tree() @@ -273,5 +273,3 @@ function gitignore-reload() { echo >&2 "Files readded. Commit your new changes now." fi } - - diff --git a/plugins/available/postgres.plugin.bash b/plugins/available/postgres.plugin.bash index e481d734..8f239985 100644 --- a/plugins/available/postgres.plugin.bash +++ b/plugins/available/postgres.plugin.bash @@ -11,7 +11,7 @@ do if [ -f "$possible/pg_hba.conf" ] then # echo "PGDATA: $possible" - export PGDATA=$possible + export PGDATA=$possible fi done @@ -23,7 +23,7 @@ function postgres_start { about 'Starts PostgreSQL server' group 'postgres' - echo 'Starting Postgres....'; + echo 'Starting Postgres....'; $POSTGRES_BIN/pg_ctl -D $PGDATA -l $PGDATA/logfile start } @@ -31,7 +31,7 @@ function postgres_stop { about 'Stops PostgreSQL server' group 'postgres' - echo 'Stopping Postgres....'; + echo 'Stopping Postgres....'; $POSTGRES_BIN/pg_ctl -D $PGDATA -l $PGDATA/logfile stop -s -m fast } @@ -39,7 +39,7 @@ function postgres_status { about 'Returns status of PostgreSQL server' group 'postgres' - # $POSTGRES_BIN/pg_ctl -D $PGDATA status + # $POSTGRES_BIN/pg_ctl -D $PGDATA status if [[ $(is_postgres_running) == "no server running" ]] then echo "Postgres service [STOPPED]" @@ -58,7 +58,7 @@ function postgres_restart { about 'Restarts status of PostgreSQL server' group 'postgres' - echo 'Restarting Postgres....'; + echo 'Restarting Postgres....'; $POSTGRES_BIN/pg_ctl -D $PGDATA restart } @@ -84,4 +84,3 @@ function postgres_serverlog { # tail -500 $PGDATA/pg_log/`ls -Art $PGDATA/pg_log | tail -n 1` | less # } # - diff --git a/plugins/available/powerline.plugin.bash b/plugins/available/powerline.plugin.bash index 0388aa37..3d91e658 100644 --- a/plugins/available/powerline.plugin.bash +++ b/plugins/available/powerline.plugin.bash @@ -22,5 +22,5 @@ bashPowerlineInit=$(python -c \ 'bindings', \ 'bash', \ 'powerline.sh'))") -[ -e $bashPowerlineInit ] || return +[ -e $bashPowerlineInit ] || return . $bashPowerlineInit diff --git a/themes/atomic/atomic.theme.bash b/themes/atomic/atomic.theme.bash index 5f44b34b..5035d49f 100644 --- a/themes/atomic/atomic.theme.bash +++ b/themes/atomic/atomic.theme.bash @@ -73,24 +73,24 @@ ____atomic_top() { _TOP_RIGHT="" __TOP_RIGHT_LEN=0 __SEG_AT_RIGHT=0 - + for seg in ${___ATOMIC_TOP_LEFT}; do info="$(___atomic_prompt_"${seg}")" [ -n "${info}" ] && ____atomic_top_left_parse "${info}" done - + ___cursor_right="\e[500C" _TOP_LEFT+="${___cursor_right}" - + for seg in ${___ATOMIC_TOP_RIGHT}; do info="$(___atomic_prompt_"${seg}")" [ -n "${info}" ] && ____atomic_top_right_parse "${info}" done - + [ $__TOP_RIGHT_LEN -gt 0 ] && __TOP_RIGHT_LEN=$(( __TOP_RIGHT_LEN - 0 )) ___cursor_adjust="\e[${__TOP_RIGHT_LEN}D" _TOP_LEFT+="${___cursor_adjust}" - + printf "%s%s" "${_TOP_LEFT}" "${_TOP_RIGHT}" } @@ -111,7 +111,7 @@ ___atomic_prompt_user_info() { color=$white box="${normal}${LineA}\$([[ \$? != 0 ]] && echo \"${BIWhite}[${IRed}${SX}${BIWhite}]${normal}${Line}\")${Line}${BIWhite}[|${BIWhite}]${normal}${Line}" info="${IYellow}\u${IRed}@${IGreen}\h" - + printf "%s|%s|%s|%s" "${color}" "${info}" "${white}" "${box}" } @@ -234,7 +234,7 @@ _atomic_completion() { return 0 ;; esac - + COMPREPLY=( $(compgen -W "${actions}" -- "${cur}") ) return 0 } @@ -312,7 +312,7 @@ __atomic_ps2() { _atomic_prompt() { exitcode="$?" - + PS1="$(__atomic_ps1)" PS2="$(__atomic_ps2)" } diff --git a/themes/barbuk/README.md b/themes/barbuk/README.md index fdc60719..cfff155f 100644 --- a/themes/barbuk/README.md +++ b/themes/barbuk/README.md @@ -84,7 +84,7 @@ chmod 400 /etc/sudoers.d/keepenv ### Clean ```bash - ~ ❯ + ~ ❯ ``` ### Git diff --git a/themes/codeword/README.md b/themes/codeword/README.md index 38201dbf..c0cb8944 100644 --- a/themes/codeword/README.md +++ b/themes/codeword/README.md @@ -4,7 +4,7 @@ Minimal theme overrides from bash_it base theming -## `user@host:path[virt-env][scm] $` +## `user@host:path[virt-env][scm] $` Breakdown of the segments: - **user@host:path** - *convienient for LAN based `ssh` and `scp` tasks* diff --git a/themes/essential/essential.theme.bash b/themes/essential/essential.theme.bash index c0b1a38e..ae988733 100644 --- a/themes/essential/essential.theme.bash +++ b/themes/essential/essential.theme.bash @@ -54,7 +54,7 @@ function _exit-status-prompt() { local -r exit_status_color="${bold_red}" fi - echo -ne "${exit_status_color}" + echo -ne "${exit_status_color}" if [[ "${prompt_string}" -eq 1 ]]; then # $PS1: echo -e " +${normal} " diff --git a/themes/hawaii50/hawaii50.theme.bash b/themes/hawaii50/hawaii50.theme.bash index eaa6b1eb..404088d9 100644 --- a/themes/hawaii50/hawaii50.theme.bash +++ b/themes/hawaii50/hawaii50.theme.bash @@ -1,6 +1,6 @@ #!/usr/bin/env bash # -# This theme was obviously inspired a lot by +# This theme was obviously inspired a lot by # # - Demula theme # @@ -17,8 +17,8 @@ # - configurable directory length # - hg, svn, git detection (I work in all of them) # - virtualenv, rvm + gemsets -# -# Screenshot: http://i.imgur.com/4IAMJ.png +# +# Screenshot: http://i.imgur.com/4IAMJ.png # # by Ryan Kanno # @@ -26,7 +26,7 @@ # # Note: I also am really new to this bash scripting game, so if you see things # that are flat out wrong, or if you think of something neat, just send a pull -# request. This probably only works on a Mac - as some functions are OS +# request. This probably only works on a Mac - as some functions are OS # specific like getting ip, etc. # @@ -88,11 +88,11 @@ function get_ip_info { echo -e "$(ips | sed -e :a -e '$!N;s/\n/${IP_SEPARATOR}/;ta' | sed -e 's/127\.0\.0\.1\${IP_SEPARATOR}//g'), ${myip}" } -# Displays ip prompt +# Displays ip prompt function ip_prompt_info() { if [[ $IP_ENABLED == 1 ]]; then echo -e " ${DEFAULT_COLOR}(${IP_COLOR}$(get_ip_info)${DEFAULT_COLOR})" - fi + fi } # Displays virtual info prompt (virtualenv/rvm) @@ -165,10 +165,10 @@ function svn_prompt_info() { echo -e "$prefix${REF_COLOR}$ref${DEFAULT_COLOR}:$revision$state$suffix" } -# Displays last X characters of pwd +# Displays last X characters of pwd function limited_pwd() { - # Replace $HOME with ~ if possible + # Replace $HOME with ~ if possible RELATIVE_PWD=${PWD/#$HOME/\~} local offset=$((${#RELATIVE_PWD}-$MAX_PWD_LENGTH)) diff --git a/themes/n0qorg/n0qorg.theme.bash b/themes/n0qorg/n0qorg.theme.bash index 291e4518..12952913 100644 --- a/themes/n0qorg/n0qorg.theme.bash +++ b/themes/n0qorg/n0qorg.theme.bash @@ -19,7 +19,7 @@ GIT_THEME_PROMPT_PREFIX="${bold_blue}(${bold_white}" GIT_THEME_PROMPT_SUFFIX="${bold_blue})" ## alternate chars -# +# SCM_THEME_PROMPT_DIRTY="*" SCM_THEME_PROMPT_CLEAN="" SCM_THEME_PROMPT_PREFIX="(" diff --git a/themes/parrot/parrot.theme.bash b/themes/parrot/parrot.theme.bash index afc8dd53..815aa952 100644 --- a/themes/parrot/parrot.theme.bash +++ b/themes/parrot/parrot.theme.bash @@ -28,7 +28,7 @@ function prompt() { if [ "$color_prompt" = yes ]; then PS1="\[\033[0;31m\]\342\224\214\342\224\200\$([[ \$? != 0 ]] && echo \"[\[\033[0;31m\]\342\234\227\[\033[0;37m\]]\342\224\200\")[$(if [[ ${EUID} == 0 ]]; then echo '\[\033[01;31m\]root\[\033[01;33m\]@\[\033[01;96m\]\h'; else echo '\[\033[0;39m\]\u\[\033[01;33m\]@\[\033[01;96m\]\h'; fi)\[\033[0;31m\]]\342\224\200[\[\033[0;32m\]\w\[\033[0;31m\]]\n\[\033[0;31m\]\342\224\224\342\224\200\342\224\200\342\225\274 \[\033[0m\]\[\e[01;33m\]$(parse_git_branch) $\[\e[0m\] " - + else PS1='┌──[\u@\h]─[\w]\n└──╼ $(parse_git_branch_no_color) $ ' fi diff --git a/themes/powerline-multiline/README.md b/themes/powerline-multiline/README.md index f4a1fab8..da66d4ef 100644 --- a/themes/powerline-multiline/README.md +++ b/themes/powerline-multiline/README.md @@ -66,7 +66,7 @@ The contents of both prompt sides can be "reordered", all the "segments" (every and `conda` supported) * `ruby` - Current ruby version if using `rvm` * `node` - Current node version (only `nvm` is supported) -* `scm` - Version control information, `git` +* `scm` - Version control information, `git` * `terraform` - Current terraform workspace * `user_info` - Current user * `wd` - Working directory, like `cwd` but doesn't show the full folder diff --git a/themes/pure/pure.theme.bash b/themes/pure/pure.theme.bash index c18e20b2..0be40b5a 100644 --- a/themes/pure/pure.theme.bash +++ b/themes/pure/pure.theme.bash @@ -17,13 +17,13 @@ VIRTUALENV_THEME_PROMPT_SUFFIX=")" # export LS_COLORS='no=00:fi=00:di=01;34:ln=00;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=41;33;01:ex=00;32:*.cmd=00;32:*.exe=01;32:*.com=01;32:*.bat=01;32:*.btm=01;32:*.dll=01;32:*.tar=00;31:*.tbz=00;31:*.tgz=00;31:*.rpm=00;31:*.deb=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.lzma=00;31:*.zip=00;31:*.zoo=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.tb2=00;31:*.tz2=00;31:*.tbz2=00;31:*.avi=01;35:*.bmp=01;35:*.fli=01;35:*.gif=01;35:*.jpg=01;35:*.jpeg=01;35:*.mng=01;35:*.mov=01;35:*.mpg=01;35:*.pcx=01;35:*.pbm=01;35:*.pgm=01;35:*.png=01;35:*.ppm=01;35:*.tga=01;35:*.tif=01;35:*.xbm=01;35:*.xpm=01;35:*.dl=01;35:*.gl=01;35:*.wmv=01;35:*.aiff=00;32:*.au=00;32:*.mid=00;32:*.mp3=00;32:*.ogg=00;32:*.voc=00;32:*.wav=00;32:' scm_prompt() { - CHAR=$(scm_char) - if [ $CHAR = $SCM_NONE_CHAR ] - then + CHAR=$(scm_char) + if [ $CHAR = $SCM_NONE_CHAR ] + then return - else + else echo "[$(scm_char)$(scm_prompt_info)]" - fi + fi } pure_prompt() { diff --git a/themes/ramses/ramses.theme.bash b/themes/ramses/ramses.theme.bash index 83ab810f..7795cf75 100644 --- a/themes/ramses/ramses.theme.bash +++ b/themes/ramses/ramses.theme.bash @@ -49,7 +49,7 @@ modern_scm_prompt() { # show chroot if exist chroot(){ if [ -n "$debian_chroot" ] - then + then my_ps_chroot="${bold_cyan}$debian_chroot${normal}"; echo "($my_ps_chroot)"; fi @@ -63,7 +63,7 @@ my_ve(){ my_ps_ve="${bold_purple}${CONDA_DEFAULT_ENV}${normal}"; echo "($my_ps_ve)"; elif [ -n "$VIRTUAL_ENV" ] - then + then my_ps_ve="${bold_purple}$ve${normal}"; echo "($my_ps_ve)"; fi @@ -75,7 +75,7 @@ prompt() { my_ps_host="${green}\h${normal}"; # yes, these are the the same for now ... my_ps_host_root="${green}\h${normal}"; - + my_ps_user="${bold_green}\u${normal}" my_ps_root="${bold_red}\u${normal}"; diff --git a/themes/sirup/sirup.theme.bash b/themes/sirup/sirup.theme.bash index 38fcab41..235de018 100644 --- a/themes/sirup/sirup.theme.bash +++ b/themes/sirup/sirup.theme.bash @@ -13,7 +13,7 @@ function rvm_version_prompt { [ "$full" != "" ] && echo "$full" } - + function prompt_command() { # Check http://github.com/Sirupsen/dotfiles for screenshot PS1="$blue\W/$bold_blue$(rvm_version_prompt)$bold_green$(__git_ps1 " (%s)") ${normal}$ " diff --git a/themes/zork/zork.theme.bash b/themes/zork/zork.theme.bash index 905d655b..b5872314 100644 --- a/themes/zork/zork.theme.bash +++ b/themes/zork/zork.theme.bash @@ -49,7 +49,7 @@ modern_scm_prompt() { # show chroot if exist chroot(){ if [ -n "$debian_chroot" ] - then + then my_ps_chroot="${bold_cyan}$debian_chroot${normal}"; echo "($my_ps_chroot)"; fi @@ -63,7 +63,7 @@ my_ve(){ my_ps_ve="${bold_purple}${CONDA_DEFAULT_ENV}${normal}"; echo "($my_ps_ve)"; elif [ -n "$VIRTUAL_ENV" ] - then + then my_ps_ve="${bold_purple}$ve${normal}"; echo "($my_ps_ve)"; fi @@ -75,7 +75,7 @@ prompt() { my_ps_host="${green}\h${normal}"; # yes, these are the the same for now ... my_ps_host_root="${green}\h${normal}"; - + my_ps_user="${bold_green}\u${normal}" my_ps_root="${bold_red}\u${normal}";