From b927358c9af4f66bd7f0064359469cdca97c24e2 Mon Sep 17 00:00:00 2001 From: Mike Dacre Date: Sat, 14 Mar 2015 10:39:24 -0700 Subject: [PATCH] Added ANSI code for color reset to messages Previously, colored messages did not reset the color on printing, this meant that calling vim-bundle from an update script in a loop would result in the entire output being green. I added the code \033[0m to the end of the strings, which prevents this from happening. --- vim-bundle | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/vim-bundle b/vim-bundle index 5e847eb..3603447 100755 --- a/vim-bundle +++ b/vim-bundle @@ -5,9 +5,9 @@ bundle_path = "~/.vim/bundle" def usage puts "usage: vim-bundle " puts "" - puts " \033[36mlist \033[0m- list all bundles currently installed" - puts " \033[36minstall / \033[0m- installs plugin from github. If no user is specified vim-scripts is used" - puts " \033[36mupdate / \033[0m- updates plugin. If no user is specified vim-scripts is used" + puts " \033[36mlist \033[0m list all bundles currently installed" + puts " \033[36minstall / \033[0m installs plugin from github. If no user is specified vim-scripts is used" + puts " \033[36mupdate / \033[0m updates plugin. If no user is specified vim-scripts is used" end if ARGV.first == "list" @@ -62,7 +62,7 @@ elsif ARGV.size > 1 unless File.exists?(File.expand_path(plugin_tar)) puts plugin_tar - puts "\033[31mFailed to download tar" + puts "\033[31mFailed to download tar\033[0m" exit end @@ -74,9 +74,9 @@ elsif ARGV.size > 1 `rm -r #{old_plugin_path}` puts ">> Moving new plugin" `mv #{plugin_path} #{old_plugin_path}` - puts "\033[32m#{plugin_name} is now updated!" + puts "\033[32m#{plugin_name} is now updated!\033[0m" else - puts "\033[32m#{plugin_name} is now installed!" + puts "\033[32m#{plugin_name} is now installed!\033[0m" end else usage