Commit 8b37f817 authored by Marc Cornellà's avatar Marc Cornellà
Browse files

fix(lib): use -N syntax in `head` and `tail` to support Solaris (#6391)



Closes #6391
Co-authored-by: default avatarSergey Mashkov <cy6erGn0m@gmail.com>
parent 47c04d92
function zsh_stats() { function zsh_stats() {
fc -l 1 \ fc -l 1 \
| awk '{ CMD[$2]++; count++; } END { for (a in CMD) print CMD[a] " " CMD[a]*100/count "% " a }' \ | 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() { function uninstall_oh_my_zsh() {
......
...@@ -51,7 +51,7 @@ function parse_git_dirty() { ...@@ -51,7 +51,7 @@ function parse_git_dirty() {
FLAGS+="--ignore-submodules=${GIT_STATUS_IGNORE_SUBMODULES:-dirty}" FLAGS+="--ignore-submodules=${GIT_STATUS_IGNORE_SUBMODULES:-dirty}"
;; ;;
esac esac
STATUS=$(__git_prompt_git status ${FLAGS} 2> /dev/null | tail -n1) STATUS=$(__git_prompt_git status ${FLAGS} 2> /dev/null | tail -1)
fi fi
if [[ -n $STATUS ]]; then if [[ -n $STATUS ]]; then
echo "$ZSH_THEME_GIT_PROMPT_DIRTY" echo "$ZSH_THEME_GIT_PROMPT_DIRTY"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment