Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
* upstream/master:
  Updating README intro
  itunes playlist first commit (ohmyzsh#5860)
  Added pacman file aliases (ohmyzsh#5869)
  Use proper config bin directory (ohmyzsh#5886)
  Fixing battery prompt formatting issue (cf ohmyzsh#5894) (ohmyzsh#5895)
  Update composer.plugin.zsh (ohmyzsh#5889)
  add missing new line escape (ohmyzsh#5896)
  • Loading branch information
lesterchan committed Mar 8, 2017
2 parents 40394ad + b908fee commit 9d07e15
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 5 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

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?"_

Expand Down
2 changes: 2 additions & 0 deletions plugins/archlinux/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@
| pacupd | sudo pacman -Sy | Update and refresh the local package database |
| pacupg | 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 |
|----------------|------------------------------------------------------|
Expand Down
2 changes: 2 additions & 0 deletions plugins/archlinux/archlinux.plugin.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ alias pacinsd='sudo pacman -S --asdeps'
alias pacmir='sudo pacman -Syy'
alias paclsorphans='sudo pacman -Qdt'
alias pacrmorphans='sudo pacman -Rs $(pacman -Qtdq)'
alias pacfileupg='sudo pacman -Fy'
alias pacfiles='pacman tFs'


if (( $+commands[abs] && $+commands[aur] )); then
Expand Down
2 changes: 1 addition & 1 deletion plugins/battery/battery.plugin.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ elif [[ "$OSTYPE" = linux* ]] ; then
else
color='red'
fi
echo "%{$fg[$color]%}[$(battery_pct_remaining)%%]%{$reset_color%}"
echo "%{$fg[$color]%}$(battery_pct_remaining)%%%{$reset_color%}"
else
echo ""
fi
Expand Down
5 changes: 4 additions & 1 deletion plugins/composer/composer.plugin.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,17 @@ alias c='composer'
alias csu='composer self-update'
alias cu='composer update'
alias cr='composer require'
alias crm='composer remove'
alias ci='composer install'
alias ccp='composer create-project'
alias cdu='composer dump-autoload'
alias cdo='composer dump-autoload --optimize-autoloader'
alias cgu='composer global update'
alias cgr='composer global require'
alias cgrm='composer global remove'

# install composer in the current directory
alias cget='curl -s https://getcomposer.org/installer | php'

# 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
2 changes: 1 addition & 1 deletion plugins/docker/_docker
Original file line number Diff line number Diff line change
Expand Up @@ -917,7 +917,7 @@ __docker_image_subcommand() {
"($help)*--label=[Set metadata for an image]:label=value: " \
"($help -m --memory)"{-m=,--memory=}"[Memory limit]: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)--pull[Attempt to pull a newer version of the image]" \
"($help -q --quiet)"{-q,--quiet}"[Suppress verbose build output]" \
Expand Down
15 changes: 15 additions & 0 deletions plugins/osx/osx.plugin.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ function vncviewer() {
# iTunes control function
function itunes() {
local opt=$1
local playlist=$2
shift
case "$opt" in
launch|play|pause|stop|rewind|resume|quit)
Expand All @@ -200,6 +201,19 @@ function itunes() {
vol)
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)
local state=`osascript -e 'tell application "iTunes" to player state as string'`
if [[ "$state" = "playing" ]]; then
Expand Down Expand Up @@ -250,6 +264,7 @@ EOF
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 "\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"
return 0
;;
Expand Down

0 comments on commit 9d07e15

Please sign in to comment.