Removed trailing whitespaces

This commit is contained in:
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

@@ -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)"
}

View File

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

View File

@@ -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*

View File

@@ -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} "

View File

@@ -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 <ryankanno@localkinegrinds.com>
#
@@ -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))

View File

@@ -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="("

View File

@@ -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

View File

@@ -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

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:'
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() {

View File

@@ -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}";

View File

@@ -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}$ "

View File

@@ -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}";