1
0
Fork 0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2024-11-26 07:40:07 +00:00

Replaced the use of 'print' with 'echo' in order to sanitise track and artist names

Fixed indentation

Fixed indentation
This commit is contained in:
Andy Bateman 2015-09-20 08:46:45 +12:00
parent 993e09cc6b
commit 326c2b0859

View file

@ -166,9 +166,9 @@ function itunes() {
if [[ "$state" = "playing" ]]; then if [[ "$state" = "playing" ]]; then
currenttrack=`osascript -e 'tell application "iTunes" to name of current track as string'` 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'` 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 else
print "iTunes is" $state; echo "iTunes is" $state;
fi fi
return 0 return 0
;; ;;