properly get command for fish shell, fix bug if history is very small
add pie chart, split code in functions