{"id":1269,"date":"2010-06-11T15:07:05","date_gmt":"2010-06-11T05:07:05","guid":{"rendered":"http:\/\/www.somethinkodd.com\/oddthinking\/?p=1269"},"modified":"2010-06-11T15:07:05","modified_gmt":"2010-06-11T05:07:05","slug":"windows-look-and-feel-for-ssh-and-dos-command-lines","status":"publish","type":"post","link":"https:\/\/www.somethinkodd.com\/oddthinking\/2010\/06\/11\/windows-look-and-feel-for-ssh-and-dos-command-lines\/","title":{"rendered":"Windows look-and-feel for SSH and DOS command lines"},"content":{"rendered":"<p>Here are the specs for a great weekend project that I don&#8217;t have time for.<\/p>\n<h3>Basic Premises<\/h3>\n<ul>\n<li>That when the little fundamental bricks of user interface design (how cut-and-paste works, how to navigate the cursor, how to cancel an application) get internalised, a whole layer of thought process can be removed and replaced by muscle-memory.<\/li>\n<li>That responsiveness and correctness is important while editing, to maintain concentration and flow.<\/li>\n<li>That the greatest thing that Macintosh, and later Windows, ever brought to the software industry was user-interface standards that worked across applications.<\/li>\n<li>That Linux provides the best server environment, and that Windows provides the best generic desktop environment, where best is defined <em>for the purpose of this sentence<\/em> as &#8220;most compatible with the most important software that I will encounter, for the cheapest price&#8221;<\/li>\n<\/ul>\n<h3>My Problem<\/h3>\n<p>I edit and unit test on a Windows machine. I system test and deploy my server application on a remote (and hence low-responsiveness) Linux box.<\/p>\n<p>I use Windows, DOS<sup>*<\/sup> and Linux (over SSH with PuTTY).<\/p>\n<div class=\"aside\"><sup>*<\/sup> Strictly, I should call this the Windows Command Prompt or Windows Command Shell, but I want to highlight that I am talking about the text-based command line window which offers commands reminiscent of the original MS-DOS.<\/div>\n<p>Unfortunately, Windows, DOS and PuTTY offer very different user interfaces. (Okay, arguably, they are very similar user interfaces compared to, say, a mobile phone or a fork, but different enough to cause me problems.)<\/p>\n<p>I am constantly tripping up because of the teensy little differences.<\/p>\n<p>After making a selection by dragging with my mouse, I can copy it to the clipboard by hitting CTRL-C (Windows), hitting Enter (DOS) or doing nothing (PuTTY).<\/p>\n<p>Looking at it the other way, CTRL-V will either paste the clipboard at the current location (Windows), insert ^V (DOS) or try to page down (Linux &#8211; in emacs, or on the bash line, which I use in emacs mode).<\/p>\n<p>Similarly, CTRL-Z with either undo (Windows), enter the EOF flag (DOS) or put the job in the background (Linux).<\/p>\n<p>My productivity suffers because my muscle-memory is gone, and it even makes non-development tasks slower: I keep typing CTRL-K when writing email (Kill the rest of the line, in Emacs mode) rather than Shift-End Del (Select to the end of the line, and delete, in Windows.)<\/p>\n<h3>Proposed Solution<\/h3>\n<p>A windows application consisting of two, vertically-tiled panes, and a row of buttons.<\/p>\n<p>The top, larger, pane is a terminal window that shows the interaction with the shell. While this pane has focus, all of the keystrokes are relayed directly to the shell, and their results are sent back, just like a PuTTY window.<\/p>\n<p>The shell would either be an SSH session or a DOS session, so working with each of them is identical from a low-level look-and-feel perspective.<\/p>\n<p>The lower, shorter pane is an edit box that supports all of the standard Windows shortcuts and navigation. When a complete line is entered, the command is transmitted to the shell (appearing again in the top window.)<\/p>\n<p>The main use-case is to enter all commands in the lower window, and watch the output in the upper one. The upper pane would only have focus when the shell enters an interactive mode (such as running an editor or other application), but for most simple console tasks, the bottom pane would be sufficient.<\/p>\n<p>Ideally, the application could tell when it had left the confines of the bash\/DOS shell, and automatically change the focus.<\/p>\n<p>Underneath (?) the bottom pane, a row of buttons would allow access to the commands that are hidden by Windows shortcuts &#8211; a &#8220;background&#8221; button would send CTRL-Z, a &#8220;cancel&#8221; button would send CTRL-C, etc. (There wouldn&#8217;t be a need to send Ctrl-K, as the Kill command has a Windows shortcut equivalent.<\/p>\n<p>Some features of the bash command-line might be difficult to emulate (e.g. tab-completion). It would be possible to transmit the command line on the fly, rather than batched, to support such operations, but this may be slow and more difficult to implement.<\/p>\n<p>I don&#8217;t know of such a tool (and neither do the few dozen people who read my plea on the <a href=\"http:\/\/superuser.com\/questions\/150444\/ssh-client-and-command-prompt-replacements-windows-look-and-feel\">Super User Q&#038;A Site.<\/a>), but it sounds simple and I am ready for it!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Here are the specs for a great weekend project that I don&#8217;t have time for, that would improve my cross-development productivity.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_s2mail":"","footnotes":""},"categories":[25,34],"tags":[],"class_list":["post-1269","post","type-post","status-publish","format-standard","hentry","category-insufficiently-advanced-technology","category-software-development"],"_links":{"self":[{"href":"https:\/\/www.somethinkodd.com\/oddthinking\/wp-json\/wp\/v2\/posts\/1269","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.somethinkodd.com\/oddthinking\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.somethinkodd.com\/oddthinking\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.somethinkodd.com\/oddthinking\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.somethinkodd.com\/oddthinking\/wp-json\/wp\/v2\/comments?post=1269"}],"version-history":[{"count":3,"href":"https:\/\/www.somethinkodd.com\/oddthinking\/wp-json\/wp\/v2\/posts\/1269\/revisions"}],"predecessor-version":[{"id":1272,"href":"https:\/\/www.somethinkodd.com\/oddthinking\/wp-json\/wp\/v2\/posts\/1269\/revisions\/1272"}],"wp:attachment":[{"href":"https:\/\/www.somethinkodd.com\/oddthinking\/wp-json\/wp\/v2\/media?parent=1269"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.somethinkodd.com\/oddthinking\/wp-json\/wp\/v2\/categories?post=1269"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.somethinkodd.com\/oddthinking\/wp-json\/wp\/v2\/tags?post=1269"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}