95

CodeStats / code-stats-zsh · GitLab

 7 years ago
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.
neoserver,ios ssh client

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

  1. Ensure you have curl.
  2. Get your personal API key from https://codestats.net/my/machines and set environment variable in e.g. .zshrc.

  3. 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
    • blog.richardweitech.cn 7 years ago
    • Cache

    Shell 中的极品-- Zsh - Richard Wei

  • 49
    • 微信 mp.weixin.qq.com 6 years ago
    • Cache

    oh-my-zsh: 让终端飞

  • 51
    • www.howie6879.cn 6 years ago
    • Cache

    oh-my-zsh:让终端飞

    效率 上一次推文写了JupyterLab:程序员的笔记本神器,介绍的是如何在web端打造一个便捷的开发环境,发出后反响还不错 因此我决定再写几篇能提升程...

  • 18
    • Github github.com 5 years ago
    • Cache

    Advent of Code 2019 in Zsh

    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
    • opensource.googleblog.com 4 years ago
    • Cache

    Google Summer of Code 2021: Student Stats

    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
    • stats.subsecond.app 2 years ago
    • Cache

    JS/TS Code Stats

    JS/TS code statsSome stuff about your javascript code you probably didn't already know.Github repo:Recently viewed repositoriesloadingHow do...

  • 6
    • www.producthunt.com 2 years ago
    • Cache

    Invoicing from code stats

    Ranked #7 for todayInvoicing from code statsGenerate PDF invoices from your code statsFree OptionsAuto...

  • 12
    • www.producthunt.com 1 year ago
    • Cache

    2023 Wrapped Code Stats from WakaTime

    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