- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Command completion with tab using Posix shell
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
12-23-2002 03:16 AM
12-23-2002 03:16 AM
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-23-2002 05:20 AM
12-23-2002 05:20 AM
Re: Command completion with tab using Posix shell
$EDITOR=vi
$export EDITOR
$set -o vi
Try the command completion.
To make changes permanent put it inside .profile file of the user
Revert
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-23-2002 06:55 AM
12-23-2002 06:55 AM
Re: Command completion with tab using Posix shell
John
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-23-2002 07:22 AM
12-23-2002 07:22 AM
Re: Command completion with tab using Posix shell
I don't know what HP-UX's equivalent is.
But I know that Bash is using it.
Bash also parses /etc/inputrc and $HOME/.inputrc where you have many additional bells and whistels.
If you're unhappy with Esc, Esc of HP-UX's sh-posix you can always get the sources of Bash from the FSF and build your custom shell from them.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-23-2002 08:11 AM
12-23-2002 08:11 AM
Re: Command completion with tab using Posix shell
I'm also a little concernewd that you indicate that you do most of your work as root user. You should really be doing most of your work as a regular user and then su'ing to root only as needed. This helps to keep you from being your own worst enemy.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-23-2002 08:18 AM
12-23-2002 08:18 AM
Re: Command completion with tab using Posix shell
Re working as root. My main development machine is Linux, and I avoid root there. For the HP-UX machines my changes are generally sys-admin ones that need root privleges rather than user level access.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-23-2002 08:22 AM
12-23-2002 08:22 AM
Re: Command completion with tab using Posix shell
I find the arrow keys on Linux less intutive than escape k on HP-UX 'cause I learned UX first.
I have been advised against trying to make Linux work likd UX and vice versa.
You need to consider what happens when you're on your dream vacation, climbing a mountain or whatever and someone else needs to work on your system.
Changing default shell behavior will confuse them and slow them down. You are right to not tocuh the root shell. It would be more fun to play with dynamite.
STeve
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-23-2002 08:40 AM
12-23-2002 08:40 AM
Re: Command completion with tab using Posix shell
Do you use an emulator for your sessions ?
You could use keyboard macro's to assign the value of tab
HTH
Steve
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-27-2002 01:01 AM
12-27-2002 01:01 AM
SolutionI never meant to suggest to change root's login shell whatsoever
(though you can build a statically linked Bash from the Bash sources that you copy to /sbin, see "Configure --help")
Indeed I have given the root acount Bash as kind of a pseudo login shell on some of our HP-UX boxes.
But I didn't touch the 7th field of /etc/passwd at all.
The safe way to do it is to exec a Bash during login.
Therefore one only has to modify root's .profile.
First I created a .bash_profile (with special settings that take care of the extended features of Bash, e.g. prompting).
Then I also created a .bashrc (which holds alii and func definitions for my Bash sessions).
Read the manpage of Bash to find out the way and order in which Bash looks for configuration files.
In the original .profile I would place a test to look for a Bash executable like
if [ -x /usr/bin/bash ]; then
That would safe you from trying to switch root's login shell during maintenance mode.
If the above condition evaluates true we know that /usr is mounted and Bash is available.
Finally as last statement in .profile I'd exec a login Bash
exec /usr/bin/bash --login
In .bash_profile I'd also source .bashrc and
export BASH_ENV=$HOME/.bashrc
to get the alii also for the pseudo login Bash.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-30-2002 12:54 AM
12-30-2002 12:54 AM
Re: Command completion with tab using Posix shell
Thanks for all your suggestions.
John