Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

AIX 5.x set up arrow to recall

Posted on 2016-09-02
11
Medium Priority
?
108 Views
Last Modified: 2016-09-02
Hi,

I have seen many posts about using
"set -o emacs

alias __A=`echo "\020"`   # up arrow = ^p = previous
alias __B=`echo "\016"`   # down arrow = ^n = next
alias __C=`echo "\006"`   # right arrow = ^f = cursor formard
alias __D=`echo "\002"`   # left arrow = ^b = cursor backwards
alias __H=`echo "\001"`   # home = ^a = cursor at start of line
"

which works for me in the .profile but not as a global (/etc/profile).
My /etc/profile does not have "set -o vi" in it.


When I run 'alias' command, i see when using the global /etc/profile:
"__A=
__B=
__C=
__D=
"

If I decide to type "set -o emac" in my command line, the arrows work. Is there a way to fix this for me to just login without having to type set -o emac while using the global instead of .profile?
0
Comment
Question by:D T
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 5
11 Comments
 
LVL 68

Expert Comment

by:woolmilkporc
ID: 41781732
Add "set -o emacs" to your ~/.profile.
0
 

Author Comment

by:D T
ID: 41781735
So, I will have to do that for every profile? Is there any other way to have that set via global?
0
 
LVL 68

Assisted Solution

by:woolmilkporc
woolmilkporc earned 2000 total points
ID: 41781764
So add it to/etc/profile!

If there are users running under a shell other than ksh we can add some logic to determine the actual shell.
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 

Author Comment

by:D T
ID: 41781789
I have added it to /etc/profile. I have "

set -o emacs

alias __A=`echo "\020"`   # up arrow = ^p = previous
alias __B=`echo "\016"`   # down arrow = ^n = next
alias __C=`echo "\006"`   # right arrow = ^f = cursor formard
alias __D=`echo "\002"`   # left arrow = ^b = cursor backwards
alias __H=`echo "\001"`   # home = ^a = cursor at start of line
"
in that file, of course without the ("").

I have re logged and even restarted the server. It works when i type set -o emacs in the command line.
0
 
LVL 68

Assisted Solution

by:woolmilkporc
woolmilkporc earned 2000 total points
ID: 41781807
This must work!

Please issue after a fresh login and before running any other command:

set -o

What do you see next to "emacs" and "vi"?
0
 

Author Comment

by:D T
ID: 41781810
I see that emacs is off and vi is on.
0
 
LVL 68

Assisted Solution

by:woolmilkporc
woolmilkporc earned 2000 total points
ID: 41781817
So scan /etc/profile, ~/.profile and whatever initialization files you have for "set-o vi'!

"vi" doesn't go "on" without the corresponding "set" command being issued from somewhere!
0
 

Author Comment

by:D T
ID: 41781831
Neither of them have "set -o vi". Please see attached
profile---etc.txt
profile.txt
0
 
LVL 68

Accepted Solution

by:
woolmilkporc earned 2000 total points
ID: 41781843
"EDITOR=vi" resets the "emacs" option and sets "vi"!

Setting "EDITOR" must precede "set -o emacs"!

So add "export EDITOR=vi" to /etc/profile before "set -o emacs" and remove that statement from .profile!
1
 

Author Comment

by:D T
ID: 41782001
It worked!!! :D
0
 

Author Closing Comment

by:D T
ID: 41782007
Thank you very much!
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In tuning file systems on the Solaris Operating System, changing some parameters of a file system usually destroys the data on it. For instance, changing the cache segment block size in the volume of a T3 requires that you delete the existing volu…
Introduction Regular patching is part of a system administrator's tasks. However, many patches require that the system be in single-user mode before they can be installed. A cluster patch in particular can take quite a while to apply if the machine…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.
Suggested Courses

618 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question