<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: weird vi style command line recall / editing gotcha... in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/weird-vi-style-command-line-recall-editing-gotcha/m-p/3340030#M874533</link>
    <description>You can delete the line and then do a :wq so that vi will save and then exit.  Doing just a :q basically just exits and doesn't save what you did so it still executes whatever is in the /var/tmp file for that vi session.  Saving the blank file is the key.  &lt;BR /&gt;&lt;BR /&gt;When you exit, you will see a file name like /var/tmp/sh16819.3   That file does not exist for very long.  I just did that and immediately did an 'll /var/tmp/sh16819.3' and the file does not exist.&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Fri, 23 Jul 2004 14:37:49 GMT</pubDate>
    <dc:creator>Patrick Wallek</dc:creator>
    <dc:date>2004-07-23T14:37:49Z</dc:date>
    <item>
      <title>weird vi style command line recall / editing gotcha...</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/weird-vi-style-command-line-recall-editing-gotcha/m-p/3340029#M874532</link>
      <description>Using posix shell with command recall and vi style editing, I'm familiar using with the common vi commands to add, change, modify etc the command and resubmit it... do that all the time. &lt;BR /&gt;&lt;BR /&gt;But, sometimes after I recall the command, I accidentally hit the "v" key. It puts me into screen mode vi with the recalled command as the file being edited. Here's the gotcha: I haven't been able to figure out how to exit out of vi without having the original command get executed by the shell. Even if I delete the entire line so that vi shows a blank file, and then do a :q , the shell still executes the original command.&lt;BR /&gt;&lt;BR /&gt;If you don't understand what I mean, you can try it yourself, -  enter a benign command, for example "pwd". Recall it with ^k, hit the "v" key, ( should put you into screen mode vi with the pwd command as the whole contents of the file), then try to get out of vi without having the pwd command get executed again.&lt;BR /&gt;&lt;BR /&gt; - John</description>
      <pubDate>Fri, 23 Jul 2004 14:31:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/weird-vi-style-command-line-recall-editing-gotcha/m-p/3340029#M874532</guid>
      <dc:creator>John Kittel</dc:creator>
      <dc:date>2004-07-23T14:31:05Z</dc:date>
    </item>
    <item>
      <title>Re: weird vi style command line recall / editing gotcha...</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/weird-vi-style-command-line-recall-editing-gotcha/m-p/3340030#M874533</link>
      <description>You can delete the line and then do a :wq so that vi will save and then exit.  Doing just a :q basically just exits and doesn't save what you did so it still executes whatever is in the /var/tmp file for that vi session.  Saving the blank file is the key.  &lt;BR /&gt;&lt;BR /&gt;When you exit, you will see a file name like /var/tmp/sh16819.3   That file does not exist for very long.  I just did that and immediately did an 'll /var/tmp/sh16819.3' and the file does not exist.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 23 Jul 2004 14:37:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/weird-vi-style-command-line-recall-editing-gotcha/m-p/3340030#M874533</guid>
      <dc:creator>Patrick Wallek</dc:creator>
      <dc:date>2004-07-23T14:37:49Z</dc:date>
    </item>
    <item>
      <title>Re: weird vi style command line recall / editing gotcha...</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/weird-vi-style-command-line-recall-editing-gotcha/m-p/3340031#M874534</link>
      <description>Do :wq instead... it saves the deletion to the temp file it created and doesn't execute the original command.</description>
      <pubDate>Fri, 23 Jul 2004 14:38:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/weird-vi-style-command-line-recall-editing-gotcha/m-p/3340031#M874534</guid>
      <dc:creator>Jeff_Traigle</dc:creator>
      <dc:date>2004-07-23T14:38:58Z</dc:date>
    </item>
    <item>
      <title>Re: weird vi style command line recall / editing gotcha...</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/weird-vi-style-command-line-recall-editing-gotcha/m-p/3340032#M874535</link>
      <description>Thanks guys. You've saved me again.&lt;BR /&gt;&lt;BR /&gt; - John</description>
      <pubDate>Fri, 23 Jul 2004 14:42:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/weird-vi-style-command-line-recall-editing-gotcha/m-p/3340032#M874535</guid>
      <dc:creator>John Kittel</dc:creator>
      <dc:date>2004-07-23T14:42:10Z</dc:date>
    </item>
    <item>
      <title>Re: weird vi style command line recall / editing gotcha...</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/weird-vi-style-command-line-recall-editing-gotcha/m-p/3340033#M874536</link>
      <description>Hi John,&lt;BR /&gt;&lt;BR /&gt;Switch back to the original screen &amp;amp; do a Ctrl-C &amp;amp; *then* go to the vi screen &amp;amp; close it out. The recalled command will not be executed on the org screen.&lt;BR /&gt;What you're interrupting with the Ctrl-C is an fc command that looks like&lt;BR /&gt;&lt;BR /&gt;fc -e "${VISUAL:-${EDITOR:-vi}}" X&lt;BR /&gt;&lt;BR /&gt;where X=command offset number.&lt;BR /&gt;In fact you should be able to pull it up out of history.&lt;BR /&gt;&lt;BR /&gt;HTH,&lt;BR /&gt;Jeff</description>
      <pubDate>Fri, 23 Jul 2004 14:43:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/weird-vi-style-command-line-recall-editing-gotcha/m-p/3340033#M874536</guid>
      <dc:creator>Jeff Schussele</dc:creator>
      <dc:date>2004-07-23T14:43:20Z</dc:date>
    </item>
    <item>
      <title>Re: weird vi style command line recall / editing gotcha...</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/weird-vi-style-command-line-recall-editing-gotcha/m-p/3340034#M874537</link>
      <description>Jeff, how do I switch back to original screen?</description>
      <pubDate>Fri, 23 Jul 2004 14:44:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/weird-vi-style-command-line-recall-editing-gotcha/m-p/3340034#M874537</guid>
      <dc:creator>John Kittel</dc:creator>
      <dc:date>2004-07-23T14:44:45Z</dc:date>
    </item>
    <item>
      <title>Re: weird vi style command line recall / editing gotcha...</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/weird-vi-style-command-line-recall-editing-gotcha/m-p/3340035#M874538</link>
      <description>I should have mentioned that this was the CDE desktop method - i.e. I'm running dtterm sessions. My editor pops up in it's own "Text Editor" screen with the temp file name in the title.&lt;BR /&gt;You must just be plain old telnetted or ssh'd in.&lt;BR /&gt;&lt;BR /&gt;Rgds,&lt;BR /&gt;Jeff</description>
      <pubDate>Fri, 23 Jul 2004 14:52:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/weird-vi-style-command-line-recall-editing-gotcha/m-p/3340035#M874538</guid>
      <dc:creator>Jeff Schussele</dc:creator>
      <dc:date>2004-07-23T14:52:38Z</dc:date>
    </item>
    <item>
      <title>Re: weird vi style command line recall / editing gotcha...</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/weird-vi-style-command-line-recall-editing-gotcha/m-p/3340036#M874539</link>
      <description>Thanks Jeff. Yes, I'm in with telnet.&lt;BR /&gt;&lt;BR /&gt; - John</description>
      <pubDate>Fri, 23 Jul 2004 14:54:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/weird-vi-style-command-line-recall-editing-gotcha/m-p/3340036#M874539</guid>
      <dc:creator>John Kittel</dc:creator>
      <dc:date>2004-07-23T14:54:53Z</dc:date>
    </item>
    <item>
      <title>Re: weird vi style command line recall / editing gotcha...</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/weird-vi-style-command-line-recall-editing-gotcha/m-p/3340037#M874540</link>
      <description>Sorry for the off topic question ----&lt;BR /&gt;&lt;BR /&gt;Jeff Schussele -- How do you have your CDE set up so it does that.  I'm also working from CDE with dtterm windows to a bunch of my machines, but when I hit 'v' I get the plain ole vi within that terminal window.  What give?</description>
      <pubDate>Fri, 23 Jul 2004 14:57:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/weird-vi-style-command-line-recall-editing-gotcha/m-p/3340037#M874540</guid>
      <dc:creator>Patrick Wallek</dc:creator>
      <dc:date>2004-07-23T14:57:23Z</dc:date>
    </item>
    <item>
      <title>Re: weird vi style command line recall / editing gotcha...</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/weird-vi-style-command-line-recall-editing-gotcha/m-p/3340038#M874541</link>
      <description>Hi Patrick,&lt;BR /&gt;&lt;BR /&gt;It's 11.11 out of the box default on a B2600.&lt;BR /&gt;I've checked the Style Manager, Application Manager, Window Info, Windows Properties &amp;amp; can find nothing out of the ordinary.&lt;BR /&gt;BUT I do find that when I run - in any session&lt;BR /&gt;#env | grep -i editor    I get&lt;BR /&gt;EDITOR=/usr/dt/bin/dtpad&lt;BR /&gt;So it has to be set up by dt somehow, although I have nothing explicitly set in .dtprofile&lt;BR /&gt;System boots | init runs ttsession -s | then dtsession runs | which serves as a parent for dtwm | which is the parent for all the dtexec commands when I open windows&lt;BR /&gt;&lt;BR /&gt;Rgds,&lt;BR /&gt;Jeff</description>
      <pubDate>Fri, 23 Jul 2004 15:39:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/weird-vi-style-command-line-recall-editing-gotcha/m-p/3340038#M874541</guid>
      <dc:creator>Jeff Schussele</dc:creator>
      <dc:date>2004-07-23T15:39:13Z</dc:date>
    </item>
  </channel>
</rss>

