From d30ea9d80c370f1a3ef9f51e4d2e7d946c457d69 Mon Sep 17 00:00:00 2001 From: Ian Walker Date: Mon, 15 Jun 2015 22:31:58 +0900 Subject: [PATCH] Added tabs so as to not make pull request so large --- plugins/osx/osx.plugin.zsh | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/plugins/osx/osx.plugin.zsh b/plugins/osx/osx.plugin.zsh index 9f0487051..aeee54f84 100644 --- a/plugins/osx/osx.plugin.zsh +++ b/plugins/osx/osx.plugin.zsh @@ -161,16 +161,16 @@ function itunes() { vol) opt="set sound volume to $1" #$1 Due to the shift ;; - status|nowplaying) - local state=`osascript -e 'tell application "iTunes" to player state as string'` - echo "iTunes is currently $state" - if [ "$state" = "playing" ]; then - artist=`osascript -e 'tell application "iTunes" to artist of current track as string'` - track=`osascript -e 'tell application "iTunes" to name of current track as string'` - echo "Current track: $artist / $track"; - fi - return 0 - ;; + status|nowplaying) + local state=`osascript -e 'tell application "iTunes" to player state as string'` + echo "iTunes is currently $state" + if [ "$state" = "playing" ]; then + artist=`osascript -e 'tell application "iTunes" to artist of current track as string'` + track=`osascript -e 'tell application "iTunes" to name of current track as string'` + echo "Current track: $artist / $track"; + fi + return 0 + ;; shuf|shuff|shuffle) # The shuffle property of current playlist can't be changed in iTunes 12, # so this workaround uses AppleScript to simulate user input instead.