Removed trailing whitespaces

pull/1687/head
Ira Abramov 2020-03-10 10:16:02 +02:00 committed by Noah Gorny
parent 3f318914fd
commit c42e3e8b21
28 changed files with 140 additions and 146 deletions

View File

@ -7,7 +7,7 @@ case $OSTYPE in
[[ $XCLIP ]] && \ [[ $XCLIP ]] && \
alias pbcopy="$XCLIP -selection clipboard" && \ alias pbcopy="$XCLIP -selection clipboard" && \
alias pbpaste="$XCLIP -selection clipboard -o" alias pbpaste="$XCLIP -selection clipboard -o"
;; ;;
esac esac
# to use it just install xclip on your distribution and it would work like: # to use it just install xclip on your distribution and it would work like:

View File

@ -6,7 +6,7 @@ _installcomp() {
then then
REMOTE_GEMS=( $(gem list --remote --no-versions | tr '\n' ' ') ) REMOTE_GEMS=( $(gem list --remote --no-versions | tr '\n' ' ') )
fi fi
local cur=${COMP_WORDS[COMP_CWORD]} local cur=${COMP_WORDS[COMP_CWORD]}
COMPREPLY=( $(compgen -W "${REMOTE_GEMS[*]}" -- $cur) ) COMPREPLY=( $(compgen -W "${REMOTE_GEMS[*]}" -- $cur) )
} }
@ -16,7 +16,7 @@ _uninstallcomp() {
then then
LOCAL_GEMS=( $(gem list --no-versions | sed 's/\*\*\* LOCAL GEMS \*\*\*//' | tr '\n' ' ') ) LOCAL_GEMS=( $(gem list --no-versions | sed 's/\*\*\* LOCAL GEMS \*\*\*//' | tr '\n' ' ') )
fi fi
local cur=${COMP_WORDS[COMP_CWORD]} local cur=${COMP_WORDS[COMP_CWORD]}
COMPREPLY=( $(compgen -W "${LOCAL_GEMS[*]}" -- $cur) ) COMPREPLY=( $(compgen -W "${LOCAL_GEMS[*]}" -- $cur) )
} }

View File

@ -2,47 +2,47 @@
# #
# git-flow-completion # git-flow-completion
# =================== # ===================
# #
# Bash completion support for [git-flow](http://github.com/nvie/gitflow) # Bash completion support for [git-flow](http://github.com/nvie/gitflow)
# #
# The contained completion routines provide support for completing: # The contained completion routines provide support for completing:
# #
# * git-flow init and version # * git-flow init and version
# * feature, hotfix and release branches # * feature, hotfix and release branches
# * remote feature branch names (for `git-flow feature track`) # * remote feature branch names (for `git-flow feature track`)
# #
# #
# Installation # Installation
# ------------ # ------------
# #
# To achieve git-flow completion nirvana: # To achieve git-flow completion nirvana:
# #
# 0. Install git-completion. # 0. Install git-completion.
# #
# 1. Install this file. Either: # 1. Install this file. Either:
# #
# a. Place it in a `bash-completion.d` folder: # a. Place it in a `bash-completion.d` folder:
# #
# * /etc/bash-completion.d # * /etc/bash-completion.d
# * /usr/local/etc/bash-completion.d # * /usr/local/etc/bash-completion.d
# * ~/bash-completion.d # * ~/bash-completion.d
# #
# b. Or, copy it somewhere (e.g. ~/.git-flow-completion.sh) and put the following line in # b. Or, copy it somewhere (e.g. ~/.git-flow-completion.sh) and put the following line in
# your .bashrc: # your .bashrc:
# #
# source ~/.git-flow-completion.sh # 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 # 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: # $command case in _git:
# #
# flow) _git_flow ;; # flow) _git_flow ;;
# #
# #
# The Fine Print # The Fine Print
# -------------- # --------------
# #
# Copyright (c) 2010 [Justin Hileman](http://justinhileman.com) # Copyright (c) 2010 [Justin Hileman](http://justinhileman.com)
# #
# Distributed under the [MIT License](http://creativecommons.org/licenses/MIT/) # Distributed under the [MIT License](http://creativecommons.org/licenses/MIT/)
_git_flow () _git_flow ()
@ -128,7 +128,7 @@ __git_flow_release ()
__gitcomp "$subcommands" __gitcomp "$subcommands"
return return
fi fi
case "$subcommand" in case "$subcommand" in
finish) finish)
__gitcomp "$(__git_flow_list_releases)" __gitcomp "$(__git_flow_list_releases)"
@ -174,4 +174,4 @@ __git_flow_list_hotfixes ()
# temporarily wrap __git_find_on_cmdline() for backwards compatibility # temporarily wrap __git_find_on_cmdline() for backwards compatibility
if [ -z "`type -t __git_find_subcommand`" ]; then if [ -z "`type -t __git_find_subcommand`" ]; then
alias __git_find_subcommand=__git_find_on_cmdline alias __git_find_subcommand=__git_find_on_cmdline
fi fi

View File

@ -14,17 +14,17 @@ _serverProfiles(){
# assume is domain.sh # assume is domain.sh
serverdir="../domain/configuration/" serverdir="../domain/configuration/"
fi fi
for i in ${!COMP_WORDS[*]} for i in ${!COMP_WORDS[*]}
do do
if [[ "${COMP_WORDS[i]}" == "-Djboss.server.base.dir" || "${COMP_WORDS[i]}" == "-Djboss.domain.base.dir" ]]; then if [[ "${COMP_WORDS[i]}" == "-Djboss.server.base.dir" || "${COMP_WORDS[i]}" == "-Djboss.domain.base.dir" ]]; then
serverdir="${COMP_WORDS[i+2]}/configuration" serverdir="${COMP_WORDS[i+2]}/configuration"
fi fi
done done
if [ -d "${serverdir}" ] if [ -d "${serverdir}" ]
then then
IFS=$'\n' tmp="$(ls "${serverdir}" | grep xml)" IFS=$'\n' tmp="$(ls "${serverdir}" | grep xml)"
local fls="${tmp[@]// /\ }" local fls="${tmp[@]// /\ }"
unset IFS unset IFS
@ -42,13 +42,13 @@ _bindingAddress(){
} }
_jboss(){ _jboss(){
local cur prev words cword local cur prev words cword
COMPREPLY=() COMPREPLY=()
_get_comp_words_by_ref -n = cur prev words cword _get_comp_words_by_ref -n = cur prev words cword
case $cur in case $cur in
-Djboss.socket.binding.port-offset=*) -Djboss.socket.binding.port-offset=*)
cur=${cur#*=} cur=${cur#*=}
#static list of common bindings sets #static list of common bindings sets
@ -70,13 +70,13 @@ _jboss(){
COMPREPLY=( $(compgen -W "${booleans}" -- ${cur}) ) COMPREPLY=( $(compgen -W "${booleans}" -- ${cur}) )
return 0 return 0
;; ;;
-Djboss.server.base.dir=*|-Djboss.home.dir=*|-Djboss.domain.base.dir=*) -Djboss.server.base.dir=*|-Djboss.home.dir=*|-Djboss.domain.base.dir=*)
cur=${cur#*=} cur=${cur#*=}
_filedir -d _filedir -d
return 0 return 0
;; ;;
-Djboss.domain.master.address=*|-Djboss.bind.address*=*) -Djboss.domain.master.address=*|-Djboss.bind.address*=*)
cur=${cur#*=} cur=${cur#*=}
_bindingAddress _bindingAddress
@ -85,8 +85,8 @@ _jboss(){
--server-config=*|-c=|--host-config=*) --server-config=*|-c=|--host-config=*)
cur=${cur#*=} cur=${cur#*=}
_serverProfiles _serverProfiles
return 0 return 0
esac esac
@ -110,14 +110,14 @@ _jboss(){
;; ;;
esac esac
# *** from jboss5 ******************** # *** 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 # *** -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 # standard commands for standalone and domain mode
local commandsWithoutEqualSign='-b -bmanagement -bunsecure -bpublic --admin-only -h -help -u -version -V -v' 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' 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* ]] if [[ $COMP_WORDS == *standalone.sh* ]]
then then
commandsWithoutEqualSign="${commandsWithoutEqualSign} -c" commandsWithoutEqualSign="${commandsWithoutEqualSign} -c"
@ -127,15 +127,15 @@ _jboss(){
commandsWithoutEqualSign="${commandsWithoutEqualSign} --backup --cached-dc" commandsWithoutEqualSign="${commandsWithoutEqualSign} --backup --cached-dc"
commandsWithEqualSign="${commandsWithEqualSign} -Djboss.domain.master.address --host-config -Djboss.domain.master.port -Djboss.domain.base.dir " commandsWithEqualSign="${commandsWithEqualSign} -Djboss.domain.master.address --host-config -Djboss.domain.master.port -Djboss.domain.base.dir "
fi fi
COMPREPLY=( $( compgen -W "$commandsWithoutEqualSign" -- "$cur" )
$( compgen -W "$commandsWithEqualSign" -S '=' -- "$cur" ) ) COMPREPLY=( $( compgen -W "$commandsWithoutEqualSign" -- "$cur" )
$( compgen -W "$commandsWithEqualSign" -S '=' -- "$cur" ) )
return 0 return 0
} }
complete -o nospace -F _jboss standalone.sh complete -o nospace -F _jboss standalone.sh
complete -o nospace -F _jboss domain.sh complete -o nospace -F _jboss domain.sh

View File

@ -10,7 +10,6 @@ if command -v laravel > /dev/null; then
fi fi
done done
} }
complete -F __laravel_completion laravel complete -F __laravel_completion laravel
fi fi

View File

@ -13,7 +13,7 @@
_salt_get_grains(){ _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' salt-call --out=txt -- grains.ls | sed 's/^.*\[//' | tr -d ",']" |sed 's:\([a-z0-9]\) :\1\: :g'
else else
salt '*' --timeout 2 --out=txt -- grains.ls | sed 's/^.*\[//' | tr -d ",']" |sed 's:\([a-z0-9]\) :\1\: :g' 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(){ _salt_get_grain_values(){
if [ "$1" = 'local' ] ; then 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 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 fi
} }
_salt(){ _salt(){
local cur prev opts _salt_grains _salt_coms pprev ppprev local cur prev opts _salt_grains _salt_coms pprev ppprev
COMPREPLY=() COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}" cur="${COMP_WORDS[COMP_CWORD]}"
prev="${COMP_WORDS[COMP_CWORD-1]}" prev="${COMP_WORDS[COMP_CWORD-1]}"
@ -58,11 +58,11 @@ _salt(){
case "${pprev}" in case "${pprev}" in
-G|--grain|--grain-pcre) -G|--grain|--grain-pcre)
if [ "${cur}" = ":" ]; then if [ "${cur}" = ":" ]; then
COMPREPLY=($(compgen -W "`_salt_get_grain_values ${prev}`" )) COMPREPLY=($(compgen -W "`_salt_get_grain_values ${prev}`" ))
return 0 return 0
fi fi
;; ;;
esac esac
case "${ppprev}" in case "${ppprev}" in
-G|--grain|--grain-pcre) -G|--grain|--grain-pcre)
if [ "${prev}" = ":" ]; then if [ "${prev}" = ":" ]; then
@ -70,17 +70,17 @@ _salt(){
return 0 return 0
fi fi
;; ;;
esac esac
if [ "${cur}" = "=" ] && [[ "${prev}" == --* ]]; then if [ "${cur}" = "=" ] && [[ "${prev}" == --* ]]; then
cur="" cur=""
fi fi
if [ "${prev}" = "=" ] && [[ "${pprev}" == --* ]]; then if [ "${prev}" = "=" ] && [[ "${pprev}" == --* ]]; then
prev="${pprev}" prev="${pprev}"
fi fi
case "${prev}" in case "${prev}" in
-c|--config) -c|--config)
COMPREPLY=($(compgen -f -- ${cur})) COMPREPLY=($(compgen -f -- ${cur}))
return 0 return 0
@ -89,12 +89,12 @@ _salt(){
COMPREPLY=($(compgen -W "\'*\' ${opts} `salt-key --no-color -l acc`" -- ${cur})) COMPREPLY=($(compgen -W "\'*\' ${opts} `salt-key --no-color -l acc`" -- ${cur}))
return 0 return 0
;; ;;
-E|--pcre) -E|--pcre)
COMPREPLY=($(compgen -W "`salt-key --no-color -l acc`" -- ${cur})) COMPREPLY=($(compgen -W "`salt-key --no-color -l acc`" -- ${cur}))
return 0 return 0
;; ;;
-G|--grain|--grain-pcre) -G|--grain|--grain-pcre)
COMPREPLY=($(compgen -W "$(_salt_get_grains)" -- ${cur})) COMPREPLY=($(compgen -W "$(_salt_get_grains)" -- ${cur}))
return 0 return 0
;; ;;
-C|--compound) -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")) 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 return 0
;; ;;
-N|--nodegroup) -N|--nodegroup)
MASTER_CONFIG='/etc/salt/master' 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})) 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 return 0
;; ;;
esac esac
@ -133,8 +133,8 @@ _saltkey(){
prev="${COMP_WORDS[COMP_CWORD-1]}" prev="${COMP_WORDS[COMP_CWORD-1]}"
opts="-c --config-dir= -h --help --version --versions-report -q --quiet \ opts="-c --config-dir= -h --help --version --versions-report -q --quiet \
-y --yes --gen-keys= --gen-keys-dir= --keysize= --key-logfile= \ -y --yes --gen-keys= --gen-keys-dir= --keysize= --key-logfile= \
-l --list= -L --list-all -a --accept= -A --accept-all \ -l --list= -L --list-all -a --accept= -A --accept-all \
-r --reject= -R --reject-all -p --print= -P --print-all \ -r --reject= -R --reject-all -p --print= -P --print-all \
-d --delete= -D --delete-all -f --finger= -F --finger-all \ -d --delete= -D --delete-all -f --finger= -F --finger-all \
--out=pprint --out=yaml --out=overstatestage --out=json --out=raw \ --out=pprint --out=yaml --out=overstatestage --out=json --out=raw \
--out=highstate --out=key --out=txt --no-color --out-indent= " --out=highstate --out=key --out=txt --no-color --out-indent= "
@ -150,13 +150,13 @@ _saltkey(){
fi fi
if [ "${cur}" = "=" ] && [[ "${prev}" == --* ]]; then if [ "${cur}" = "=" ] && [[ "${prev}" == --* ]]; then
cur="" cur=""
fi fi
if [ "${prev}" = "=" ] && [[ "${pprev}" == --* ]]; then if [ "${prev}" = "=" ] && [[ "${pprev}" == --* ]]; then
prev="${pprev}" prev="${pprev}"
fi fi
case "${prev}" in case "${prev}" in
-a|--accept) -a|--accept)
COMPREPLY=($(compgen -W "$(salt-key -l un --no-color; salt-key -l rej --no-color)" -- ${cur})) COMPREPLY=($(compgen -W "$(salt-key -l un --no-color; salt-key -l rej --no-color)" -- ${cur}))
return 0 return 0
@ -177,7 +177,7 @@ _saltkey(){
COMPREPLY=($(compgen -W "2048 3072 4096 5120 6144" -- ${cur})) COMPREPLY=($(compgen -W "2048 3072 4096 5120 6144" -- ${cur}))
return 0 return 0
;; ;;
--gen-keys) --gen-keys)
return 0 return 0
;; ;;
--gen-keys-dir) --gen-keys-dir)
@ -221,14 +221,14 @@ _saltcall(){
COMPREPLY=($(compgen -W "${opts}" -- ${cur})) COMPREPLY=($(compgen -W "${opts}" -- ${cur}))
return 0 return 0
fi fi
if [ "${cur}" = "=" ] && [[ ${prev} == --* ]]; then if [ "${cur}" = "=" ] && [[ ${prev} == --* ]]; then
cur="" cur=""
fi fi
if [ "${prev}" = "=" ] && [[ ${pprev} == --* ]]; then if [ "${prev}" = "=" ] && [[ ${pprev} == --* ]]; then
prev="${pprev}" prev="${pprev}"
fi fi
case ${prev} in case ${prev} in
-m|--module-dirs) -m|--module-dirs)
COMPREPLY=( $(compgen -d ${cur} )) COMPREPLY=( $(compgen -d ${cur} ))
@ -262,7 +262,7 @@ _saltcp(){
prev="${COMP_WORDS[COMP_CWORD-1]}" prev="${COMP_WORDS[COMP_CWORD-1]}"
opts="-t --timeout= -s --static -b --batch= --batch-size= \ opts="-t --timeout= -s --static -b --batch= --batch-size= \
-h --help --version --versions-report -c --config-dir= \ -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 \ -R --range -C --compound -I --pillar \
--out=pprint --out=yaml --out=overstatestage --out=json --out=raw \ --out=pprint --out=yaml --out=overstatestage --out=json --out=raw \
--out=highstate --out=key --out=txt --no-color --out-indent= " --out=highstate --out=key --out=txt --no-color --out-indent= "
@ -270,19 +270,19 @@ _saltcp(){
COMPREPLY=($(compgen -W "${opts}" -- ${cur})) COMPREPLY=($(compgen -W "${opts}" -- ${cur}))
return 0 return 0
fi fi
if [ "${cur}" = "=" ] && [[ "${prev}" == --* ]]; then if [ "${cur}" = "=" ] && [[ "${prev}" == --* ]]; then
cur="" cur=""
fi fi
if [ "${prev}" = "=" ] && [[ "${pprev}" == --* ]]; then if [ "${prev}" = "=" ] && [[ "${pprev}" == --* ]]; then
prev=${pprev} prev=${pprev}
fi fi
case ${prev} in case ${prev} in
salt-cp) salt-cp)
COMPREPLY=($(compgen -W "${opts} `salt-key -l acc --no-color`" -- ${cur})) COMPREPLY=($(compgen -W "${opts} `salt-key -l acc --no-color`" -- ${cur}))
return 0 return 0
;; ;;
-t|--timeout) -t|--timeout)
# those numbers are just a hint # 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} )) 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 return 0
;; ;;
-G|--grain|--grain-pcre) -G|--grain|--grain-pcre)
COMPREPLY=($(compgen -W "$(_salt_get_grains)" -- ${cur})) COMPREPLY=($(compgen -W "$(_salt_get_grains)" -- ${cur}))
return 0 return 0
;; ;;
# FIXME # FIXME
@ -320,10 +320,9 @@ _saltcp(){
return 0 return 0
;; ;;
esac esac
# default is using opts: # default is using opts:
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
} }
complete -F _saltcp salt-cp complete -F _saltcp salt-cp

View File

@ -4,7 +4,7 @@
# | # |
# Thanks to Alexander Korznikov | # Thanks to Alexander Korznikov |
# http://www.korznikov.com/2014/12/bash-tab-completion-for-awesome-tool.html | # http://www.korznikov.com/2014/12/bash-tab-completion-for-awesome-tool.html |
# | # |
# ---------------------------------------------------------------------------+ # ---------------------------------------------------------------------------+
if command -v sqlmap > /dev/null; then if command -v sqlmap > /dev/null; then
@ -18,7 +18,7 @@ if command -v sqlmap > /dev/null; then
prev=$(_get_pword) prev=$(_get_pword)
case $prev in case $prev in
# List directory content # List directory content
--tamper) --tamper)
COMPREPLY=( $( compgen -W "$tamper" -- "$cur" ) ) COMPREPLY=( $( compgen -W "$tamper" -- "$cur" ) )
@ -108,7 +108,7 @@ if command -v sqlmap > /dev/null; then
-z --alert --answers --beep --check-waf --cleanup \ -z --alert --answers --beep --check-waf --cleanup \
--dependencies --disable-coloring --gpage --identify-waf \ --dependencies --disable-coloring --gpage --identify-waf \
--mobile --page-rank --purge-output --smart \ --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 # this removes any options from the list of completions that have
# already been specified somewhere on the command line, as long as # already been specified somewhere on the command line, as long as
# these options can only be used once (in a word, "options", in # these options can only be used once (in a word, "options", in
@ -155,7 +155,7 @@ if command -v sqlmap > /dev/null; then
done done
printf '%s ' "${COMPREPLY[@]}") <<<"${COMP_WORDS[@]}" printf '%s ' "${COMPREPLY[@]}") <<<"${COMP_WORDS[@]}"
) ) ) )
# else # else
# _filedir bat # _filedir bat
fi fi

View File

@ -13,8 +13,8 @@ _sshcomplete() {
# parse all defined hosts from .ssh/config and files included there # parse all defined hosts from .ssh/config and files included there
for fl in "$HOME/.ssh/config" \ for fl in "$HOME/.ssh/config" \
$(grep "^\s*Include" "$HOME/.ssh/config" | $(grep "^\s*Include" "$HOME/.ssh/config" |
awk '{for (i=2; i<=NF; i++) print $i}' | awk '{for (i=2; i<=NF; i++) print $i}' |
sed -Ee "s|^([^/~])|$HOME/.ssh/\1|" -e "s|^~/|$HOME/|") sed -Ee "s|^([^/~])|$HOME/.ssh/\1|" -e "s|^~/|$HOME/|")
do do
if [ -r "$fl" ]; then if [ -r "$fl" ]; then

View File

@ -10,7 +10,7 @@ _contain_cmd()
{ {
local e f local e f
local array1=($1) array2=($2) local array1=($1) array2=($2)
for e in "${array1[@]}" for e in "${array1[@]}"
do do
for f in "${array2[@]}" for f in "${array2[@]}"
@ -80,7 +80,7 @@ _virsh_list_nwfilters()
virsh -q nwfilter-list | cut -d\ -f4 | awk '{print $1}' virsh -q nwfilter-list | cut -d\ -f4 | awk '{print $1}'
} }
_virsh() _virsh()
{ {
local cur prev cmds doms options nets pools cmds_help local cur prev cmds doms options nets pools cmds_help
local flag_all=1 array ret a b ifaces nwfilters files local flag_all=1 array ret a b ifaces nwfilters files

View File

@ -23,16 +23,16 @@ __vboxmanage_startvm() {
__vboxmanage_list() { __vboxmanage_list() {
INPUT=$(vboxmanage list | tr -s '[\[\]\|\n]' ' ' | cut -d' ' -f4-) INPUT=$(vboxmanage list | tr -s '[\[\]\|\n]' ' ' | cut -d' ' -f4-)
PRUNED="" PRUNED=""
if [ "$1" == "long" ]; then if [ "$1" == "long" ]; then
for WORD in $INPUT; do for WORD in $INPUT; do
[ "$WORD" == "-l" ] && continue; [ "$WORD" == "-l" ] && continue;
[ "$WORD" == "--long" ] && continue; [ "$WORD" == "--long" ] && continue;
PRUNED="$PRUNED $WORD" PRUNED="$PRUNED $WORD"
done done
else else
PRUNED=$INPUT PRUNED=$INPUT
fi fi
@ -47,7 +47,7 @@ __vboxmanage_list_vms() {
else else
SEPARATOR=$1 SEPARATOR=$1
fi fi
for VM in $(vboxmanage list vms | cut -d' ' -f1 | tr -d '"'); do for VM in $(vboxmanage list vms | cut -d' ' -f1 | tr -d '"'); do
[ "$VMS" != "" ] && VMS="${VMS}${SEPARATOR}" [ "$VMS" != "" ] && VMS="${VMS}${SEPARATOR}"
VMS="${VMS}${VM}" VMS="${VMS}${VM}"
@ -63,7 +63,7 @@ __vboxmanage_list_runningvms() {
else else
SEPARATOR=$1 SEPARATOR=$1
fi fi
for VM in $(vboxmanage list runningvms | cut -d' ' -f1 | tr -d '"'); do for VM in $(vboxmanage list runningvms | cut -d' ' -f1 | tr -d '"'); do
[ "$VMS" != "" ] && VMS="${VMS}${SEPARATOR}" [ "$VMS" != "" ] && VMS="${VMS}${SEPARATOR}"
VMS="${VMS}${VM}" VMS="${VMS}${VM}"
@ -81,7 +81,7 @@ __vboxmanage_controlvm() {
echo "screenshotpng setcredentials teleport plugcpu unplugcpu" echo "screenshotpng setcredentials teleport plugcpu unplugcpu"
echo "cpuexecutioncap" echo "cpuexecutioncap"
# setlinkstate<1-N> # setlinkstate<1-N>
# nic<1-N> null|nat|bridged|intnet|hostonly|generic # nic<1-N> null|nat|bridged|intnet|hostonly|generic
# [<devicename>] | # [<devicename>] |
# nictrace<1-N> on|off # nictrace<1-N> on|off
@ -136,9 +136,9 @@ __vboxmanage_default() {
done done
(( $MATCH == 1 )) && continue; (( $MATCH == 1 )) && continue;
pruned="$pruned $WORD" pruned="$pruned $WORD"
done done
# COMPREPLY=($(compgen -W "${pruned}" -- ${cur})) # COMPREPLY=($(compgen -W "${pruned}" -- ${cur}))
echo $pruned echo $pruned
return 0 return 0
@ -156,13 +156,13 @@ _vboxmanage() {
# In case current is complete command # In case current is complete command
case $cur in case $cur in
startvm|list|controlvm) startvm|list|controlvm)
COMPREPLY=($(compgen -W "$cur ")) COMPREPLY=($(compgen -W "$cur "))
return 0 return 0
;; ;;
esac esac
case $prev in case $prev in
-v|--version) -v|--version)
return 0 return 0
;; ;;
@ -170,13 +170,13 @@ _vboxmanage() {
-l|--long) -l|--long)
opts=$(__vboxmanage_list "long") opts=$(__vboxmanage_list "long")
COMPREPLY=($(compgen -W "${opts}" -- ${cur})) COMPREPLY=($(compgen -W "${opts}" -- ${cur}))
return 0 return 0
;; ;;
startvm|list) startvm|list)
opts=$(__vboxmanage_$prev) opts=$(__vboxmanage_$prev)
COMPREPLY=($(compgen -W "${opts}" -- ${cur})) COMPREPLY=($(compgen -W "${opts}" -- ${cur}))
return 0 return 0
;; ;;
--type) --type)
COMPREPLY=($(compgen -W "gui headless" -- ${cur})) COMPREPLY=($(compgen -W "gui headless" -- ${cur}))
return 0 return 0
@ -204,7 +204,7 @@ _vboxmanage() {
# echo "previous: $pprev" # echo "previous: $pprev"
case $pprev in case $pprev in
startvm) startvm)
opts="--type" opts="--type"
COMPREPLY=($(compgen -W "${opts}" -- ${cur})) COMPREPLY=($(compgen -W "${opts}" -- ${cur}))
return 0 return 0
;; ;;

View File

@ -10,6 +10,6 @@ if command -v vue > /dev/null; then
fi fi
done done
} }
complete -F __vuejs_completion vue complete -F __vuejs_completion vue
fi fi

View File

@ -10,7 +10,6 @@ if command -v wpscan > /dev/null; then
fi fi
done done
} }
complete -F __wpscan_completion wpscan complete -F __wpscan_completion wpscan
fi fi

View File

@ -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 elif command -v dpkg &>/dev/null && dpkg -s autojump &>/dev/null ; then
. "$(dpkg-query -S autojump.sh | cut -d' ' -f2)" . "$(dpkg-query -S autojump.sh | cut -d' ' -f2)"
elif command -v pacman &>/dev/null && pacman -Q autojump &>/dev/null ; then 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 fi

View File

@ -227,7 +227,7 @@ function gitignore-reload() {
example '$ gitignore-reload' example '$ gitignore-reload'
# The .gitignore file should not be reloaded if there are uncommited changes. # 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 # was stolen with love from https://www.spinics.net/lists/git/msg142043.html
# Begin require_clean_work_tree() # Begin require_clean_work_tree()
@ -273,5 +273,3 @@ function gitignore-reload() {
echo >&2 "Files readded. Commit your new changes now." echo >&2 "Files readded. Commit your new changes now."
fi fi
} }

View File

@ -11,7 +11,7 @@ do
if [ -f "$possible/pg_hba.conf" ] if [ -f "$possible/pg_hba.conf" ]
then then
# echo "PGDATA: $possible" # echo "PGDATA: $possible"
export PGDATA=$possible export PGDATA=$possible
fi fi
done done
@ -23,7 +23,7 @@ function postgres_start {
about 'Starts PostgreSQL server' about 'Starts PostgreSQL server'
group 'postgres' group 'postgres'
echo 'Starting Postgres....'; echo 'Starting Postgres....';
$POSTGRES_BIN/pg_ctl -D $PGDATA -l $PGDATA/logfile start $POSTGRES_BIN/pg_ctl -D $PGDATA -l $PGDATA/logfile start
} }
@ -31,7 +31,7 @@ function postgres_stop {
about 'Stops PostgreSQL server' about 'Stops PostgreSQL server'
group 'postgres' group 'postgres'
echo 'Stopping Postgres....'; echo 'Stopping Postgres....';
$POSTGRES_BIN/pg_ctl -D $PGDATA -l $PGDATA/logfile stop -s -m fast $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' about 'Returns status of PostgreSQL server'
group 'postgres' group 'postgres'
# $POSTGRES_BIN/pg_ctl -D $PGDATA status # $POSTGRES_BIN/pg_ctl -D $PGDATA status
if [[ $(is_postgres_running) == "no server running" ]] if [[ $(is_postgres_running) == "no server running" ]]
then then
echo "Postgres service [STOPPED]" echo "Postgres service [STOPPED]"
@ -58,7 +58,7 @@ function postgres_restart {
about 'Restarts status of PostgreSQL server' about 'Restarts status of PostgreSQL server'
group 'postgres' group 'postgres'
echo 'Restarting Postgres....'; echo 'Restarting Postgres....';
$POSTGRES_BIN/pg_ctl -D $PGDATA restart $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 # tail -500 $PGDATA/pg_log/`ls -Art $PGDATA/pg_log | tail -n 1` | less
# } # }
# #

View File

@ -22,5 +22,5 @@ bashPowerlineInit=$(python -c \
'bindings', \ 'bindings', \
'bash', \ 'bash', \
'powerline.sh'))") 'powerline.sh'))")
[ -e $bashPowerlineInit ] || return [ -e $bashPowerlineInit ] || return
. $bashPowerlineInit . $bashPowerlineInit

View File

@ -73,24 +73,24 @@ ____atomic_top() {
_TOP_RIGHT="" _TOP_RIGHT=""
__TOP_RIGHT_LEN=0 __TOP_RIGHT_LEN=0
__SEG_AT_RIGHT=0 __SEG_AT_RIGHT=0
for seg in ${___ATOMIC_TOP_LEFT}; do for seg in ${___ATOMIC_TOP_LEFT}; do
info="$(___atomic_prompt_"${seg}")" info="$(___atomic_prompt_"${seg}")"
[ -n "${info}" ] && ____atomic_top_left_parse "${info}" [ -n "${info}" ] && ____atomic_top_left_parse "${info}"
done done
___cursor_right="\e[500C" ___cursor_right="\e[500C"
_TOP_LEFT+="${___cursor_right}" _TOP_LEFT+="${___cursor_right}"
for seg in ${___ATOMIC_TOP_RIGHT}; do for seg in ${___ATOMIC_TOP_RIGHT}; do
info="$(___atomic_prompt_"${seg}")" info="$(___atomic_prompt_"${seg}")"
[ -n "${info}" ] && ____atomic_top_right_parse "${info}" [ -n "${info}" ] && ____atomic_top_right_parse "${info}"
done done
[ $__TOP_RIGHT_LEN -gt 0 ] && __TOP_RIGHT_LEN=$(( __TOP_RIGHT_LEN - 0 )) [ $__TOP_RIGHT_LEN -gt 0 ] && __TOP_RIGHT_LEN=$(( __TOP_RIGHT_LEN - 0 ))
___cursor_adjust="\e[${__TOP_RIGHT_LEN}D" ___cursor_adjust="\e[${__TOP_RIGHT_LEN}D"
_TOP_LEFT+="${___cursor_adjust}" _TOP_LEFT+="${___cursor_adjust}"
printf "%s%s" "${_TOP_LEFT}" "${_TOP_RIGHT}" printf "%s%s" "${_TOP_LEFT}" "${_TOP_RIGHT}"
} }
@ -111,7 +111,7 @@ ___atomic_prompt_user_info() {
color=$white color=$white
box="${normal}${LineA}\$([[ \$? != 0 ]] && echo \"${BIWhite}[${IRed}${SX}${BIWhite}]${normal}${Line}\")${Line}${BIWhite}[|${BIWhite}]${normal}${Line}" box="${normal}${LineA}\$([[ \$? != 0 ]] && echo \"${BIWhite}[${IRed}${SX}${BIWhite}]${normal}${Line}\")${Line}${BIWhite}[|${BIWhite}]${normal}${Line}"
info="${IYellow}\u${IRed}@${IGreen}\h" info="${IYellow}\u${IRed}@${IGreen}\h"
printf "%s|%s|%s|%s" "${color}" "${info}" "${white}" "${box}" printf "%s|%s|%s|%s" "${color}" "${info}" "${white}" "${box}"
} }
@ -234,7 +234,7 @@ _atomic_completion() {
return 0 return 0
;; ;;
esac esac
COMPREPLY=( $(compgen -W "${actions}" -- "${cur}") ) COMPREPLY=( $(compgen -W "${actions}" -- "${cur}") )
return 0 return 0
} }
@ -312,7 +312,7 @@ __atomic_ps2() {
_atomic_prompt() { _atomic_prompt() {
exitcode="$?" exitcode="$?"
PS1="$(__atomic_ps1)" PS1="$(__atomic_ps1)"
PS2="$(__atomic_ps2)" PS2="$(__atomic_ps2)"
} }

View File

@ -84,7 +84,7 @@ chmod 400 /etc/sudoers.d/keepenv
### Clean ### Clean
```bash ```bash
~ ~
``` ```
### Git ### Git

View File

@ -4,7 +4,7 @@
Minimal theme overrides from bash_it base theming Minimal theme overrides from bash_it base theming
## `user@host:path[virt-env][scm] $` ## `user@host:path[virt-env][scm] $`
Breakdown of the segments: Breakdown of the segments:
- **user@host:path** - *convienient for LAN based `ssh` and `scp` tasks* - **user@host:path** - *convienient for LAN based `ssh` and `scp` tasks*

View File

@ -54,7 +54,7 @@ function _exit-status-prompt() {
local -r exit_status_color="${bold_red}" local -r exit_status_color="${bold_red}"
fi fi
echo -ne "${exit_status_color}" echo -ne "${exit_status_color}"
if [[ "${prompt_string}" -eq 1 ]]; then if [[ "${prompt_string}" -eq 1 ]]; then
# $PS1: # $PS1:
echo -e " +${normal} " echo -e " +${normal} "

View File

@ -1,6 +1,6 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# #
# This theme was obviously inspired a lot by # This theme was obviously inspired a lot by
# #
# - Demula theme # - Demula theme
# #
@ -17,8 +17,8 @@
# - configurable directory length # - configurable directory length
# - hg, svn, git detection (I work in all of them) # - hg, svn, git detection (I work in all of them)
# - virtualenv, rvm + gemsets # - virtualenv, rvm + gemsets
# #
# Screenshot: http://i.imgur.com/4IAMJ.png # Screenshot: http://i.imgur.com/4IAMJ.png
# #
# by Ryan Kanno <ryankanno@localkinegrinds.com> # by Ryan Kanno <ryankanno@localkinegrinds.com>
# #
@ -26,7 +26,7 @@
# #
# Note: I also am really new to this bash scripting game, so if you see things # 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 # 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. # 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}" 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() { function ip_prompt_info() {
if [[ $IP_ENABLED == 1 ]]; then if [[ $IP_ENABLED == 1 ]]; then
echo -e " ${DEFAULT_COLOR}(${IP_COLOR}$(get_ip_info)${DEFAULT_COLOR})" echo -e " ${DEFAULT_COLOR}(${IP_COLOR}$(get_ip_info)${DEFAULT_COLOR})"
fi fi
} }
# Displays virtual info prompt (virtualenv/rvm) # 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" 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() { function limited_pwd() {
# Replace $HOME with ~ if possible # Replace $HOME with ~ if possible
RELATIVE_PWD=${PWD/#$HOME/\~} RELATIVE_PWD=${PWD/#$HOME/\~}
local offset=$((${#RELATIVE_PWD}-$MAX_PWD_LENGTH)) local offset=$((${#RELATIVE_PWD}-$MAX_PWD_LENGTH))

View File

@ -19,7 +19,7 @@ GIT_THEME_PROMPT_PREFIX="${bold_blue}(${bold_white}"
GIT_THEME_PROMPT_SUFFIX="${bold_blue})" GIT_THEME_PROMPT_SUFFIX="${bold_blue})"
## alternate chars ## alternate chars
# #
SCM_THEME_PROMPT_DIRTY="*" SCM_THEME_PROMPT_DIRTY="*"
SCM_THEME_PROMPT_CLEAN="" SCM_THEME_PROMPT_CLEAN=""
SCM_THEME_PROMPT_PREFIX="(" SCM_THEME_PROMPT_PREFIX="("

View File

@ -28,7 +28,7 @@ function prompt() {
if [ "$color_prompt" = yes ]; then 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\] " 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 else
PS1='┌──[\u@\h]─[\w]\n└──╼ $(parse_git_branch_no_color) $ ' PS1='┌──[\u@\h]─[\w]\n└──╼ $(parse_git_branch_no_color) $ '
fi fi

View File

@ -66,7 +66,7 @@ The contents of both prompt sides can be "reordered", all the "segments" (every
and `conda` supported) and `conda` supported)
* `ruby` - Current ruby version if using `rvm` * `ruby` - Current ruby version if using `rvm`
* `node` - Current node version (only `nvm` is supported) * `node` - Current node version (only `nvm` is supported)
* `scm` - Version control information, `git` * `scm` - Version control information, `git`
* `terraform` - Current terraform workspace * `terraform` - Current terraform workspace
* `user_info` - Current user * `user_info` - Current user
* `wd` - Working directory, like `cwd` but doesn't show the full folder * `wd` - Working directory, like `cwd` but doesn't show the full folder

View File

@ -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:' # 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() { scm_prompt() {
CHAR=$(scm_char) CHAR=$(scm_char)
if [ $CHAR = $SCM_NONE_CHAR ] if [ $CHAR = $SCM_NONE_CHAR ]
then then
return return
else else
echo "[$(scm_char)$(scm_prompt_info)]" echo "[$(scm_char)$(scm_prompt_info)]"
fi fi
} }
pure_prompt() { pure_prompt() {

View File

@ -49,7 +49,7 @@ modern_scm_prompt() {
# show chroot if exist # show chroot if exist
chroot(){ chroot(){
if [ -n "$debian_chroot" ] if [ -n "$debian_chroot" ]
then then
my_ps_chroot="${bold_cyan}$debian_chroot${normal}"; my_ps_chroot="${bold_cyan}$debian_chroot${normal}";
echo "($my_ps_chroot)"; echo "($my_ps_chroot)";
fi fi
@ -63,7 +63,7 @@ my_ve(){
my_ps_ve="${bold_purple}${CONDA_DEFAULT_ENV}${normal}"; my_ps_ve="${bold_purple}${CONDA_DEFAULT_ENV}${normal}";
echo "($my_ps_ve)"; echo "($my_ps_ve)";
elif [ -n "$VIRTUAL_ENV" ] elif [ -n "$VIRTUAL_ENV" ]
then then
my_ps_ve="${bold_purple}$ve${normal}"; my_ps_ve="${bold_purple}$ve${normal}";
echo "($my_ps_ve)"; echo "($my_ps_ve)";
fi fi
@ -75,7 +75,7 @@ prompt() {
my_ps_host="${green}\h${normal}"; my_ps_host="${green}\h${normal}";
# yes, these are the the same for now ... # yes, these are the the same for now ...
my_ps_host_root="${green}\h${normal}"; my_ps_host_root="${green}\h${normal}";
my_ps_user="${bold_green}\u${normal}" my_ps_user="${bold_green}\u${normal}"
my_ps_root="${bold_red}\u${normal}"; my_ps_root="${bold_red}\u${normal}";

View File

@ -13,7 +13,7 @@ function rvm_version_prompt {
[ "$full" != "" ] && echo "$full" [ "$full" != "" ] && echo "$full"
} }
function prompt_command() { function prompt_command() {
# Check http://github.com/Sirupsen/dotfiles for screenshot # Check http://github.com/Sirupsen/dotfiles for screenshot
PS1="$blue\W/$bold_blue$(rvm_version_prompt)$bold_green$(__git_ps1 " (%s)") ${normal}$ " PS1="$blue\W/$bold_blue$(rvm_version_prompt)$bold_green$(__git_ps1 " (%s)") ${normal}$ "

View File

@ -49,7 +49,7 @@ modern_scm_prompt() {
# show chroot if exist # show chroot if exist
chroot(){ chroot(){
if [ -n "$debian_chroot" ] if [ -n "$debian_chroot" ]
then then
my_ps_chroot="${bold_cyan}$debian_chroot${normal}"; my_ps_chroot="${bold_cyan}$debian_chroot${normal}";
echo "($my_ps_chroot)"; echo "($my_ps_chroot)";
fi fi
@ -63,7 +63,7 @@ my_ve(){
my_ps_ve="${bold_purple}${CONDA_DEFAULT_ENV}${normal}"; my_ps_ve="${bold_purple}${CONDA_DEFAULT_ENV}${normal}";
echo "($my_ps_ve)"; echo "($my_ps_ve)";
elif [ -n "$VIRTUAL_ENV" ] elif [ -n "$VIRTUAL_ENV" ]
then then
my_ps_ve="${bold_purple}$ve${normal}"; my_ps_ve="${bold_purple}$ve${normal}";
echo "($my_ps_ve)"; echo "($my_ps_ve)";
fi fi
@ -75,7 +75,7 @@ prompt() {
my_ps_host="${green}\h${normal}"; my_ps_host="${green}\h${normal}";
# yes, these are the the same for now ... # yes, these are the the same for now ...
my_ps_host_root="${green}\h${normal}"; my_ps_host_root="${green}\h${normal}";
my_ps_user="${bold_green}\u${normal}" my_ps_user="${bold_green}\u${normal}"
my_ps_root="${bold_red}\u${normal}"; my_ps_root="${bold_red}\u${normal}";