Skip to content

Commit 2ff6c82

Browse files
Fix spacing issues
Spaces were sometimes used instead of tabs. Signed-off-by: Chauncey Garrett <[email protected]>
1 parent 7ee4ad3 commit 2ff6c82

File tree

1 file changed

+54
-54
lines changed

1 file changed

+54
-54
lines changed

prompt_garrett_setup

Lines changed: 54 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ function prompt_garrett_precmd_notification
127127

128128
#
129129
# PROMPT | prompt_garrett_chpwd
130-
# - a function which is executed whenever the directory is changed
130+
# - a function which is executed whenever the directory is changed
131131
#
132132

133133
function prompt_garrett_chpwd
@@ -136,7 +136,7 @@ function prompt_garrett_chpwd
136136
if is-callable 'dircolors';
137137
then # GNU flavor ls
138138
if zstyle -t ':prezto:module:utility:ls' color
139-
then
139+
then
140140
ls --group-directories-first --color=auto
141141
else
142142
ls -F
@@ -173,29 +173,29 @@ function prompt_garrett_preexec
173173

174174
function prompt_garrett_precmd
175175
{
176-
setopt LOCAL_OPTIONS
177-
unsetopt XTRACE KSH_ARRAYS
176+
setopt LOCAL_OPTIONS
177+
unsetopt XTRACE KSH_ARRAYS
178178

179179
# Show number of background jobs
180180
prompt_garrett_number_jobs="%(1j.${prompt_garrett_color_prompt}J:${cyan}%j .)"
181181

182182
# Format PWD
183-
prompt_garrett_pwd
183+
prompt_garrett_pwd
184184

185185
# Trigger a notification after x time has elapsed
186186
eval prompt_garrett_precmd_notification
187187

188188
# Get ruby info
189189
if (( $+functions[ruby-info] ))
190190
then
191-
ruby-info
192-
fi
191+
ruby-info
192+
fi
193193

194194
# Get git repository info
195-
if (( $+functions[git-info] ))
195+
if (( $+functions[git-info] ))
196196
then
197-
git-info
198-
fi
197+
git-info
198+
fi
199199

200200
#
201201
# Add a line to prompt for visibility
@@ -226,20 +226,20 @@ function prompt_garrett_precmd
226226

227227
#
228228
# PROMPT | prompt_garrett_setup
229-
# - finally, configure the prompt
229+
# - finally, configure the prompt
230230
#
231231

232232
function prompt_garrett_setup
233233
{
234234
# Load necessary modules
235-
setopt LOCAL_OPTIONS
236-
unsetopt XTRACE KSH_ARRAYS
237-
prompt_opts=(cr percent subst)
235+
setopt LOCAL_OPTIONS
236+
unsetopt XTRACE KSH_ARRAYS
237+
prompt_opts=(cr percent subst)
238238

239-
# Add hooks for calling preexec, precmd & chpwd
239+
# Add hooks for calling preexec, precmd & chpwd
240240
autoload -Uz add-zsh-hook
241241
add-zsh-hook preexec prompt_garrett_preexec
242-
add-zsh-hook precmd prompt_garrett_precmd
242+
add-zsh-hook precmd prompt_garrett_precmd
243243
add-zsh-hook chpwd prompt_garrett_chpwd
244244

245245
#
@@ -271,32 +271,32 @@ function prompt_garrett_setup
271271
# set colors
272272
eval prompt_garrett_color_user=${3:-'${red}'}
273273
eval prompt_garrett_color_host=${3:-'${red}'}
274-
eval prompt_garrett_color_prompt=${3:-'${red}'}
274+
eval prompt_garrett_color_prompt=${3:-'${red}'}
275275

276276
# set style
277-
eval prompt_garrett_user='%S${prompt_garrett_color_user}%n%s'
277+
eval prompt_garrett_user='%S${prompt_garrett_color_user}%n%s'
278278
eval prompt_garrett_host='${prompt_garrett_color_host}%m' # hostname up to first . (dot) (use %M for full hostname)
279279
eval prompt_garrett_location='${prompt_garrett_user}${cyan}@${prompt_garrett_host}' # [email protected]
280280

281281
elif [[ -n "$SSH_CLIENT" || -n "$SSH2_CLIENT" ]]
282282
then # on SSH
283283

284284
# set colors
285-
eval prompt_garrett_color_user=${3:-'${green}'}
286-
eval prompt_garrett_color_host=${3:-'${yellow}'}
287-
eval prompt_garrett_color_prompt=${3:-'${yellow}'}
285+
eval prompt_garrett_color_user=${3:-'${green}'}
286+
eval prompt_garrett_color_host=${3:-'${yellow}'}
287+
eval prompt_garrett_color_prompt=${3:-'${yellow}'}
288288

289289
# set style
290-
eval prompt_garrett_user='%S${prompt_garrett_color_user}%n%s'
290+
eval prompt_garrett_user='%S${prompt_garrett_color_user}%n%s'
291291
eval prompt_garrett_host='${prompt_garrett_color_host}%m' # hostname up to first . (dot) (use %M for full hostname)
292292
eval prompt_garrett_location='${prompt_garrett_user}${cyan}@${prompt_garrett_host}' # [email protected]
293293

294294
else # normal user
295295

296296
# set colors
297297
eval prompt_garrett_color_user=${1:-'${green}'}
298-
eval prompt_garrett_color_host=${1:-'${green}'}
299-
eval prompt_garrett_color_prompt=${1:-'${grey}'}
298+
eval prompt_garrett_color_host=${1:-'${green}'}
299+
eval prompt_garrett_color_prompt=${1:-'${grey}'}
300300

301301
# set style
302302
eval prompt_garrett_user=''
@@ -353,29 +353,29 @@ function prompt_garrett_setup
353353
# zstyle ':prezto:module:git:info' verbose 'yes'
354354

355355
# Git prompt info
356-
zstyle ':prezto:module:git:info:branch' format "${cyan} λ${prompt_garrett_color_prompt}:${green}%b"
357-
zstyle ':prezto:module:git:info:remote' format ""
358-
zstyle ':prezto:module:git:info:action' format "${yellow} %s"
359-
zstyle ':prezto:module:git:info:position' format "${red} %p"
356+
zstyle ':prezto:module:git:info:branch' format "${cyan} λ${prompt_garrett_color_prompt}:${green}%b"
357+
zstyle ':prezto:module:git:info:remote' format ""
358+
zstyle ':prezto:module:git:info:action' format "${yellow} %s"
359+
zstyle ':prezto:module:git:info:position' format "${red} %p"
360360

361361
# Git commit SHA
362-
zstyle ':prezto:module:git:info:commit' format "${yellow} %.7c"
362+
zstyle ':prezto:module:git:info:commit' format "${yellow} %.7c"
363363

364364
# Git remote status
365-
zstyle ':prezto:module:git:info:behind' format "${magenta}"
366-
zstyle ':prezto:module:git:info:ahead' format "${magenta}"
365+
zstyle ':prezto:module:git:info:behind' format "${magenta}"
366+
zstyle ':prezto:module:git:info:ahead' format "${magenta}"
367367
zstyle ':prezto:module:git:info:diverged' format "${magenta}"
368-
zstyle ':prezto:module:git:info:stashed' format "${cyan}"
368+
zstyle ':prezto:module:git:info:stashed' format "${cyan}"
369369

370370
# Git local status
371-
zstyle ':prezto:module:git:info:clean' format ""
372-
zstyle ':prezto:module:git:info:dirty' format "${prompt_garrett_color_prompt} |"
373-
zstyle ':prezto:module:git:info:added' format "${green}"
374-
zstyle ':prezto:module:git:info:deleted' format "${red}"
375-
zstyle ':prezto:module:git:info:modified' format "${blue}"
376-
zstyle ':prezto:module:git:info:renamed' format "${magenta}"
377-
zstyle ':prezto:module:git:info:unmerged' format "${yellow}"
378-
zstyle ':prezto:module:git:info:untracked' format "${white}"
371+
zstyle ':prezto:module:git:info:clean' format ""
372+
zstyle ':prezto:module:git:info:dirty' format "${prompt_garrett_color_prompt} |"
373+
zstyle ':prezto:module:git:info:added' format "${green}"
374+
zstyle ':prezto:module:git:info:deleted' format "${red}"
375+
zstyle ':prezto:module:git:info:modified' format "${blue}"
376+
zstyle ':prezto:module:git:info:renamed' format "${magenta}"
377+
zstyle ':prezto:module:git:info:unmerged' format "${yellow}"
378+
zstyle ':prezto:module:git:info:untracked' format "${white}"
379379

380380
# Git prompt styles
381381
zstyle ':prezto:module:git:info:keys' format \
@@ -390,7 +390,7 @@ function prompt_garrett_setup
390390
# %v | ruby version
391391
#
392392

393-
zstyle ':prezto:module:ruby:info:version' format "${yellow}ruby:%v "
393+
zstyle ':prezto:module:ruby:info:version' format "${yellow}ruby:%v "
394394

395395
#
396396
# Vim mode indicator
@@ -399,23 +399,23 @@ function prompt_garrett_setup
399399
zstyle ':prezto:module:editor:info:keymap:primary' format "${red}❱%(?.${prompt_garrett_color_prompt}.${red})❱❱ "
400400
zstyle ':prezto:module:editor:info:keymap:alternate' format "${red}❰%(?.${prompt_garrett_color_prompt}.${red})❰❰ "
401401
# zstyle ':prezto:module:editor:info:keymap:primary:insert' format "${red}I "
402-
zstyle ':prezto:module:editor:info:keymap:primary:overwrite' format "${red}"
403-
zstyle ':prezto:module:editor:info:completing' format "${red}..."
402+
zstyle ':prezto:module:editor:info:keymap:primary:overwrite' format "${red}"
403+
zstyle ':prezto:module:editor:info:completing' format "${red}..."
404404

405405
#
406-
# Use the extended character set, if available
406+
# Use the extended character set, if available
407407
#
408408

409-
typeset -A altchar
410-
set -A altchar ${(s..)terminfo[acsc]}
411-
prompt_garrett_altchar_enable="%{$terminfo[enacs]%}"
412-
prompt_garrett_altchar_enter="%{$terminfo[smacs]%}"
413-
prompt_garrett_altchar_leave="%{$terminfo[rmacs]%}"
414-
prompt_garrett_altchar_padding=${altchar[q]:--}
415-
prompt_garrett_upper_left_corner=${prompt_garrett_altchar_enter}${altchar[l]:--}${altchar[q]:--}${prompt_garrett_altchar_leave}
416-
prompt_garrett_lower_left_corner=${prompt_garrett_altchar_enter}${altchar[m]:--}${altchar[q]:--}${prompt_garrett_altchar_leave}
417-
prompt_garrett_upper_right_corner=${prompt_garrett_altchar_enter}${altchar[q]:--}${altchar[k]:--}${prompt_garrett_altchar_leave}
418-
prompt_garrett_lower_right_corner=${prompt_garrett_altchar_enter}${altchar[q]:--}${altchar[j]:--}${prompt_garrett_altchar_leave}
409+
typeset -A altchar
410+
set -A altchar ${(s..)terminfo[acsc]}
411+
prompt_garrett_altchar_enable="%{$terminfo[enacs]%}"
412+
prompt_garrett_altchar_enter="%{$terminfo[smacs]%}"
413+
prompt_garrett_altchar_leave="%{$terminfo[rmacs]%}"
414+
prompt_garrett_altchar_padding=${altchar[q]:--}
415+
prompt_garrett_upper_left_corner=${prompt_garrett_altchar_enter}${altchar[l]:--}${altchar[q]:--}${prompt_garrett_altchar_leave}
416+
prompt_garrett_lower_left_corner=${prompt_garrett_altchar_enter}${altchar[m]:--}${altchar[q]:--}${prompt_garrett_altchar_leave}
417+
prompt_garrett_upper_right_corner=${prompt_garrett_altchar_enter}${altchar[q]:--}${altchar[k]:--}${prompt_garrett_altchar_leave}
418+
prompt_garrett_lower_right_corner=${prompt_garrett_altchar_enter}${altchar[q]:--}${altchar[j]:--}${prompt_garrett_altchar_leave}
419419

420420
#
421421
# Finally!

0 commit comments

Comments
 (0)