- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: weird vi style command line recall / editing g...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-23-2004 07:31 AM
07-23-2004 07:31 AM
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.
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.
- John
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-23-2004 07:37 AM
07-23-2004 07:37 AM
SolutionWhen 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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-23-2004 07:38 AM
07-23-2004 07:38 AM
Re: weird vi style command line recall / editing gotcha...
Jeff Traigle
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-23-2004 07:42 AM
07-23-2004 07:42 AM
Re: weird vi style command line recall / editing gotcha...
- John
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-23-2004 07:43 AM
07-23-2004 07:43 AM
Re: weird vi style command line recall / editing gotcha...
Switch back to the original screen & do a Ctrl-C & *then* go to the vi screen & close it out. The recalled command will not be executed on the org screen.
What you're interrupting with the Ctrl-C is an fc command that looks like
fc -e "${VISUAL:-${EDITOR:-vi}}" X
where X=command offset number.
In fact you should be able to pull it up out of history.
HTH,
Jeff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-23-2004 07:44 AM
07-23-2004 07:44 AM
Re: weird vi style command line recall / editing gotcha...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-23-2004 07:52 AM
07-23-2004 07:52 AM
Re: weird vi style command line recall / editing gotcha...
You must just be plain old telnetted or ssh'd in.
Rgds,
Jeff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-23-2004 07:54 AM
07-23-2004 07:54 AM
Re: weird vi style command line recall / editing gotcha...
- John
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-23-2004 07:57 AM
07-23-2004 07:57 AM
Re: weird vi style command line recall / editing gotcha...
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-23-2004 08:39 AM
07-23-2004 08:39 AM
Re: weird vi style command line recall / editing gotcha...
It's 11.11 out of the box default on a B2600.
I've checked the Style Manager, Application Manager, Window Info, Windows Properties & can find nothing out of the ordinary.
BUT I do find that when I run - in any session
#env | grep -i editor I get
EDITOR=/usr/dt/bin/dtpad
So it has to be set up by dt somehow, although I have nothing explicitly set in .dtprofile
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
Rgds,
Jeff