Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
oh-my-zsh
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
github
oh-my-zsh
Commits
c2e3a410
Commit
c2e3a410
authored
Oct 03, 2016
by
Marc Cornellà
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix style of theme-and-appearance.zsh
parent
6304a789
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
17 deletions
+10
-17
theme-and-appearance.zsh
lib/theme-and-appearance.zsh
+10
-17
No files found.
lib/theme-and-appearance.zsh
View file @
c2e3a410
# ls colors
# ls colors
autoload
-U
colors
&&
colors
autoload
-U
colors
&&
colors
export
LSCOLORS
=
"Gxfxcxdxbxegedabagacad"
# Enable ls colors
# Enable ls colors
if
[
"
$DISABLE_LS_COLORS
"
!=
"true"
]
export
LSCOLORS
=
"Gxfxcxdxbxegedabagacad"
then
# Find the option for using colors in ls, depending on the version: GNU or BSD
if
[[
"
$DISABLE_LS_COLORS
"
!=
"true"
]]
;
then
# Find the option for using colors in ls, depending on the version
if
[[
"
$(
uname
-s
)
"
==
"NetBSD"
]]
;
then
if
[[
"
$(
uname
-s
)
"
==
"NetBSD"
]]
;
then
# On NetBSD, test if "gls" (GNU ls) is installed (this one supports colors);
# On NetBSD, test if "gls" (GNU ls) is installed (this one supports colors);
# otherwise, leave ls as is, because NetBSD's ls doesn't support -G
# otherwise, leave ls as is, because NetBSD's ls doesn't support -G
gls
--color
-d
.
&>/dev/null
2>&1
&&
alias ls
=
'gls --color=tty'
gls
--color
-d
.
&>/dev/null
&&
alias ls
=
'gls --color=tty'
elif
[[
"
$(
uname
-s
)
"
==
"OpenBSD"
]]
;
then
elif
[[
"
$(
uname
-s
)
"
==
"OpenBSD"
]]
;
then
# On OpenBSD, "gls" (ls from GNU coreutils) and "colorls" (ls from base,
# On OpenBSD, "gls" (ls from GNU coreutils) and "colorls" (ls from base,
# with color and multibyte support) are available from ports. "colorls"
# with color and multibyte support) are available from ports. "colorls"
# will be installed on purpose and can't be pulled in by installing
# will be installed on purpose and can't be pulled in by installing
# coreutils, so prefer it to "gls".
# coreutils, so prefer it to "gls".
gls
--color
-d
.
&>/dev/null
2>&1
&&
alias ls
=
'gls --color=tty'
gls
--color
-d
.
&>/dev/null
&&
alias ls
=
'gls --color=tty'
colorls
-G
-d
.
&>/dev/null
2>&1
&&
alias ls
=
'colorls -G'
colorls
-G
-d
.
&>/dev/null
&&
alias ls
=
'colorls -G'
else
else
# For GNU ls, we use the default ls color theme. They can later be overwritten by themes.
# For GNU ls, we use the default ls color theme. They can later be overwritten by themes.
if
[[
-z
"
$LS_COLORS
"
]]
;
then
if
[[
-z
"
$LS_COLORS
"
]]
;
then
((
$+
commands[dircolors]
))
&&
eval
"
$(
dircolors
-b
)
"
((
$+
commands[dircolors]
))
&&
eval
"
$(
dircolors
-b
)
"
fi
fi
ls
--color
-d
.
&>/dev/null
2>&1
&&
alias ls
=
'ls --color=tty'
||
alias ls
=
'ls -G'
ls
--color
-d
.
&>/dev/null
&&
alias ls
=
'ls --color=tty'
||
alias ls
=
'ls -G'
fi
fi
fi
fi
setopt auto_cd
setopt auto_cd
setopt multios
setopt multios
setopt prompt_subst
if
[[
x
$WINDOW
!=
x
]]
[[
-n
"
$WINDOW
"
]]
&&
SCREEN_NO
=
"%B
$WINDOW
%b "
||
SCREEN_NO
=
""
then
SCREEN_NO
=
"%B
$WINDOW
%b "
else
SCREEN_NO
=
""
fi
# Apply theming defaults
# Apply theming defaults
PS1
=
"%n@%m:%~%# "
PS1
=
"%n@%m:%~%# "
...
@@ -45,6 +41,3 @@ ZSH_THEME_GIT_PROMPT_PREFIX="git:(" # Prefix at the very beginning of th
...
@@ -45,6 +41,3 @@ ZSH_THEME_GIT_PROMPT_PREFIX="git:(" # Prefix at the very beginning of th
ZSH_THEME_GIT_PROMPT_SUFFIX
=
")"
# At the very end of the prompt
ZSH_THEME_GIT_PROMPT_SUFFIX
=
")"
# At the very end of the prompt
ZSH_THEME_GIT_PROMPT_DIRTY
=
"*"
# Text to display if the branch is dirty
ZSH_THEME_GIT_PROMPT_DIRTY
=
"*"
# Text to display if the branch is dirty
ZSH_THEME_GIT_PROMPT_CLEAN
=
""
# Text to display if the branch is clean
ZSH_THEME_GIT_PROMPT_CLEAN
=
""
# Text to display if the branch is clean
# Setup the prompt with pretty colors
setopt prompt_subst
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment