Skip to content

Commit

Permalink
Fix control character sequence for Linux compatability
Browse files Browse the repository at this point in the history
  • Loading branch information
73rhodes committed Jan 26, 2012
1 parent 470d774 commit 3ed8b07
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions bin/n
Expand Up @@ -11,15 +11,15 @@ VERSIONS_DIR=$N_PREFIX/n/versions
#

log() {
printf "\e[90m...\e[0m $@\n"
printf "\033[90m...\033[0m $@\n"
}

#
# Exit with the given <msg ...>
#

abort() {
printf "\e[31mError: $@\e[0m\n" && exit 1
printf "\033[31mError: $@\033[0m\n" && exit 1
}

# setup
Expand Down Expand Up @@ -114,9 +114,9 @@ display_versions() {
local version=${dir##*/}
local config=`test -f $dir/.config && cat $dir/.config`
if test "$version" = "$active"; then
printf " \e[32mο\e[0m $version \e[90m$config\e[0m\n"
printf " \033[32mο\033[0m $version \033[90m$config\033[0m\n"
else
printf " $version \e[90m$config\e[0m\n"
printf " $version \033[90m$config\033[0m\n"
fi
done
}
Expand Down Expand Up @@ -312,10 +312,10 @@ list_versions() {

for v in $versions; do
if test "$active" = "$v"; then
printf " \e[32mο\e[0m $v \e[0m\n"
printf " \033[32mο\033[0m $v \033[0m\n"
else
if test -d $VERSIONS_DIR/$v; then
printf " * $v \e[0m\n"
printf " * $v \033[0m\n"
else
printf " $v\n"
fi
Expand Down

0 comments on commit 3ed8b07

Please sign in to comment.