uses the terminal size to display search output, add -notrunc and fix bug in resize
add if to prevent crash
Merge pull request #1163 from dotcloud/1137-change_search_size-feature

* Client : uses the terminal size to display search output, add -notrunc