8b37f817c29715873b91c8a8e7f883eccc240895
- Author
- Marc Cornellà <hello@mcornella.com>
- Committer
- Marc Cornellà <hello@mcornella.com>
- Date
Message
fix(lib): use -N syntax in `head` and `tail` to support Solaris (#6391)
Closes #6391
Co-authored-by: Sergey Mashkov <cy6erGn0m@gmail.com>
Diff
1diff --git a/lib/functions.zsh b/lib/functions.zsh
2index 7beb62ad935f61f055769130861e952f0cfb83bd..c4340f16ce35d66dc3aa41bba1311b3deb6a9509 100644
3--- a/lib/functions.zsh
4+++ b/lib/functions.zsh
5@@ -1,7 +1,7 @@
6 function zsh_stats() {
7 fc -l 1 \
8 | awk '{ CMD[$2]++; count++; } END { for (a in CMD) print CMD[a] " " CMD[a]*100/count "% " a }' \
9- | grep -v "./" | sort -nr | head -n20 | column -c3 -s " " -t | nl
10+ | grep -v "./" | sort -nr | head -20 | column -c3 -s " " -t | nl
11 }
12
13 function uninstall_oh_my_zsh() {
14diff --git a/lib/git.zsh b/lib/git.zsh
15index 34ffc7ab786684b4add7d0b91c720efb70c806ad..c9363274ca97a7f954324ea8bb78bdeeb5294c9c 100644
16--- a/lib/git.zsh
17+++ b/lib/git.zsh
18@@ -51,7 +51,7 @@ function parse_git_dirty() {
19 FLAGS+="--ignore-submodules=${GIT_STATUS_IGNORE_SUBMODULES:-dirty}"
20 ;;
21 esac
22- STATUS=$(__git_prompt_git status ${FLAGS} 2> /dev/null | tail -n1)
23+ STATUS=$(__git_prompt_git status ${FLAGS} 2> /dev/null | tail -1)
24 fi
25 if [[ -n $STATUS ]]; then
26 echo "$ZSH_THEME_GIT_PROMPT_DIRTY"