- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Up Arrow fro Command Recall
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-16-2001 06:46 AM
07-16-2001 06:46 AM
Up Arrow fro Command Recall
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-16-2001 06:59 AM
07-16-2001 06:59 AM
Re: Up Arrow fro Command Recall
Don't know how to use arrows to recall commands
but if you work in ksh you can use "Esc -" and
"Esc +" (don't forget to source your .profile
at login, with dtlogin, ie CDE environment, you
have to uncomment last line in .dtprofile :
SOURCEPROFILE=..)
HTH
Herv?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-16-2001 07:15 AM
07-16-2001 07:15 AM
Re: Up Arrow fro Command Recall
You can try this.
type ksh -o vi once you have logged in. It will create a history file .sh_history in your home directory. This file stores the command you type after ksh -o vi and will store till you exit from the shell by pressing cntl+D or exit.
to move to previous command you use the vi navigation keys k & j for moving up and down. press Esc and k to go to previous command and keep pressing k till you come to the command you are looking for. You can modify the command in the manner you modify a vi script. See if this helps. I'm doubtful you can use arrow keys to navigate. But others might be able to help on that. keep your fingers crossed.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-16-2001 07:16 AM
07-16-2001 07:16 AM
Re: Up Arrow fro Command Recall
Robin.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-16-2001 07:42 AM
07-16-2001 07:42 AM
Re: Up Arrow fro Command Recall
tcsh has this feature.
or try to add this line in your .login file.
setenv EDITOR emacs
logout and logback in.
Sachin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-16-2001 07:49 AM
07-16-2001 07:49 AM
Re: Up Arrow fro Command Recall
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-16-2001 09:25 AM
07-16-2001 09:25 AM
Re: Up Arrow fro Command Recall
If you-re in posix or ksh shells, you can set them to recall your last commands using vi shortcuts ESC-K ESC-J and use vi commands to modify and execute them.
If you really want to use arrows, you need to download another shell not built in nor supported in hp-ux, bash shell:
http://hpux.connect.org.uk/hppd/cgi-bin/search
look for bash.
bash-2.05 (4 May 2001)
Best regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-16-2001 10:15 AM
07-16-2001 10:15 AM
Re: Up Arrow fro Command Recall
You can find out by using vi on a bogus file.
"vi myfile"
Type :no beautify
Hit "i" for insert, hit control-V, then hit the up arrow. If you see ^[[A, your up arrow is ^[ <--what escape looks like on the screen.
[A <-- the rest of the text.
Now how do you get this to alias to escape-K? I dunno.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-16-2001 12:59 PM
07-16-2001 12:59 PM
Re: Up Arrow fro Command Recall
1) My default shell is /usr/bin/ksh
2) In my .profile I have the following:
.
.
alias -x __A'^P' # Aliases up arow to Ctl P
alias -x __B'^N' # Aliases down arrow to Ctl N
alias -x __C'^F' # Aliases right arrow to Ctl F
alias -x __D'^B' # Aliases left arrow to Ctl B
alias -x __H'^A' # Aliases home key to Ctl A
set -o emacs # emacs control squences to edit cmds
.
.
3) I am using fvwm and set TERM=xterm
Good luck
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-18-2001 04:12 AM
07-18-2001 04:12 AM
Re: Up Arrow fro Command Recall
Jack Werner, I tried your alias command, but the syntax bombed out on me. I don't want to use emacs because I like vi too much (believe or not). The -x is not listed in the alias man page. We're talking hp here right?
anyway I type.
alias 'control-v
I get ^[[A: Invalid alias name.
Is there a special name for the up arrow for alias command?
I know buried in the termcap would be the definition that says to type
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-18-2001 06:52 AM
07-18-2001 06:52 AM
Re: Up Arrow fro Command Recall
I am able to get the ctrl-p and cntl-n to work (and also the esc sequences if I change to vi mode), but I really want the actual arrow keys.
It looks like the last suggestion about aliasing the keys might be promising, but I think I'll need a bit more help getting it to work. Steve, did you have any luck?
Thanks fro all the suggestions, Jeanine
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-30-2001 05:38 AM
07-30-2001 05:38 AM
Re: Up Arrow fro Command Recall
No. I have not been working on it lately.
I could not get the alias command to take goofy escape sequences as an alias name. It considers the "text" a shell function. But the name escape[A is too strange.
But I should tell about an obvious way around the problem I used before. Modify the windows terminal emulator's keymap (IF you have that option).
One time I had users that insisted the "end" key is now called the "action" key for some old cobol thing running on a very old hp. I discovered the little bugger wanted to see "escape[escape\1". (nice huh?). I got the end key to work right by modifying the keymap of the Reflections emulator. If could have messed with termpcap. But that little tweek was FAR from standard.
Now reflections and tinyterm both have key mapping utilities. Those are the two I used in the past.
Steve