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
a7f5170d
Commit
a7f5170d
authored
Aug 31, 2020
by
Marc Cornellà
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove perl dependency
parent
0dc83fe4
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
8 deletions
+14
-8
timer.plugin.zsh
plugins/timer/timer.plugin.zsh
+4
-1
fishy.zsh-theme
themes/fishy.zsh-theme
+9
-6
trapd00r.zsh-theme
themes/trapd00r.zsh-theme
+1
-1
No files found.
plugins/timer/timer.plugin.zsh
View file @
a7f5170d
zmodload zsh/datetime
__timer_current_time
()
{
__timer_current_time
()
{
perl
-MTime
::HiRes
=
time
-e
'print time'
zmodload zsh/datetime
echo
$EPOCHREALTIME
}
}
__timer_format_duration
()
{
__timer_format_duration
()
{
...
...
themes/fishy.zsh-theme
View file @
a7f5170d
# ZSH Theme emulating the Fish shell's default prompt.
# ZSH Theme emulating the Fish shell's default prompt.
_fishy_collapsed_wd() {
_fishy_collapsed_wd() {
echo $(pwd | perl -pe '
local -a pwd=("${(s:/:)PWD/#$HOME/~}")
BEGIN {
for i in {1..$(($#pwd-1))}; do
binmode STDIN, ":encoding(UTF-8)";
if [[ "$pwd[$i]" = .* ]]; then
binmode STDOUT, ":encoding(UTF-8)";
pwd[$i]="${${pwd[$i]}[1,2]}"
}; s|^$ENV{HOME}|~|g; s|/([^/.])[^/]*(?=/)|/$1|g; s|/\.([^/])[^/]*(?=/)|/.$1|g
else
')
pwd[$i]="${${pwd[$i]}[1]}"
fi
done
echo "${(j:/:)pwd}"
}
}
local user_color='green'; [ $UID -eq 0 ] && user_color='red'
local user_color='green'; [ $UID -eq 0 ] && user_color='red'
...
...
themes/trapd00r.zsh-theme
View file @
a7f5170d
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
#
#
# This theme needs a terminal supporting 256 colors as well as unicode.
# This theme needs a terminal supporting 256 colors as well as unicode.
# In order to avoid external dependencies, it also has a zsh version of
# In order to avoid external dependencies, it also has a zsh version of
# the p
erl script a
t https://github.com/trapd00r/utils/blob/master/zsh_path,
# the p
reviously used perl scrip
t https://github.com/trapd00r/utils/blob/master/zsh_path,
# which splits up the current path and makes it fancy.
# which splits up the current path and makes it fancy.
#
#
# By default it spans over two lines like so:
# By default it spans over two lines like so:
...
...
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