samg / timetrap

Simple command line timetracker
http://rubygems.org/gems/timetrap
Other
1.48k stars 116 forks source link

Newline for 't now' while not tracking #106

Closed qmanjr5 closed 4 years ago

qmanjr5 commented 9 years ago

When I'm checked into a timesheet, doing echo -n $(t n) (or some variations thereof) result in no newline at the end, as I want. However, when you're currently not checked into a sheet, the newline is still there

qmanjr5 commented 9 years ago

I was able to achieve what I was looking to do by redirecting stderr to stdout echo -n t n 2>&1

I believe this is something that should be fixed, unless it's specifically designed like this. If so, why?

categulario commented 4 years ago

internally the function puts is used. Try this:

#cosa.rb
puts "hello"

then

echo -n $(ruby cosa.rb)

I'll close this for now