Skip to content

Instantly share code, notes, and snippets.

View BenoitHiller's full-sized avatar
⚙️
Settings

Benoit Hiller BenoitHiller

⚙️
Settings
View GitHub Profile
PROMPT="${RED}${EXITCODE}${WHITE}${debian_chroot:+($debian_chroot)}${BLUE}%n${NO_COLOUR}@%m %40<...<%B%~%b%<< %j "
PROMPT="${PROMPT}"'${vcs_info_msg_0_}'"%# "
#!/usr/bin/zsh
# you have to force the script to read the histfile apparently
fc -R
# now we just copy the stats function from oh-my-zsh because it is prety stable stuff.
fc -l 1 \
| awk '{CMD[$2]++;count++;}END { for (a in CMD)print CMD[a] " " CMD[a]/count*100 "% " a;}' \
| grep -v "./" \
| column -c3 -s " " -t \
| sort -nr \
| nl \

Keybase proof

I hereby claim:

  • I am benoithiller on github.
  • I am benoithiller (https://keybase.io/benoithiller) on keybase.
  • I have a public key ASBf59UisQJY4nLClvPW3y73tXFjXfwQ1KpBZUjItwfFIgo

To claim this, I am signing this object:

@BenoitHiller
BenoitHiller / findgrep
Created November 18, 2015 20:34
Like git grep but in any directory
#!/bin/bash
main() {
local path
local pathRegex
local regex
if [[ $# == 1 ]]; then
path="./"
regex="$1"