jamesob / desk

A lightweight workspace manager for the shell
MIT License
2.54k stars 111 forks source link

fix new line insertion introduced in #73 #74

Closed MrMitch closed 7 years ago

MrMitch commented 7 years ago

The change introduced in #73 produces an invalid output (at least on Ubuntu 16.04 LTS) :

image

This happens because echo doesn't interpret backslash escapes by default on some distros, it only does so with the -e flags, which doesn't have a consistent behavior. Using printf solves that and makes sure that the newline characters are outputed correctly.

ref: http://stackoverflow.com/questions/8467424/echo-newline-in-bash-prints-literal-n/8467449

jamesob commented 7 years ago

Per usual, @MrMitch to the rescue. Thanks!

MrMitch commented 7 years ago

I actually caught this one on pure luck because i was installing desk on a fresh Ubuntu 16.04 ;)