News for hackers. Stuff that matters.
Re:ITerm2 2.0 by PaulMest on Tuesday July 15, 2014 @03:20AM (#8035197)
One feature I really wish iTerm2 2.0 would have introduced was better session restoration support. With Terminal.app, you can issue a command like 'ls' and then quit and re-open Terminal.app and the previous output from 'ls' shows up. This is incredibly useful when you have to restart or if your system crashes and you have some output that you wanted to preserve.

I see from the changelog that some type of restoration has been included: "Support for OS 10.7 features including fullscreen, retina graphics, and window restoration"... but upon actually trying it out, it doesn't do what Terminal.app does.

Re:ITerm2 2.0 by kybernetyk on Tuesday July 15, 2014 @04:01AM (#8035302)
> One feature I really wish ...

It's open source. Why don't you add it yourself?

I wanted a borderless terminal and as I couldn't find one I hacked the functionality into iTerm: http://i.imgur.com/jOc04sf.jpg

/edit: Wow, being downvoted for suggesting to hack something yourself on Hacker News ... that's a new one. I guess I'll take a time out.

Re:ITerm2 2.0 by cujo on Tuesday July 15, 2014 @09:46AM (#8036352)
As others have pointed out, it's just an inappropriate comment.

Yes it's open source, and yes, anyone can hack on it themselves. But 99.99999% of the time it's not realistic.

Nearly every piece of software on my computer could be enhanced to fit me personally, but there's no way I could justify the time and energy to work on it. Also, in most cases I have no desire to learn the stack/underpinnings for a particular enhancement.

Lastly, the comment comes off as condescending. Are we really not allowed to wish for things? Must we personally fix everything we find an inconvenience or problem with?

Re:ITerm2 2.0 by ionforce on Tuesday July 15, 2014 @12:55PM (#8037555)
Though I agree with you, where is the stick in the ground? The OSS community's theme song has always been "you can do it yourself", even though that has long been not realistic for many people. So, nothing here is different as far as I can tell.
Re:ITerm2 2.0 by danudey on Wednesday July 16, 2014 @11:31AM (#8042545)
> The OSS community's theme song has always been "you can do it yourself"

In my experience over the last 15 years, that theme song can often veer from "you can do it yourself" (empowerment) to "do it yourself" (dismissal); replying to a reasonable feature request, in any context, with 'fix it yourself' is one of the things that turned a lot of people off OSS around the time of the first 'year of linux on the desktop'.

The GIMP was the best example of this, with professional graphics editors, illustrators, etc. requesting features and being told 'no one needs those features' and 'if you want it so much, do it yourself', and it hurt their image a lot with many potential users, both technical and non-technical.

Personally, I'm glad that attitude has largely disappeared (though apparently, not entirely).

Re:ITerm2 2.0 by jasonlotito on Tuesday July 15, 2014 @08:42AM (#8036050)
> Wow, being downvoted for suggesting to hack something yourself on Hacker News ... that's a new one. I guess I'll take a time out.

You'll also get downvoted for complaining about being downvoted. That's almost verboten here, and explicitly mentioned in the guidelines.

When you get downvoted, accept that possible your comment detracts from the conversation. It doesn't just not add anything, but takes away. It's noise.

If your first reaction is to edit your comment and complain, then that's a clear sign you aren't in the right frame of mind to contribute meaningfully.

Your original comment was, if I may be so bold, cliche. Maybe that's the wrong word, but it comes up by someone with your attitude generally every time a thread about an open source project comes along. It literally is something that can go without saying.

Re:ITerm2 2.0 by kordless on Tuesday July 15, 2014 @09:24AM (#8036228)
His original comment didn't lack originality because he posted something that he did that was quite interesting. I, for one, believe that anyone is capable of anything they set out to complete. I don't think noticing a polarized reaction from a community you participate in is always a transgression. No ruleset rationalizes the community's reactions 100% of the time.
Re:ITerm2 2.0 by riquito on Tuesday July 15, 2014 @04:21AM (#8035334)
> It's open source. Why don't you add it yourself?

In your mind a developer can realistically contribute to any possible open source project, whatever the language and the domain?

He may have to learn an humongous quantity of things to implement a feature and then never use that knowledge anymore.

Founding the project while asking for a feature could be a better advice.

Re:ITerm2 2.0 by 72deluxe on Wednesday July 16, 2014 @05:09AM (#8041181)
Wouldn't the learning be interesting though?
Re:ITerm2 2.0 by afarrell on Tuesday July 15, 2014 @08:02AM (#8035887)
*funding
Re:ITerm2 2.0 by ryanobjc on Wednesday July 16, 2014 @02:39AM (#8040849)
*he ?
Re:ITerm2 2.0 by quarterto on Tuesday July 15, 2014 @04:30AM (#8035352)
You're getting downvoted for the dismissive tone, not the content.
Re:ITerm2 2.0 by skue on Tuesday July 15, 2014 @07:18AM (#8035776)
I agree with your sentiment and it is depressing to see you downvoted. On HN I would have hoped your comment would stimulate those familiar with the code base to offer hints of where to start hacking, rather than rapid down arrow clicks.
Re:ITerm2 2.0 by danudey on Wednesday July 16, 2014 @11:34AM (#8042562)
He was downvoted for the dismissive and condescending attitude, which helps no one. The idea that anyone can work on iTerm is fantastic, but when someone posts a suggestion/request/wishlist item and is essentially told to 'do it yourself' that just comes across as hostile and unwelcoming.

The exact same sentiment could have easily been posted in a friendly and welcoming manner, but that didn't happen and that's why he's getting downvoted.

Re:ITerm2 2.0 by 72deluxe on Wednesday July 16, 2014 @05:11AM (#8041191)
Errr are you running the Yosemite beta? I love the dark menu bars.

How do you find it? Do you find the kindergarten icon colours irritating? What about the blurriness? Do you feel like you've switch to varifocal lenses and are constantly rubbing your eyes?

What about the lack of Maximise/Zoom button? I don't want everything fullscreen - the menubar has MenuMeters running in it and a clock which you can't see in Fullscreen mode. I use ShiftIt to maximise the window when Zoom is being dumb and fear for my future with this insane "maximise" button removal.

Re:ITerm2 2.0 by jedanbik on Tuesday July 15, 2014 @09:09AM (#8036170)
I upvoted you. Got a Github page to share?
Re:ITerm2 2.0 by tlrobinson on Tuesday July 15, 2014 @11:13PM (#8040372)
I dislike your comment but I like your borderless hack. Have you attempted to contribute it back?
Re:ITerm2 2.0 by Igglyboo on Tuesday July 15, 2014 @10:41PM (#8040294)
> It's open source. Why don't you add it yourself?

This attitude seriously needs to die.

Re:ITerm2 2.0 by akerl_ on Wednesday July 16, 2014 @12:37AM (#8040592)
The open source community cannot simultaneously use "anybody can fix bugs and add features" as one of their loudest pitches and then get offended when people suggest doing so. Either being able to dive in and fix it yourself is an edge case or it is not.
Re:ITerm2 2.0 by danudey on Wednesday July 16, 2014 @12:02PM (#8042742)
Being able to dive in and fix it yourself is definitely an edge case. Even among people who use terminals, I don't know that many who are able or willing, or who have the time or energy, to learn the codebase enough to add a feature.

'The open-source community' isn't pitching this idea and also rejecting it. 'Tone-deaf open-source proponents' are pitching it (or, in this case, suggesting it, and rudely) and regular, well-socialized people are criticizing it as a good idea poorly said.

Re:ITerm2 2.0 by akerl_ on Wednesday July 16, 2014 @04:45PM (#8044452)
Both those groups of people comprise 'the open source community'.
Re:ITerm2 2.0 by jason_slack on Tuesday July 15, 2014 @11:30AM (#8036988)
Love your hack, I want it! LOL.
Re:ITerm2 2.0 by gnachman on Tuesday July 15, 2014 @01:40PM (#8037844)
Nope, no restoration support yet. I'm concerned about the performance hit.
Re:ITerm2 2.0 by swift on Wednesday July 16, 2014 @12:19AM (#8040552)
I can see it being a performance issue if you need to fsync session updates to disk constantly, but personally I'd be pretty much happy if the session was only saved at normal shutdown. Maybe saving it after a certain idle period would also be useful.

Would that mitigate your performance concerns, or did I not guess the source of the issue correctly?

Re:ITerm2 2.0 by ansimionescu on Tuesday July 15, 2014 @03:38AM (#8035247)
I wish tabs would have separate (non-shared) history. I did try this [0] but it doesn't work all the time (!?).

0: http://apple.stackexchange.com/questions/75571/the-history-i...

Re:ITerm2 2.0 by paddyoloughlin on Tuesday July 15, 2014 @04:34AM (#8035365)
The history is a property of the shell (bash, zsh), not the terminal.

Edit: I wrote a thing here about the difficulty of carrying history across terminal sessions and how can you associate a tab you open now with a tab you had open in a previous session, but then I realised that I misread your post.

I would expect the answer in the posted link to work. The 'share_history' option, when set, tells zsh to reread the history file before performing history lookups.

Maybe try the set-local-history option documented here?

1: http://zsh.sourceforge.net/Doc/Release/Zsh-Line-Editor.html#...

Re:ITerm2 2.0 by klausa on Tuesday July 15, 2014 @03:57AM (#8035292)
I assume it pertains to Lion-style window restoration. Before 10.7, when you restarted your computer, you had to open each and every app (and every window!) again.

Since 10.7, system (assuming the app cooperates, that is) does that for you and reopens everything.

Re:ITerm2 2.0 by lukasm on Tuesday July 15, 2014 @05:09AM (#8035452)
Agree. Session restoration is really great. I would go further, though. I use `source` for virtualenv and it would be awesome if terminal could restore that as well.
Re:ITerm2 2.0 by ibisum on Tuesday July 15, 2014 @06:04AM (#8035583)
One problem I have with this is that its a massive security hole. Where does the output get stored? If its in an encrypted file, okay .. but if not: deal breaker.
Re:ITerm2 2.0 by acdha on Tuesday July 15, 2014 @09:44AM (#8036337)
1. If you regularly have passwords, keys, PII, etc. in terminal windows, your workflow should change.

2. If you care about security in any way, you should be using FileVault rather than cargo-culting it into apps (there's no way for that "encrypted file" to be secure unless you have to type in a password every time you shut down the system). If you do that, anyone who can read that file has already compromised your account and there's no additional exposure from this.

Re:ITerm2 2.0 by ibisum on Wednesday July 16, 2014 @08:51AM (#8041722)
>1. If you regularly have passwords, keys, PII, etc. in terminal windows, your workflow should change.

Security is not just about passwords. Its about operational knowledge of procedures and habits at the console, too. Knowing that a certain command is always used, or some such operational administration occurs, definitely assists attack.

>2. FileVault

FileVault is not always available, nor is it always allowable.

But history files are not only about password, as I said.

Re:ITerm2 2.0 by interpol_p on Tuesday July 15, 2014 @06:24AM (#8035641)
You can disable it system wide. But it also works on a per-app basis: if you don't want the UI state restored, then just quit the app with Cmd+Option+Q (instead of the regular Cmd+Q) and OS X will not save the application state.
Re:ITerm2 2.0 by nnnnni on Tuesday July 15, 2014 @06:29AM (#8035657)
I wish that there would have been a setting in the program options ("Preferences"... I don't know why, but that word annoys me in this context) so that the user wouldn't always have to do cmd-opt-q. Maybe the best option would be to have a checkbox that swaps the behavior ("don't save the output unless I press cmd-opt-q").

THANKS for letting us know about cmd-opt-q! I'll have to start using that all the time since it does seem like a potential security hole.

Re:ITerm2 2.0 by interpol_p on Tuesday July 15, 2014 @06:58AM (#8035731)
You can disable window restoration system wide (System Preferences -> General -> "Close windows when quitting an app").

So you don't have to use the shortcut at all in that case.

Personally I prefer getting used to using it on a case-by-case basis. For example, when I leave work I tend to quit most apps on my laptop with Cmd+Option+Q, so that when I get home they don't re-open with work and I can start working on personal projects.

Re:ITerm2 2.0 by nnnnni on Tuesday July 15, 2014 @10:30AM (#8036609)
I don't want to disable it system-wide -- just for the terminal!

I'll just have to get used to cmd-opt-q.

Re:ITerm2 2.0 by redacted on Tuesday July 15, 2014 @08:21PM (#8039939)

  defaults write com.apple.Terminal NSQuitAlwaysKeepsWindows -bool false
or something similar ought to do the trick
Re:ITerm2 2.0 by clin_ on Tuesday July 15, 2014 @03:39AM (#8035248)
You can get session management by using tmux integration.

Terminal.app almost certainly does not do what you're describing by default.

Re:ITerm2 2.0 by LeoPanthera on Tuesday July 15, 2014 @03:47AM (#8035266)
> Terminal.app almost certainly does not do what you're describing by default.

Yes, it does. http://i.imgur.com/kYmlBk8.png

Re:ITerm2 2.0 by ghshephard on Tuesday July 15, 2014 @05:07AM (#8035449)
tmux doesn't help you in this scenario, because the tmux process is lost during a system reboot. I concur with the parent - Terminal.App's ability to restore the previous sessions output after a system crash (which on my macbook Air ranges from daily to weekly - FTDI USB Drivers and Display Port cable being to the two major reason) really make me appreciate that feature.
Re:ITerm2 2.0 by nicholassmith on Tuesday July 15, 2014 @05:48AM (#8035533)
"FTDI USB Drivers", if it's the VCP ones the very latest ones have been reasonably stable for me. I've not had a system crash for quite a while now, whereas I was having them weekly with an older version.
Re:ITerm2 2.0 by ghshephard on Tuesday July 15, 2014 @06:42AM (#8035692)
Nope - I'm on the latest 2.2.18 drivers still flakey as can be - This has been an ongoing issue for me for about two years - it's a pain when you are working on a Cisco Router, and you unplug the cable and kernel panic. I guess on the (weirdly?) pro side, it's at least fairly consistent - about 20% of the time, the Macbook (two generations now for me, 2010, and 2013) kernel panics.

This is where Terminal.app (or possibly OS X 10.9 + Terminal.app) ability to show you your terminal history on recovery from Kernel Panic is really appreciated.

If only there was a reliable USB-Serial cable/controller/interface for the Mac. Unfortunately, RS-232 is so rare (except for consoling into Cisco Routers?) that there is no incentive for any vendor to actually write a half stable driver.

Re:ITerm2 2.0 by jauer on Wednesday July 16, 2014 @12:07AM (#8040518)
Assuming a PL-2032, Have you tried the alternate open-source drivers? http://nozap.me/driver/osxpl2303/index.html

That fixed the KP for me and got break to work which didn't out of the box.

Before the updated drivers I worked around the KP by closing cu/screen before unplugging the cable.

Re:ITerm2 2.0 by bydo on Tuesday July 15, 2014 @09:22AM (#8036218)
I don't know what sort of serial adapter you're using, but I've used a number of the PL2303-based ones over the years (currently a Trendnet TU-S9), and have never had them cause any sort of instability. Weird.
Re:ITerm2 2.0 by ghshephard on Tuesday July 15, 2014 @07:35PM (#8039784)
I've never found any one particular USB-Serial Adapter to be any more reliable. Currently using the Tripp Lite Keyspan, Model USA-49WG, SKU CU8037. Appears on the USB chain as: Product ID: 0x0131, Vendor ID: 0x06CD. Still kernel panics when I pull out the USB Cable.

I carry a Dell Laptop when going to customer sites+Putty for consoling into Cisco Routers because I've never found a Serial Cable/USB combination that doesn't cause the Macbook air to Kernel Panic.

I'll give the PL-2303 based device a chance - I see there is a nice comparison site here:

http://www.usconverters.com/index.php?main_page=page&id=60

I'll definitely try the Trendnet TU-S9. Here's hoping 4 years of weekly hell on my mac laptop comes to an end...

But, maybe I'll try upgrading to Mavericks - this seems to suggest that some progress has been made in the FTDI driver department: https://developer.apple.com/library/mac/technotes/tn2315/_in...

Re:ITerm2 2.0 by ghshephard on Tuesday July 15, 2014 @07:31PM (#8039765)
I've never found any one particular USB-Serial Adapter to be any more reliable with the FTDI drivers on the Mac. Currently using the Tripp Lite Keyspan, Model USA-49WG, SKU CU8037. Appears on the USB chain as: Product ID: 0x0131, Vendor ID: 0x06CD.

I carry a Dell Laptop when going to customer sites+Putty for consoling into Cisco Routers because I've never found a Serial Cable/USB combination that doesn't cause the Macbook air to Kernel Panic.

I'll give the PL-2303 based device a chance - I see there is a nice comparison site here:

http://www.usconverters.com/index.php?main_page=page&id=60

I'll definitely try the Trendnet TU-S9. Here's hoping 4 years of weekly hell on my mac laptop comes to an end...

Re:ITerm2 2.0 by nnnnni on Tuesday July 15, 2014 @06:26AM (#8035646)
I'm thrilled to hear that I'm not the only one! My MBA always crashes after I remove a Cisco console cable...