mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-05-01 04:30:37 +02:00
Merge branch 'master' into zsh_update_dir
This commit is contained in:
commit
581e8465c8
8 changed files with 29 additions and 5 deletions
|
|
@ -4,9 +4,9 @@
|
||||||
|
|
||||||
Oh My Zsh is an open source, community-driven framework for managing your [zsh](http://www.zsh.org/) configuration.
|
Oh My Zsh is an open source, community-driven framework for managing your [zsh](http://www.zsh.org/) configuration.
|
||||||
|
|
||||||
That sounds boring. Let's try this again.
|
Sounds boring. Let's try again.
|
||||||
|
|
||||||
__Oh My Zsh is a way of life!__
|
__Oh My Zsh will not make you a 10x developer...but you might 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?"_
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -73,6 +73,8 @@
|
||||||
| pacupd | sudo pacman -Sy | Update and refresh the local package database |
|
| pacupd | sudo pacman -Sy | Update and refresh the local package database |
|
||||||
| pacupg | sudo pacman -Syu | Sync with repositories before upgrading packages |
|
| pacupg | sudo pacman -Syu | Sync with repositories before upgrading packages |
|
||||||
| upgrade | sudo pacman -Syu | Sync with repositories before upgrading packages |
|
| upgrade | sudo pacman -Syu | Sync with repositories before upgrading packages |
|
||||||
|
| pacfileupg | sudo pacman -Fy | Download fresh package databases from the server |
|
||||||
|
| pacfiles | pacman -Fs | Search package file names for matching strings. |
|
||||||
|
|
||||||
| Function | Description |
|
| Function | Description |
|
||||||
|----------------|------------------------------------------------------|
|
|----------------|------------------------------------------------------|
|
||||||
|
|
|
||||||
|
|
@ -82,6 +82,8 @@ alias pacinsd='sudo pacman -S --asdeps'
|
||||||
alias pacmir='sudo pacman -Syy'
|
alias pacmir='sudo pacman -Syy'
|
||||||
alias paclsorphans='sudo pacman -Qdt'
|
alias paclsorphans='sudo pacman -Qdt'
|
||||||
alias pacrmorphans='sudo pacman -Rs $(pacman -Qtdq)'
|
alias pacrmorphans='sudo pacman -Rs $(pacman -Qtdq)'
|
||||||
|
alias pacfileupg='sudo pacman -Fy'
|
||||||
|
alias pacfiles='pacman tFs'
|
||||||
|
|
||||||
|
|
||||||
if (( $+commands[abs] && $+commands[aur] )); then
|
if (( $+commands[abs] && $+commands[aur] )); then
|
||||||
|
|
|
||||||
|
|
@ -100,7 +100,7 @@ elif [[ "$OSTYPE" = linux* ]] ; then
|
||||||
else
|
else
|
||||||
color='red'
|
color='red'
|
||||||
fi
|
fi
|
||||||
echo "%{$fg[$color]%}[$(battery_pct_remaining)%%]%{$reset_color%}"
|
echo "%{$fg[$color]%}$(battery_pct_remaining)%%%{$reset_color%}"
|
||||||
else
|
else
|
||||||
echo "∞"
|
echo "∞"
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
|
|
@ -39,14 +39,17 @@ alias c='composer'
|
||||||
alias csu='composer self-update'
|
alias csu='composer self-update'
|
||||||
alias cu='composer update'
|
alias cu='composer update'
|
||||||
alias cr='composer require'
|
alias cr='composer require'
|
||||||
|
alias crm='composer remove'
|
||||||
alias ci='composer install'
|
alias ci='composer install'
|
||||||
alias ccp='composer create-project'
|
alias ccp='composer create-project'
|
||||||
alias cdu='composer dump-autoload'
|
alias cdu='composer dump-autoload'
|
||||||
|
alias cdo='composer dump-autoload --optimize-autoloader'
|
||||||
alias cgu='composer global update'
|
alias cgu='composer global update'
|
||||||
alias cgr='composer global require'
|
alias cgr='composer global require'
|
||||||
|
alias cgrm='composer global remove'
|
||||||
|
|
||||||
# install composer in the current directory
|
# install composer in the current directory
|
||||||
alias cget='curl -s https://getcomposer.org/installer | php'
|
alias cget='curl -s https://getcomposer.org/installer | php'
|
||||||
|
|
||||||
# Add Composer's global binaries to PATH
|
# Add Composer's global binaries to PATH
|
||||||
export PATH=$PATH:~/.composer/vendor/bin
|
export PATH=$PATH:$(composer global config bin-dir --absolute) 2>/dev/null
|
||||||
|
|
|
||||||
|
|
@ -917,7 +917,7 @@ __docker_image_subcommand() {
|
||||||
"($help)*--label=[Set metadata for an image]:label=value: " \
|
"($help)*--label=[Set metadata for an image]:label=value: " \
|
||||||
"($help -m --memory)"{-m=,--memory=}"[Memory limit]:Memory limit: " \
|
"($help -m --memory)"{-m=,--memory=}"[Memory limit]:Memory limit: " \
|
||||||
"($help)--memory-swap=[Total memory limit with swap]:Memory limit: " \
|
"($help)--memory-swap=[Total memory limit with swap]:Memory limit: " \
|
||||||
"($help)--network=[Connect a container to a network]:network mode:(bridge none container host)"
|
"($help)--network=[Connect a container to a network]:network mode:(bridge none container host)" \
|
||||||
"($help)--no-cache[Do not use cache when building the image]" \
|
"($help)--no-cache[Do not use cache when building the image]" \
|
||||||
"($help)--pull[Attempt to pull a newer version of the image]" \
|
"($help)--pull[Attempt to pull a newer version of the image]" \
|
||||||
"($help -q --quiet)"{-q,--quiet}"[Suppress verbose build output]" \
|
"($help -q --quiet)"{-q,--quiet}"[Suppress verbose build output]" \
|
||||||
|
|
|
||||||
|
|
@ -184,6 +184,7 @@ function vncviewer() {
|
||||||
# iTunes control function
|
# iTunes control function
|
||||||
function itunes() {
|
function itunes() {
|
||||||
local opt=$1
|
local opt=$1
|
||||||
|
local playlist=$2
|
||||||
shift
|
shift
|
||||||
case "$opt" in
|
case "$opt" in
|
||||||
launch|play|pause|stop|rewind|resume|quit)
|
launch|play|pause|stop|rewind|resume|quit)
|
||||||
|
|
@ -200,6 +201,19 @@ function itunes() {
|
||||||
vol)
|
vol)
|
||||||
opt="set sound volume to $1" #$1 Due to the shift
|
opt="set sound volume to $1" #$1 Due to the shift
|
||||||
;;
|
;;
|
||||||
|
playlist)
|
||||||
|
# Inspired by: https://gist.github.com/nakajijapan/ac8b45371064ae98ea7f
|
||||||
|
if [[ ! -z "$playlist" ]]; then
|
||||||
|
osascript -e 'tell application "iTunes"' -e "set new_playlist to \"$playlist\" as string" -e "play playlist new_playlist" -e "end tell" 2>/dev/null;
|
||||||
|
if [[ $? -eq 0 ]]; then
|
||||||
|
opt="play"
|
||||||
|
else
|
||||||
|
opt="stop"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
opt="set allPlaylists to (get name of every playlist)"
|
||||||
|
fi
|
||||||
|
;;
|
||||||
playing|status)
|
playing|status)
|
||||||
local state=`osascript -e 'tell application "iTunes" to player state as string'`
|
local state=`osascript -e 'tell application "iTunes" to player state as string'`
|
||||||
if [[ "$state" = "playing" ]]; then
|
if [[ "$state" = "playing" ]]; then
|
||||||
|
|
@ -250,6 +264,7 @@ EOF
|
||||||
echo "\tshuf|shuffle [on|off|toggle]\tSet shuffled playback. Default: toggle. Note: toggle doesn't support the MiniPlayer."
|
echo "\tshuf|shuffle [on|off|toggle]\tSet shuffled playback. Default: toggle. Note: toggle doesn't support the MiniPlayer."
|
||||||
echo "\tvol\tSet the volume, takes an argument from 0 to 100"
|
echo "\tvol\tSet the volume, takes an argument from 0 to 100"
|
||||||
echo "\tplaying|status\tShow what song is currently playing in iTunes."
|
echo "\tplaying|status\tShow what song is currently playing in iTunes."
|
||||||
|
echo "\tplaylist [playlist name]\t Play specific playlist"
|
||||||
echo "\thelp\tshow this message and exit"
|
echo "\thelp\tshow this message and exit"
|
||||||
return 0
|
return 0
|
||||||
;;
|
;;
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,7 @@ function web_search() {
|
||||||
github "https://github.com/search?q="
|
github "https://github.com/search?q="
|
||||||
baidu "https://www.baidu.com/s?wd="
|
baidu "https://www.baidu.com/s?wd="
|
||||||
ecosia "https://www.ecosia.org/search?q="
|
ecosia "https://www.ecosia.org/search?q="
|
||||||
|
goodreads "https://www.goodreads.com/search?q="
|
||||||
)
|
)
|
||||||
|
|
||||||
# check whether the search engine is supported
|
# check whether the search engine is supported
|
||||||
|
|
@ -47,6 +48,7 @@ alias yandex='web_search yandex'
|
||||||
alias github='web_search github'
|
alias github='web_search github'
|
||||||
alias baidu='web_search baidu'
|
alias baidu='web_search baidu'
|
||||||
alias ecosia='web_search ecosia'
|
alias ecosia='web_search ecosia'
|
||||||
|
alias goodreads='web_search goodreads'
|
||||||
|
|
||||||
#add your own !bang searches here
|
#add your own !bang searches here
|
||||||
alias wiki='web_search duckduckgo \!w'
|
alias wiki='web_search duckduckgo \!w'
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue