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
7d03ea18
Unverified
Commit
7d03ea18
authored
Dec 16, 2021
by
Marc Cornellà
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: declare variables as global when using `typeset`
Fixes
fb86ec77
parent
fb86ec77
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
8 deletions
+8
-8
dirhistory.plugin.zsh
plugins/dirhistory/dirhistory.plugin.zsh
+2
-2
adben.zsh-theme
themes/adben.zsh-theme
+2
-2
jonathan.zsh-theme
themes/jonathan.zsh-theme
+2
-2
simonoff.zsh-theme
themes/simonoff.zsh-theme
+2
-2
No files found.
plugins/dirhistory/dirhistory.plugin.zsh
View file @
7d03ea18
...
...
@@ -19,14 +19,14 @@ export DIRHISTORY_SIZE=30
# Returns the element if the array was not empty,
# otherwise returns empty string.
function
pop_past
()
{
typeset
$1
=
"
${
dirhistory_past
[
$#dirhistory_past
]
}
"
typeset
-g
$1
=
"
${
dirhistory_past
[
$#dirhistory_past
]
}
"
if
[[
$#dirhistory_past
-gt
0
]]
;
then
dirhistory_past[
$#dirhistory_past
]=()
fi
}
function
pop_future
()
{
typeset
$1
=
"
${
dirhistory_future
[
$#dirhistory_future
]
}
"
typeset
-g
$1
=
"
${
dirhistory_future
[
$#dirhistory_future
]
}
"
if
[[
$#dirhistory_future
-gt
0
]]
;
then
dirhistory_future[
$#dirhistory_future
]=()
fi
...
...
themes/adben.zsh-theme
View file @
7d03ea18
...
...
@@ -32,8 +32,8 @@
########## COLOR ###########
for
COLOR
in
CYAN WHITE YELLOW MAGENTA BLACK BLUE RED DEFAULT GREEN GREY
;
do
typeset
PR_
$COLOR
=
"%b%{
$fg
[
${
(L)COLOR
}
]%}"
typeset
PR_BRIGHT_
$COLOR
=
"%B%{
$fg
[
${
(L)COLOR
}
]%}"
typeset
-g
PR_
$COLOR
=
"%b%{
$fg
[
${
(L)COLOR
}
]%}"
typeset
-g
PR_BRIGHT_
$COLOR
=
"%B%{
$fg
[
${
(L)COLOR
}
]%}"
done
PR_RESET
=
"%{
$reset_color
%}"
...
...
themes/jonathan.zsh-theme
View file @
7d03ea18
...
...
@@ -37,8 +37,8 @@ setopt prompt_subst
# See if we can use colors.
autoload zsh/terminfo
for color in RED GREEN YELLOW BLUE MAGENTA CYAN WHITE GREY; do
typeset PR_$color="%{$terminfo[bold]$fg[${(L)color}]%}"
typeset PR_LIGHT_$color="%{$fg[${(L)color}]%}"
typeset
-g
PR_$color="%{$terminfo[bold]$fg[${(L)color}]%}"
typeset
-g
PR_LIGHT_$color="%{$fg[${(L)color}]%}"
done
PR_NO_COLOUR="%{$terminfo[sgr0]%}"
...
...
themes/simonoff.zsh-theme
View file @
7d03ea18
...
...
@@ -45,8 +45,8 @@ setopt prompt_subst
# See if we can use colors.
autoload zsh/terminfo
for color in RED GREEN YELLOW BLUE MAGENTA CYAN WHITE GREY; do
typeset PR_$color="%{$terminfo[bold]$fg[${(L)color}]%}"
typeset PR_LIGHT_$color="%{$fg[${(L)color}]%}"
typeset
-g
PR_$color="%{$terminfo[bold]$fg[${(L)color}]%}"
typeset
-g
PR_LIGHT_$color="%{$fg[${(L)color}]%}"
done
PR_NO_COLOUR="%{$terminfo[sgr0]%}"
...
...
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