-
Notifications
You must be signed in to change notification settings - Fork 237
/
Copy pathshell_stars.nu
42 lines (41 loc) · 1.22 KB
/
shell_stars.nu
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
let shell_list = [
[name repo];
[bash bminor/bash]
[fish fish-shell/fish-shell]
[nushell nushell/nushell]
# [powershell no-github-url]
[pwsh PowerShell/PowerShell]
[ksh2020 ksh2020/ksh]
[ksh93u att/ast]
# [csh no-github-url]
# [dash no-github-url]
# [sh no-github-url]
# [cmd no-github-url]
[aws-shell awslabs/aws-shell]
[azure-cloud-shell Azure/CloudShell]
[elvish elves/elvish]
[es wryun/es-shell]
[ion redox-os/ion]
[MirBSDksh MirBSD/mksh]
[ngs ngs-lang/ngs]
[openbsd_ksh ibara/oksh]
[oil oilshell/oil]
[shell++ alexst07/shell-plus-plus]
[tcsh tcsh-org/tcsh]
[xonsh xonsh/xonsh]
[yash magicant/yash]
[zsh zsh-users/zsh]
]
$shell_list | each { |r|
print -n $"Working on ($r.name)"
sleep 250ms
if ($r.repo | str starts-with no) {
[[shell repo stars]; [($r.name) "no github url" 0]]
print ""
} else {
let url = $"https://api.github.com/repos/($r.repo)"
let count = (http get -u $env.GITHUB_USERNAME -p $env.GITHUB_PASSWORD ($url) | get stargazers_count)
print $" ($count)"
[[shell repo stars]; [($r.name) ($r.repo) ($count)]]
}
} | flatten | sort-by -r stars | table --index 1