Skip to content

Commit

Permalink
fix(lib): use -N syntax in head and tail to support Solaris (ohmy…
Browse files Browse the repository at this point in the history
…zsh#6391)

Closes ohmyzsh#6391

Co-authored-by: Sergey Mashkov <cy6erGn0m@gmail.com>
  • Loading branch information
2 people authored and pigpig committed Feb 16, 2021
1 parent bf9652f commit 821f902
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/functions.zsh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
function zsh_stats() {
fc -l 1 \
| awk '{ CMD[$2]++; count++; } END { for (a in CMD) print CMD[a] " " CMD[a]*100/count "% " a }' \
| grep -v "./" | sort -nr | head -n20 | column -c3 -s " " -t | nl
| grep -v "./" | sort -nr | head -20 | column -c3 -s " " -t | nl
}

function uninstall_oh_my_zsh() {
Expand Down
2 changes: 1 addition & 1 deletion lib/git.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ function parse_git_dirty() {
FLAGS+="--ignore-submodules=${GIT_STATUS_IGNORE_SUBMODULES:-dirty}"
;;
esac
STATUS=$(__git_prompt_git status ${FLAGS} 2> /dev/null | tail -n1)
STATUS=$(__git_prompt_git status ${FLAGS} 2> /dev/null | tail -1)
fi
if [[ -n $STATUS ]]; then
echo "$ZSH_THEME_GIT_PROMPT_DIRTY"
Expand Down

0 comments on commit 821f902

Please sign in to comment.