mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-01-23 02:35:38 +01:00
Merge branch 'master' of https://github.com/ohmyzsh/ohmyzsh
This commit is contained in:
commit
9d709dcddb
50 changed files with 1372 additions and 912 deletions
|
|
@ -292,16 +292,17 @@ function display-release {
|
|||
function fmt:hash {
|
||||
#* Uses $hash from outer scope
|
||||
local hash="${1:-$hash}"
|
||||
local short_hash="${hash:0:7}" # 7 characters sha, top level sha is 12 characters
|
||||
case "$output" in
|
||||
raw) printf '%s' "$hash" ;;
|
||||
raw) printf '%s' "$short_hash" ;;
|
||||
text)
|
||||
local text="\e[33m$hash\e[0m"; # red
|
||||
local text="\e[33m$short_hash\e[0m"; # red
|
||||
if supports_hyperlinks; then
|
||||
printf "\e]8;;%s\a%s\e]8;;\a" "https://github.com/ohmyzsh/ohmyzsh/commit/$hash" $text;
|
||||
else
|
||||
echo $text;
|
||||
fi ;;
|
||||
md) printf '[`%s`](https://github.com/ohmyzsh/ohmyzsh/commit/%s)' "$hash" "$hash" ;;
|
||||
md) printf '[`%s`](https://github.com/ohmyzsh/ohmyzsh/commit/%s)' "$short_hash" "$hash" ;;
|
||||
esac
|
||||
}
|
||||
|
||||
|
|
@ -512,13 +513,13 @@ function main {
|
|||
# Git log options
|
||||
# -z: commits are delimited by null bytes
|
||||
# --format: [7-char hash]<field sep>[ref names]<field sep>[subject]<field sep>[body]
|
||||
# --abbrev=7: force commit hashes to be 7 characters long
|
||||
# --abbrev=7: force commit hashes to be 12 characters long
|
||||
# --no-merges: merge commits are omitted
|
||||
# --first-parent: commits from merged branches are omitted
|
||||
local SEP="0mZmAgIcSeP"
|
||||
local -a raw_commits
|
||||
raw_commits=(${(0)"$(command git -c log.showSignature=false log -z \
|
||||
--format="%h${SEP}%D${SEP}%s${SEP}%b" --abbrev=7 \
|
||||
--format="%h${SEP}%D${SEP}%s${SEP}%b" --abbrev=12 \
|
||||
--no-merges --first-parent $range)"})
|
||||
|
||||
local raw_commit
|
||||
|
|
|
|||
|
|
@ -63,7 +63,9 @@ zdot="${ZDOTDIR:-$HOME}"
|
|||
# Default value for $ZSH
|
||||
# a) if $ZDOTDIR is supplied and not $HOME: $ZDOTDIR/ohmyzsh
|
||||
# b) otherwise, $HOME/.oh-my-zsh
|
||||
[ "$ZDOTDIR" = "$HOME" ] || ZSH="${ZSH:-${ZDOTDIR:+$ZDOTDIR/ohmyzsh}}"
|
||||
if [ -n "$ZDOTDIR" ] && [ "$ZDOTDIR" != "$HOME" ]; then
|
||||
ZSH="${ZSH:-$ZDOTDIR/ohmyzsh}"
|
||||
fi
|
||||
ZSH="${ZSH:-$HOME/.oh-my-zsh}"
|
||||
REPO=${REPO:-snakewarhead/oh-my-zsh}
|
||||
REMOTE=${REMOTE:-https://github.com/${REPO}.git}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue