mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-01-24 01:37:27 +08:00
Compare commits
No commits in common. "cacf5d0435cbd33d1b9460d118720c6a9b5f6420" and "93c837fec8e9fe61509b9dff9e909e84f7ebe32d" have entirely different histories.
cacf5d0435
...
93c837fec8
61
README.md
61
README.md
@ -1,16 +1,18 @@
|
|||||||
<p align="center"><img src="https://s3.amazonaws.com/ohmyzsh/oh-my-zsh-logo.png" alt="Oh My Zsh"></p>
|
<p align="center">
|
||||||
|
<img src="https://s3.amazonaws.com/ohmyzsh/oh-my-zsh-logo.png" alt="Oh My Zsh">
|
||||||
|
</p>
|
||||||
|
|
||||||
Oh My Zsh is an open source, community-driven framework for managing your [zsh](https://www.zsh.org/) configuration.
|
Oh My Zsh is an open source, community-driven framework for managing your [zsh](https://www.zsh.org/) configuration.
|
||||||
|
|
||||||
Sounds boring. Let's try again.
|
Sounds boring. Let's try again.
|
||||||
|
|
||||||
**Oh My Zsh will not make you a 10x developer...but you may feel like one.**
|
__Oh My Zsh will not make you a 10x developer...but you may feel like one.__
|
||||||
|
|
||||||
Once installed, your terminal shell will become the talk of the town _or your money back!_ With each keystroke in your command prompt, you'll take advantage of the hundreds of powerful plugins and beautiful themes. Strangers will come up to you in cafés and ask you, _"that is amazing! are you some sort of genius?"_
|
Once installed, your terminal shell will become the talk of the town _or your money back!_ With each keystroke in your command prompt, you'll take advantage of the hundreds of powerful plugins and beautiful themes. Strangers will come up to you in cafés and ask you, _"that is amazing! are you some sort of genius?"_
|
||||||
|
|
||||||
Finally, you'll begin to get the sort of attention that you have always felt you deserved. ...or maybe you'll use the time that you're saving to start flossing more often. 😬
|
Finally, you'll begin to get the sort of attention that you have always felt you deserved. ...or maybe you'll use the time that you're saving to start flossing more often. 😬
|
||||||
|
|
||||||
To learn more, visit [ohmyz.sh](https://ohmyz.sh), follow [@ohmyzsh](https://twitter.com/ohmyzsh) on Twitter, and join us on [Discord](https://discord.gg/ohmyzsh).
|
To learn more, visit [ohmyz.sh](https://ohmyz.sh), follow [@ohmyzsh](https://twitter.com/ohmyzsh) on Twitter, and/or join us on [Discord](https://discord.gg/ohmyzsh).
|
||||||
|
|
||||||
[](https://github.com/ohmyzsh/ohmyzsh/actions?query=workflow%3ACI)
|
[](https://github.com/ohmyzsh/ohmyzsh/actions?query=workflow%3ACI)
|
||||||
[](https://twitter.com/intent/follow?screen_name=ohmyzsh)
|
[](https://twitter.com/intent/follow?screen_name=ohmyzsh)
|
||||||
@ -20,20 +22,32 @@ To learn more, visit [ohmyz.sh](https://ohmyz.sh), follow [@ohmyzsh](https://twi
|
|||||||
|
|
||||||
### Prerequisites
|
### Prerequisites
|
||||||
|
|
||||||
- A Unix-like operating system: macOS, Linux, BSD. On Windows: WSL2 is preferred, but cygwin or msys also mostly work.
|
* A Unix-like operating system: macOS, Linux, BSD. On Windows: WSL2 is preferred, but cygwin or msys also mostly work.
|
||||||
- [Zsh](https://www.zsh.org) should be installed (v4.3.9 or more recent is fine but we prefer 5.0.8 and newer). If not pre-installed (run `zsh --version` to confirm), check the following wiki instructions here: [Installing ZSH](https://github.com/ohmyzsh/ohmyzsh/wiki/Installing-ZSH)
|
* [Zsh](https://www.zsh.org) should be installed (v4.3.9 or more recent is fine but we prefer 5.0.8 and newer). If not pre-installed (run `zsh --version` to confirm), check the following wiki instructions here: [Installing ZSH](https://github.com/ohmyzsh/ohmyzsh/wiki/Installing-ZSH)
|
||||||
- `curl` or `wget` should be installed
|
* `curl` or `wget` should be installed
|
||||||
- `git` should be installed (recommended v2.4.11 or higher)
|
* `git` should be installed (recommended v2.4.11 or higher)
|
||||||
|
|
||||||
### Basic Installation
|
### Basic Installation
|
||||||
|
|
||||||
Oh My Zsh is installed by running one of the following commands in your terminal. You can install this via the command-line with either `curl`, `wget` or another similar tool.
|
Oh My Zsh is installed by running one of the following commands in your terminal. You can install this via the command-line with either `curl` or `wget`, whichever is installed on your machine.
|
||||||
|
|
||||||
| Method | Command |
|
#### via curl
|
||||||
|:----------|:--------------------------------------------------------------------------------------------------|
|
|
||||||
| **curl** | `sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"` |
|
```shell
|
||||||
| **wget** | `sh -c "$(wget -O- https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"` |
|
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
|
||||||
| **fetch** | `sh -c "$(fetch -o - https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"` |
|
```
|
||||||
|
|
||||||
|
#### via wget
|
||||||
|
|
||||||
|
```shell
|
||||||
|
sh -c "$(wget -O- https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
|
||||||
|
```
|
||||||
|
|
||||||
|
#### via fetch
|
||||||
|
|
||||||
|
```shell
|
||||||
|
sh -c "$(fetch -o - https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
|
||||||
|
```
|
||||||
|
|
||||||
#### Manual inspection
|
#### Manual inspection
|
||||||
|
|
||||||
@ -42,7 +56,7 @@ that by downloading the install script first, looking through it so everything l
|
|||||||
then running it:
|
then running it:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
wget https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh
|
curl -Lo install.sh https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh
|
||||||
sh install.sh
|
sh install.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -111,6 +125,7 @@ In case you did not find a suitable theme for your needs, please have a look at
|
|||||||
|
|
||||||
If you're feeling feisty, you can let the computer select one randomly for you each time you open a new terminal window.
|
If you're feeling feisty, you can let the computer select one randomly for you each time you open a new terminal window.
|
||||||
|
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
ZSH_THEME="random" # (...please let it be pie... please be some pie..)
|
ZSH_THEME="random" # (...please let it be pie... please be some pie..)
|
||||||
```
|
```
|
||||||
@ -190,13 +205,13 @@ REPO=apjanke/oh-my-zsh BRANCH=edge sh install.sh
|
|||||||
|
|
||||||
#### Manual Installation
|
#### Manual Installation
|
||||||
|
|
||||||
##### 1. Clone the repository
|
##### 1. Clone the repository:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
git clone https://github.com/ohmyzsh/ohmyzsh.git ~/.oh-my-zsh
|
git clone https://github.com/ohmyzsh/ohmyzsh.git ~/.oh-my-zsh
|
||||||
```
|
```
|
||||||
|
|
||||||
##### 2. *Optionally*, backup your existing `~/.zshrc` file
|
##### 2. *Optionally*, backup your existing `~/.zshrc` file:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
cp ~/.zshrc ~/.zshrc.orig
|
cp ~/.zshrc ~/.zshrc.orig
|
||||||
@ -226,9 +241,9 @@ Once you open up a new terminal window, it should load zsh with Oh My Zsh's conf
|
|||||||
|
|
||||||
If you have any hiccups installing, here are a few common fixes.
|
If you have any hiccups installing, here are a few common fixes.
|
||||||
|
|
||||||
- You _might_ need to modify your `PATH` in `~/.zshrc` if you're not able to find some commands after
|
* You _might_ need to modify your `PATH` in `~/.zshrc` if you're not able to find some commands after
|
||||||
switching to `oh-my-zsh`.
|
switching to `oh-my-zsh`.
|
||||||
- If you installed manually or changed the install location, check the `ZSH` environment variable in
|
* If you installed manually or changed the install location, check the `ZSH` environment variable in
|
||||||
`~/.zshrc`.
|
`~/.zshrc`.
|
||||||
|
|
||||||
### Custom Plugins and Themes
|
### Custom Plugins and Themes
|
||||||
@ -291,12 +306,12 @@ Thank you so much!
|
|||||||
|
|
||||||
## Follow Us
|
## Follow Us
|
||||||
|
|
||||||
We're on social media:
|
We're on the social media.
|
||||||
|
|
||||||
- [@ohmyzsh](https://twitter.com/ohmyzsh) on Twitter. You should follow it.
|
* [@ohmyzsh](https://twitter.com/ohmyzsh) on Twitter. You should follow it.
|
||||||
- [FaceBook](https://www.facebook.com/Oh-My-Zsh-296616263819290/) poke us.
|
* [FaceBook](https://www.facebook.com/Oh-My-Zsh-296616263819290/) poke us.
|
||||||
- [Instagram](https://www.instagram.com/_ohmyzsh/) tag us in your post showing Oh My Zsh!
|
* [Instagram](https://www.instagram.com/_ohmyzsh/) tag us in your post showing Oh My Zsh!
|
||||||
- [Discord](https://discord.gg/ohmyzsh) to chat with us!
|
* [Discord](https://discord.gg/ohmyzsh) to chat with us!
|
||||||
|
|
||||||
## Merchandise
|
## Merchandise
|
||||||
|
|
||||||
|
|||||||
@ -1,7 +1,5 @@
|
|||||||
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]/count*100 "% " a;}' | grep -v "./" | column -c3 -s " " -t | sort -nr | nl | head -n20
|
||||||
| 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
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function uninstall_oh_my_zsh() {
|
function uninstall_oh_my_zsh() {
|
||||||
|
|||||||
@ -1,19 +1,20 @@
|
|||||||
# Alias
|
|
||||||
alias la5='php artisan'
|
|
||||||
alias la5cache='php artisan cache:clear'
|
|
||||||
alias la5routes='php artisan route:list'
|
|
||||||
alias la5vendor='php artisan vendor:publish'
|
|
||||||
|
|
||||||
# Laravel5 basic command completion
|
# Laravel5 basic command completion
|
||||||
_laravel5_get_command_list () {
|
_laravel5_get_command_list () {
|
||||||
php artisan --raw --no-ansi list | sed "s/[[:space:]].*//g"
|
php artisan --raw --no-ansi list | sed "s/[[:space:]].*//g"
|
||||||
}
|
}
|
||||||
|
|
||||||
_laravel5 () {
|
_laravel5 () {
|
||||||
if [[ -f artisan ]]; then
|
if [ -f artisan ]; then
|
||||||
compadd $(_laravel5_get_command_list)
|
compadd `_laravel5_get_command_list`
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
compdef _laravel5 artisan
|
compdef _laravel5 artisan
|
||||||
compdef _laravel5 la5
|
compdef _laravel5 la5
|
||||||
|
|
||||||
|
#Alias
|
||||||
|
alias la5='php artisan'
|
||||||
|
|
||||||
|
alias la5cache='php artisan cache:clear'
|
||||||
|
alias la5routes='php artisan route:list'
|
||||||
|
alias la5vendor='php artisan vendor:publish'
|
||||||
|
|||||||
@ -235,7 +235,7 @@ prompt_status() {
|
|||||||
# ends in '-prod'
|
# ends in '-prod'
|
||||||
# - displays black on green otherwise
|
# - displays black on green otherwise
|
||||||
prompt_aws() {
|
prompt_aws() {
|
||||||
[[ -z "$AWS_PROFILE" || "$SHOW_AWS_PROMPT" = false ]] && return
|
[[ -z "$AWS_PROFILE" ]] && return
|
||||||
case "$AWS_PROFILE" in
|
case "$AWS_PROFILE" in
|
||||||
*-prod|*production*) prompt_segment red yellow "AWS: $AWS_PROFILE" ;;
|
*-prod|*production*) prompt_segment red yellow "AWS: $AWS_PROFILE" ;;
|
||||||
*) prompt_segment green black "AWS: $AWS_PROFILE" ;;
|
*) prompt_segment green black "AWS: $AWS_PROFILE" ;;
|
||||||
|
|||||||
@ -7,9 +7,9 @@ typeset +H _hist_no="%{$fg[grey]%}%h%{$reset_color%}"
|
|||||||
|
|
||||||
PROMPT='
|
PROMPT='
|
||||||
$(_user_host)${_current_dir} $(git_prompt_info) $(ruby_prompt_info)
|
$(_user_host)${_current_dir} $(git_prompt_info) $(ruby_prompt_info)
|
||||||
%{%(!.${fg[red]}.${fg[white]})%}▶%{$reset_color%} '
|
%{%(!.%F{red}.%F{white})%}▶%{$reset_color%} '
|
||||||
|
|
||||||
PROMPT2='%{%(!.${fg[red]}.${fg[white]})%}◀%{$reset_color%} '
|
PROMPT2='%{%(!.%F{red}.%F{white})%}◀%{$reset_color%} '
|
||||||
|
|
||||||
RPROMPT='$(vi_mode_prompt_info)%{$(echotc UP 1)%}$(_git_time_since_commit) $(git_prompt_status) ${_return_status}%{$(echotc DO 1)%}'
|
RPROMPT='$(vi_mode_prompt_info)%{$(echotc UP 1)%}$(_git_time_since_commit) $(git_prompt_status) ${_return_status}%{$(echotc DO 1)%}'
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user