mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2025-06-20 09:38:05 +02:00
feat(z): update to cf9225fe (#13115)
Co-authored-by: ohmyzsh[bot] <54982679+ohmyzsh[bot]@users.noreply.github.com>
This commit is contained in:
parent
62afbdebb9
commit
3f8ea81b89
2
.github/dependencies.yml
vendored
2
.github/dependencies.yml
vendored
@ -38,7 +38,7 @@ dependencies:
|
|||||||
plugins/z:
|
plugins/z:
|
||||||
branch: master
|
branch: master
|
||||||
repo: agkozak/zsh-z
|
repo: agkozak/zsh-z
|
||||||
version: dd94ef04acc41748ba171eb219971cb455e0040b
|
version: cf9225feebfae55e557e103e95ce20eca5eff270
|
||||||
precopy: |
|
precopy: |
|
||||||
set -e
|
set -e
|
||||||
test -e README.md && mv -f README.md MANUAL.md
|
test -e README.md && mv -f README.md MANUAL.md
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
MIT License
|
MIT License
|
||||||
|
|
||||||
Copyright (c) 2018-2024 Alexandros Kozak
|
Copyright (c) 2018-2025 Alexandros Kozak
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
#
|
#
|
||||||
# https://github.com/agkozak/zsh-z
|
# https://github.com/agkozak/zsh-z
|
||||||
#
|
#
|
||||||
# Copyright (c) 2018-2024 Alexandros Kozak
|
# Copyright (c) 2018-2025 Alexandros Kozak
|
||||||
#
|
#
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
# of this software and associated documentation files (the "Software"), to deal
|
# of this software and associated documentation files (the "Software"), to deal
|
||||||
@ -294,7 +294,16 @@ zshz() {
|
|||||||
owner=${ZSHZ_OWNER:-${_Z_OWNER}}
|
owner=${ZSHZ_OWNER:-${_Z_OWNER}}
|
||||||
|
|
||||||
if (( ZSHZ[USE_FLOCK] )); then
|
if (( ZSHZ[USE_FLOCK] )); then
|
||||||
${ZSHZ[MV]} "$tempfile" "$datafile" 2> /dev/null || ${ZSHZ[RM]} -f "$tempfile"
|
# An unsual case: if inside Docker container where datafile could be bind
|
||||||
|
# mounted
|
||||||
|
if [[ -r '/proc/1/cgroup' && "$(< '/proc/1/cgroup')" == *docker* ]]; then
|
||||||
|
print "$(< "$tempfile")" > "$datafile" 2> /dev/null
|
||||||
|
${ZSHZ[RM]} -f "$tempfile"
|
||||||
|
# All other cases
|
||||||
|
else
|
||||||
|
${ZSHZ[MV]} "$tempfile" "$datafile" 2> /dev/null ||
|
||||||
|
${ZSHZ[RM]} -f "$tempfile"
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ -n $owner ]]; then
|
if [[ -n $owner ]]; then
|
||||||
${ZSHZ[CHOWN]} ${owner}:"$(id -ng ${owner})" "$datafile"
|
${ZSHZ[CHOWN]} ${owner}:"$(id -ng ${owner})" "$datafile"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user