mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2024-11-12 08:10:07 +00:00
Merge commit 'ff18dbaf74beb38f9e0721558f2c66552b5862a4'
This commit is contained in:
commit
bf0255931b
2 changed files with 38 additions and 6 deletions
|
@ -35,6 +35,16 @@ git clone --depth=1 https://github.com/romkatv/gitstatus.git ~/gitstatus
|
||||||
echo 'source ~/gitstatus/gitstatus.prompt.zsh' >>! ~/.zshrc
|
echo 'source ~/gitstatus/gitstatus.prompt.zsh' >>! ~/.zshrc
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Alternatively, on macOS you can install with Homebrew:
|
||||||
|
|
||||||
|
```zsh
|
||||||
|
brew install romkatv/gitstatus/gitstatus
|
||||||
|
echo 'source /usr/local/opt/gitstatus/gitstatus.prompt.zsh' >>! ~/.zshrc
|
||||||
|
```
|
||||||
|
|
||||||
|
(If you choose this option, replace `~/gitstatus` with `/usr/local/opt/gitstatus` in all code
|
||||||
|
snippets below.)
|
||||||
|
|
||||||
_Make sure to disable your current theme if you have one._
|
_Make sure to disable your current theme if you have one._
|
||||||
|
|
||||||
This will give you a basic yet functional prompt with git status in it. It's
|
This will give you a basic yet functional prompt with git status in it. It's
|
||||||
|
@ -118,6 +128,16 @@ git clone --depth=1 https://github.com/romkatv/gitstatus.git ~/gitstatus
|
||||||
echo 'source ~/gitstatus/gitstatus.prompt.sh' >> ~/.bashrc
|
echo 'source ~/gitstatus/gitstatus.prompt.sh' >> ~/.bashrc
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Alternatively, on macOS you can install with Homebrew:
|
||||||
|
|
||||||
|
```zsh
|
||||||
|
brew install romkatv/gitstatus/gitstatus
|
||||||
|
echo 'source /usr/local/opt/gitstatus/gitstatus.prompt.sh' >> ~/.bashrc
|
||||||
|
```
|
||||||
|
|
||||||
|
(If you choose this option, replace `~/gitstatus` with `/usr/local/opt/gitstatus` in all code
|
||||||
|
snippets below.)
|
||||||
|
|
||||||
This will give you a basic yet functional prompt with git status in it. It's
|
This will give you a basic yet functional prompt with git status in it. It's
|
||||||
[over 10x faster](#benchmarks) than any alternative that can give you comparable prompt.
|
[over 10x faster](#benchmarks) than any alternative that can give you comparable prompt.
|
||||||
|
|
||||||
|
@ -479,7 +499,7 @@ new versions are released.*
|
||||||
|
|
||||||
```zsh
|
```zsh
|
||||||
# Download and extract gitstatus tarball.
|
# Download and extract gitstatus tarball.
|
||||||
gitstatus_version=1.0.0 # IMPORTANT: CHANGE VERSION TO WHAT YOU WANT
|
gitstatus_version=1.1.0 # IMPORTANT: CHANGE VERSION TO WHAT YOU WANT
|
||||||
wget https://github.com/romkatv/gitstatus/archive/v"$gitstatus_version".tar.gz
|
wget https://github.com/romkatv/gitstatus/archive/v"$gitstatus_version".tar.gz
|
||||||
tar -xzf v"$gitstatus_version".tar.gz
|
tar -xzf v"$gitstatus_version".tar.gz
|
||||||
cd gitstatus-"$gitstatus_version"
|
cd gitstatus-"$gitstatus_version"
|
||||||
|
@ -508,7 +528,7 @@ libgit2 tarball manually and invoke `./build` without `-w`.
|
||||||
|
|
||||||
```zsh
|
```zsh
|
||||||
# Download and extract gitstatus tarball.
|
# Download and extract gitstatus tarball.
|
||||||
gitstatus_version=1.0.0 # IMPORTANT: CHANGE VERSION TO WHAT YOU WANT
|
gitstatus_version=1.1.0 # IMPORTANT: CHANGE VERSION TO WHAT YOU WANT
|
||||||
wget https://github.com/romkatv/gitstatus/archive/v"$gitstatus_version".tar.gz
|
wget https://github.com/romkatv/gitstatus/archive/v"$gitstatus_version".tar.gz
|
||||||
tar -xzf v"$gitstatus_version".tar.gz
|
tar -xzf v"$gitstatus_version".tar.gz
|
||||||
cd gitstatus-"$gitstatus_version"
|
cd gitstatus-"$gitstatus_version"
|
||||||
|
|
|
@ -17,8 +17,8 @@ Options:
|
||||||
-m ARCH `uname -m` from the target machine; defaults to `uname -m`
|
-m ARCH `uname -m` from the target machine; defaults to `uname -m`
|
||||||
from the local machine
|
from the local machine
|
||||||
-c CPU generate machine instructions for CPU of this type; this
|
-c CPU generate machine instructions for CPU of this type; this
|
||||||
value gets passed as `-march` to gcc; inferred from ARCH
|
value gets passed as `-march` (or `-mcpu` for ppc64le) to gcc;
|
||||||
if not set explicitly
|
inferred from ARCH if not set explicitly
|
||||||
-d CMD build in a Docker container and use CMD as the `docker`
|
-d CMD build in a Docker container and use CMD as the `docker`
|
||||||
command; e.g., `-d docker` or `-d podman`
|
command; e.g., `-d docker` or `-d podman`
|
||||||
-i IMAGE build in this Docker image; inferred from ARCH if not set
|
-i IMAGE build in this Docker image; inferred from ARCH if not set
|
||||||
|
@ -106,11 +106,20 @@ cpus="$(command getconf _NPROCESSORS_ONLN 2>/dev/null)" ||
|
||||||
cpus="$(command sysctl -n hw.ncpu 2>/dev/null)" ||
|
cpus="$(command sysctl -n hw.ncpu 2>/dev/null)" ||
|
||||||
cpus=8
|
cpus=8
|
||||||
|
|
||||||
|
case "$gitstatus_cpu" in
|
||||||
|
ppc64le)
|
||||||
|
archflag="-mcpu"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
archflag="-march"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
libgit2_cmake_flags=
|
libgit2_cmake_flags=
|
||||||
libgit2_cflags="-march=$gitstatus_cpu"
|
libgit2_cflags="$archflag=$gitstatus_cpu"
|
||||||
|
|
||||||
gitstatus_cxx=g++
|
gitstatus_cxx=g++
|
||||||
gitstatus_cxxflags="-I${workdir}/libgit2/include -DGITSTATUS_ZERO_NSEC -D_GNU_SOURCE -march=$gitstatus_cpu"
|
gitstatus_cxxflags="-I${workdir}/libgit2/include -DGITSTATUS_ZERO_NSEC -D_GNU_SOURCE $archflag=$gitstatus_cpu"
|
||||||
gitstatus_ldflags="-L${workdir}/libgit2/build"
|
gitstatus_ldflags="-L${workdir}/libgit2/build"
|
||||||
gitstatus_ldlibs=
|
gitstatus_ldlibs=
|
||||||
gitstatus_make=make
|
gitstatus_make=make
|
||||||
|
@ -377,6 +386,8 @@ if [ -z "$gitstatus_cpu" ]; then
|
||||||
armv6l) gitstatus_cpu=armv6;;
|
armv6l) gitstatus_cpu=armv6;;
|
||||||
armv7l) gitstatus_cpu=armv7;;
|
armv7l) gitstatus_cpu=armv7;;
|
||||||
aarch64) gitstatus_cpu=armv8-a;;
|
aarch64) gitstatus_cpu=armv8-a;;
|
||||||
|
ppc64le) gitstatus_cpu=powerpc64le;;
|
||||||
|
riscv64) gitstatus_cpu=rv64imafdc;;
|
||||||
x86_64|amd64) gitstatus_cpu=x86-64;;
|
x86_64|amd64) gitstatus_cpu=x86-64;;
|
||||||
i386|i586|i686) gitstatus_cpu="$gitstatus_arch";;
|
i386|i586|i686) gitstatus_cpu="$gitstatus_arch";;
|
||||||
*)
|
*)
|
||||||
|
@ -411,6 +422,7 @@ case "$gitstatus_kernel" in
|
||||||
armv6l) docker_image=arm32v6/alpine:3.11.6;;
|
armv6l) docker_image=arm32v6/alpine:3.11.6;;
|
||||||
armv7l) docker_image=arm32v7/alpine:3.11.6;;
|
armv7l) docker_image=arm32v7/alpine:3.11.6;;
|
||||||
aarch64) docker_image=arm64v8/alpine:3.11.6;;
|
aarch64) docker_image=arm64v8/alpine:3.11.6;;
|
||||||
|
ppc64le) docker_image=ppc64le/alpine:3.11.6;;
|
||||||
*)
|
*)
|
||||||
>&2 echo '[error] unable to infer docker image'
|
>&2 echo '[error] unable to infer docker image'
|
||||||
>&2 echo 'Please specify explicitly with `-i IMAGE`.'
|
>&2 echo 'Please specify explicitly with `-i IMAGE`.'
|
||||||
|
|
Loading…
Reference in a new issue