- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: autocompletion in HP-UX default shells
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
Discussions
Discussions
Forums
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
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
тАО06-24-2009 11:44 PM
тАО06-24-2009 11:44 PM
autocompletion in HP-UX default shells
- Tags:
- autocompletion
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-25-2009 12:38 AM
тАО06-25-2009 12:38 AM
Re: autocompletion in HP-UX default shells
I have tried this on my system, and ksh doesnt appear to have tab completion, it does have access to a history but I'm pretty sure that you cant use the arrow keys to do this. Also be aware that the ksh I have used is a 32bit port from the hpux developers site, so I dont think its 64bit aware.
http://hpux.connect.org.uk/
hope that helps
regards
Matt
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-25-2009 12:41 AM
тАО06-25-2009 12:41 AM
Re: autocompletion in HP-UX default shells
To use the filename completion in HP-UX ksh, you must first activate one of the editing modes (emacs, gmacs or vi). This is done with a command like "set -o emacs" or "set -o vi".
When the vi editing mode is enabled, filename completion can be attempted by typing "ESC \".
If you use the emacs/gmacs editing mode, the keystroke is usually "ESC ESC". (Depending on your terminal settings, Alt-ESC might also work in some cases.)
In both cases, the filename will be completed only if the shell finds exactly one matching file or directory. If it's a directory, "/" will be appended to the name automatically.
This information can be found in the ksh man page, by searching for the word "completion".
MK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-25-2009 12:55 AM
тАО06-25-2009 12:55 AM
Re: autocompletion in HP-UX default shells
its depend on your setting
set -o vi
or emacs
set -o emacs
http://geosoft.no/development/emacs.html
mikap
PS : i'm using set -o vi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-25-2009 01:38 AM
тАО06-25-2009 01:38 AM
Re: autocompletion in HP-UX default shells
I found out the default csh on HP-UX has *both* filename completion and command completion, but it seems it doesn't have vi-editing mode?
or am I missing something?
Also what is the quick way to remap esc completion to tab completion?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-25-2009 02:39 AM
тАО06-25-2009 02:39 AM
Re: autocompletion in HP-UX default shells
No, you must use ESC.
>I found out the default csh on HP-UX has *both* filename completion and command completion, but it seems it doesn't have vi-editing mode? Or am I missing something?
No, I don't call it scummy C shell for nothing. Don't even think of using it.
>what is the quick way to remap esc completion to tab completion?
There isn't for HP-UX's ksh and sh.
>MK: When the vi editing mode is enabled, filename completion can be attempted by typing "ESC \".
That's ESC ESC.
>the filename will be completed only if the shell finds exactly one matching file or directory.
You can use ESC * for all, and ESC = to show you the list.
- Tags:
- scummy C shell
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-25-2009 04:05 AM
тАО06-25-2009 04:05 AM
Re: autocompletion in HP-UX default shells
Is there some workaround for this? tab is much simpler to use as this key is located near my usual left hand position on the keyboard.
>I found out the default csh on HP-UX has >*both* filename completion and command >completion, but it seems it doesn't have >vi-editing mode? Or am I missing something?
>No, I don't call it scummy C shell for >nothing. Don't even think of using it.
If only csh had vi-editing mode it would be much better than POSIX sh as I prefer to use *one* key to autocomplete and not *two*.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-25-2009 05:22 AM
тАО06-25-2009 05:22 AM
Re: autocompletion in HP-UX default shells
set -o emacs
# hpterm cursor keys
alias -x _A=$(echo '\020')
alias -x _B=$(echo '\016')
alias -x _D=$(echo '\002')
alias -x _C=$(echo '\006')
# vt100 normal (non-application) cursor keys
alias -x __A=$(echo '\020')
alias -x __B=$(echo '\016')
alias -x __D=$(echo '\002')
alias -x __C=$(echo '\006')
# Home and End for typical vt100 emulations
alias -x __H=$(echo '\001')
alias -x __F=$(echo '\005')
MK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-25-2009 05:31 AM
тАО06-25-2009 05:31 AM
Re: autocompletion in HP-UX default shells
The HP-UX Posix shell ('/sbin/sh') _must_ be used for the root account. To change this will cripple a reboot.
The default Posix shell for non-root user's is the dynamically linked '/usr/bin/sh'.
One option might be to install a Bash shell (e.g. from the HP Porting Centre).
http://hpux.connect.org.uk/hppd/hpux/Shells/bash-4.0.010/
If you choose to install the bash shell, be sure to install its dependencies!
As Dennis, noted, the C shell is a brain-dead dysfunctional shell that should be avoided.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-25-2009 08:55 AM
тАО06-25-2009 08:55 AM
Re: autocompletion in HP-UX default shells
let's see....it absolutely can't be used as root's default shell....it has issues if its a users default shell w/ CDE, then there's always "csh programming considered harmful" at:
http://faqs.cs.uu.nl/na-dir/unix-faq/shell/csh-whynot.html
bash is a better alternative if you absolutely insist that you must have command completion w/ 1 keystroke I guess. and you could always start it after a successful login (if needed) when logging in as "root"