mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2025-12-04 21:56:46 +01:00
Squashed 'gitstatus/' changes from 38d62a47..1c74c8db
1c74c8db add linux-ppc64le 968779b5 fix tar invocation 300f657c create anonymous tar archives a5581d18 force C locale during build (perl complains) 2616cd47 support downloads to usrbin 1e6075dd enable static linking on linux 2975d25f update libgit2 ref bea6f868 add ppc64le target git-subtree-dir: gitstatus git-subtree-split: 1c74c8db0f422aa6f95ced878351e0c6944a9bd6
This commit is contained in:
parent
fa2e337cbd
commit
b015817892
7 changed files with 58 additions and 47 deletions
|
|
@ -146,8 +146,18 @@ function gitstatus_start() {
|
|||
|
||||
local sig=(TERM ILL PIPE)
|
||||
|
||||
if (( UID == EUID )); then
|
||||
local home=~
|
||||
else
|
||||
local user
|
||||
user="$(command id -un)" || return
|
||||
[[ "$user" =~ ^[a-zA-Z0-9_,.-]+$ ]] || return
|
||||
eval "local home=~$user"
|
||||
[[ -n "$home" ]] || return
|
||||
fi
|
||||
|
||||
if [[ -x "$_gitstatus_bash_daemon" ]]; then
|
||||
"$_gitstatus_bash_daemon" \
|
||||
HOME="$home" "$_gitstatus_bash_daemon" \
|
||||
-G "$_gitstatus_bash_version" "${daemon_args[@]}" <&"$fd_in" >&"$fd_out" &
|
||||
local pid=$!
|
||||
trap "trap - ${sig[*]}; kill $pid &>/dev/null" ${sig[@]}
|
||||
|
|
@ -176,7 +186,7 @@ function gitstatus_start() {
|
|||
[[ -n "$_gitstatus_bash_version" ]] || return
|
||||
[[ "$_gitstatus_bash_downloaded" == 1 ]] || return
|
||||
|
||||
"$_gitstatus_bash_daemon" \
|
||||
HOME="$home" "$_gitstatus_bash_daemon" \
|
||||
-G "$_gitstatus_bash_version" "${daemon_args[@]}" <&"$fd_in" >&"$fd_out" &
|
||||
local pid=$!
|
||||
trap "trap - ${sig[*]}; kill $pid &>/dev/null" ${sig[@]}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue