Skip to content

Commit d609dcb

Browse files
committed
+zunit workflow
new file: .github/workflows/zunit.yml renamed: @str-dump -> functions/@str-dump renamed: @str-ng-match -> functions/@str-ng-match renamed: @str-ng-matches -> functions/@str-ng-matches renamed: @str-parse-json -> functions/@str-parse-json renamed: @str-read-all -> functions/@str-read-all renamed: @str-read-ini -> functions/@str-read-ini renamed: @str-read-toml -> functions/@str-read-toml modified: zsh-string-lib.lib.zsh
1 parent a8749d9 commit d609dcb

File tree

9 files changed

+66
-1
lines changed

9 files changed

+66
-1
lines changed

.github/workflows/zunit.yml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: 🛡️ ZUnit
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches: [ main ]
7+
pull_request_target:
8+
branches: [ main ]
9+
10+
jobs:
11+
build-macos:
12+
name: 🧪 Mac ZUnit CI
13+
runs-on: macos-latest
14+
steps:
15+
- uses: actions/checkout@v2
16+
- name: 📚 Molovo zunit
17+
run: |
18+
mkdir bin
19+
curl -fsSL https://raw.githubusercontent.com/molovo/revolver/v0.2.4/revolver > bin/revolver
20+
curl -fsSL https://raw.githubusercontent.com/molovo/color/d8f91ab5fcfceb623ae45d3333ad0e543775549c/color.zsh > bin/color
21+
curl -L https://raw.githubusercontent.com/molovo/revolver/master/revolver > bin/revolver
22+
curl -L https://raw.githubusercontent.com/molovo/color/master/color.zsh > bin/color
23+
git clone https://github.com/zunit-zsh/zunit.git zunit.git
24+
cd zunit.git
25+
./build.zsh
26+
cd ..
27+
mv ./zunit.git/zunit bin
28+
chmod u+x bin/{color,revolver,zunit}
29+
- name: ✏️ Run the test
30+
run: |
31+
export TERM="xterm-256color"
32+
export PATH="$PWD/bin:$PATH"
33+
zunit
34+
35+
build-linux:
36+
name: 🧪 Linux Zunit CI
37+
runs-on: ubuntu-latest
38+
strategy:
39+
matrix:
40+
os: [ubuntu-latest]
41+
steps:
42+
- uses: actions/checkout@v2
43+
- name: ℹ️ Setup linux dependencies
44+
run: |
45+
sudo apt update
46+
sudo apt-get install zsh -yq
47+
- name: 📚 Molovo zunit
48+
run: |
49+
mkdir bin
50+
curl -fsSL https://raw.githubusercontent.com/molovo/revolver/v0.2.4/revolver > bin/revolver
51+
curl -fsSL https://raw.githubusercontent.com/molovo/color/d8f91ab5fcfceb623ae45d3333ad0e543775549c/color.zsh > bin/color
52+
curl -L https://raw.githubusercontent.com/molovo/revolver/master/revolver > bin/revolver
53+
curl -L https://raw.githubusercontent.com/molovo/color/master/color.zsh > bin/color
54+
git clone https://github.com/zunit-zsh/zunit.git zunit.git
55+
cd zunit.git
56+
./build.zsh
57+
cd ..
58+
mv ./zunit.git/zunit bin
59+
chmod u+x bin/{color,revolver,zunit}
60+
- name: ✏️ Run the test
61+
run: |
62+
export TERM="xterm-256color"
63+
export PATH="$PWD/bin:$PATH"
64+
zunit
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

zsh-string-lib.lib.zsh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
# According to the Zsh Plugin Standard:
22
# https://github.com/z-shell/zi/wiki/Zsh-Plugin-Standard
3+
34
0="${${ZERO:-${0:#$ZSH_ARGZERO}}:-${(%):-%N}}"
45
0="${${(M)0:#/*}:-$PWD/$0}"
56

67
if [[ $PMSPEC != *f* ]] {
78
fpath+=( "${0:h}/functions" )
8-
}
9+
}
910

1011
zmodload zsh/system 2>/dev/null
1112

0 commit comments

Comments
 (0)