diff --git a/.bash_extra b/.bash_extra index a6d5348..be91920 100644 --- a/.bash_extra +++ b/.bash_extra @@ -214,6 +214,9 @@ function glogs { fi; git log --pretty=format:'%C(auto) %<|(16,trunc)%h %Cred %G?%Creset %<|(60,trunc)%s %<(20,trunc)%Cgreen%cr%Creset %<(15,trunc)%Cblue%an%Creset %Cred%D' --graph --all -$ncommits } +function mdtoc { + grep --recursive --include="*.md" ^# | sort --version-sort --field-separator=":" | awk 'BEGIN {FS=":"}{print $2 "&&" $1}' | column --table --separator "&&" --table-truncate 1,2 +} ### Aliase # tmux alias tmuxa="tmux a -t "