summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Bateman <andy@andybateman.com>2015-09-20 08:46:45 +1200
committerAndy Bateman <andy@andybateman.com>2015-09-22 08:15:31 +1200
commit326c2b08593e9b02da149dcc0d3c5cf99b21d3a2 (patch)
treeece33640de894fd054e4c6a83fb26127a67a71f0
parent993e09cc6b6127be92afe072f5957e4e9e72367f (diff)
downloadzsh-326c2b08593e9b02da149dcc0d3c5cf99b21d3a2.tar.gz
zsh-326c2b08593e9b02da149dcc0d3c5cf99b21d3a2.tar.bz2
zsh-326c2b08593e9b02da149dcc0d3c5cf99b21d3a2.zip
Replaced the use of 'print' with 'echo' in order to sanitise track and artist names
Fixed indentation Fixed indentation
-rw-r--r--plugins/osx/osx.plugin.zsh4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/osx/osx.plugin.zsh b/plugins/osx/osx.plugin.zsh
index 9413f5056..86778363b 100644
--- a/plugins/osx/osx.plugin.zsh
+++ b/plugins/osx/osx.plugin.zsh
@@ -166,9 +166,9 @@ function itunes() {
if [[ "$state" = "playing" ]]; then
currenttrack=`osascript -e 'tell application "iTunes" to name of current track as string'`
currentartist=`osascript -e 'tell application "iTunes" to artist of current track as string'`
- print -P "Listening to %F{yellow}$currenttrack%f by %F{yellow}$currentartist%f";
+ echo -E "Listening to $fg[yellow]$currenttrack$reset_color by $fg[yellow]$currentartist$reset_color";
else
- print "iTunes is" $state;
+ echo "iTunes is" $state;
fi
return 0
;;