

CodeStats / code-stats-zsh · GitLab
source link: https://gitlab.com/code-stats/code-stats-zsh
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Code::Stats plugin for Zsh
Code-stats-zsh hooks onto Zsh, counts characters as you type and saves your statistics in Code::Stats. You'll receive XP for the language Terminal (Zsh)
for each character, backspace/delete and enter you type.
Installation
- Ensure you have
curl
. Get your personal API key from https://codestats.net/my/machines and set environment variable in e.g.
.zshrc
.- Install and source the script in one of the following ways (in
.zshrc
after the environment variable):
Add a line for the plugin, run zgen update
, then restart the shell by e.g. exec zsh
.
Zplug
That's everything you need.
Manual installation
Clone this git repo and source the script directly.
Other plugin managers (Antigen, ...)
Probably just pointing to the git repo will work.
Running on Windows Subsystem for Linux
If you are running Zsh on Windows and see this message:
This is caused due to WSL not supporting nice
and Zsh using it by default for
backgrounded processes. As a workaround, in your .zshrc
, set:
See the discussion in this related issue: https://github.com/Microsoft/WSL/issues/1887
Options
-
CODESTATS_API_KEY
: the API key used when submitting pulses. Required. -
CODESTATS_API_URL
: the base URL to the Code::Stats API. Only set this if you know what you're doing! :) -
CODESTATS_LOG_FILE
: a log file for debugging. Must exist and be writable.
Other plugins
Plugins that wrap ZLE widgets should probably be loaded after code-stats-zsh
. For example, zsh-syntax-highlighting
needs to be loaded after code-stats-zsh
for it to work properly.
</div
Recommend
-
58
I was quickly opening multiple shells for an unrelated project today and noticed how abysmal my shell load speed was. After the initial load it was relatively fast, but the actual shell start up was noticeably slow. I decided to time it with tim...
-
51
-
49
-
51
效率 上一次推文写了JupyterLab:程序员的笔记本神器,介绍的是如何在web端打造一个便捷的开发环境,发出后反响还不错 因此我决定再写几篇能提升程...
-
18
Advent of Code 2019 in Zsh Advent of Code is an Advent calendar of small programming puzzles. This is the story of my participation, for the first time, in 2019. ...
-
12
Reading Time: 4 minutes I built chisel.cloud in my spare time to automate something I did to derive insights about my Gitlab pipeline times. In this blog post I’m going to show you how I did it i...
-
12
Google Summer of Code 2021: Student Stats Monday, June 28, 2021 Google Summer of Code (GSoC) is a global program focused on bringing more student developers...
-
10
JS/TS code statsSome stuff about your javascript code you probably didn't already know.Github repo:Recently viewed repositoriesloadingHow do...
-
6
Ranked #7 for todayInvoicing from code statsGenerate PDF invoices from your code statsFree OptionsAuto...
-
12
Most used languages, IDEs, and stats of developers in 2023Sort by: ? Hello Product Hunters, This year WakaTime is proud to share the code stats of over 500k (half a million!) developers using our open source IDE...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK