OS X terminal mode improvements