25 June 2008

ksh auto complete on AIX

Here are some notes if you want to enjoy the same type of auto complete in ksh as bash users enjoy.

I'm shamelessly borrowing this from here, because it took me a while to track down:

Set this:

set -o vi

in your .profile or .login scripts.

To envoke the editor, simply hit the ESC key. Just like going from input mode to command mode inside of vi. Some of the more useful key strokes:


ESC+\ = autocomplete, will complete upto the non-unique character.
ESC+* = space delimited list of all files that match the pattern you started with.
ESC+/str = search the commandline history for str.
ESC+n = search for the next occurance of str.
ESC+k = go back one in the commandline history.
ESC+j = go forward one in the commandline history.
ESC+$ = go to the end of the current line
ESC+0 = go to the beginning of the current line
ESC+i = return to insert mode
ESC+A = append to the end of the current line
ESC+I = insert from the beginning of the current line
ESC+fx = move cursor to the right until the next occurance of x
ESC+Fx = move cursor to the left until the next occurance of x
ESC+x = delete character under cursor and place it in the buffer
ESC+p = place the contents of the buffer after the cursor
(combining the last two keystrokes)
ESC+xp = transpose two characters (I use this alot)

25 comments:

天氣真好 said...

要保持更新呦,加油!!!期待你的新文章!!! .........................................

建霖 said...

仇恨是一把雙刃劍,傷了別人,也傷了自己..................................................

burtong said...

謝謝你的分享,真的太用心了≧﹏≦........................................

明英 said...

婚姻對男人來說是賭他的自由,對女人而言卻是賭她的幸福。..................................................................

曉薇 said...

支持你!!!期待你的更新!!!相信一定會更好!!!! .................................................................

筱涵 said...

成功多屬於那些很快做出決定,卻又不輕易變更的人。而失敗也經常屬於那些很難做出決定,卻又經常變更的人.................................................................                           

LeatriceNay婉勇 said...

人不能像動物一樣活著,而應該追求知識和美德............................................................

李豪湖仁陳堅豪 said...

向著星球長驅直進的人,反比踟躕在峽路上的人,更容易達到目的。............................................................

玉婷良DGFHFJ瑋黃吳 said...

唯有學習不已的老師,才能認真的教,唯有燃燒自己,才能點亮他人的燈............................................................

函松 said...

單純喜歡你的部落格 留個言跟您問聲好~~............................................................

維哲維哲 said...

肯定與支持你!!!加油囉~..................................................................

佑英佑英 said...

從來愛都不知它的深度,非得等到別離的時候.................................................................

陳佑發 said...

很喜歡你的部落格,來給你加油,幫你推一下喔~期待你的下一個更新,謝謝............................................................

鄭雅琦鄭雅琦 said...

知識可以傳授,智慧卻不行。每個人必須成為他自己。. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

琬安琬安 said...

Practice what you preach.............................................................

曾戴山柔曾戴山柔 said...

人類的聰明,並非以經驗為依歸,而是以接受經驗的行程為依歸。..................................................

凱許倫 said...

很棒,令人期待..................................................................

燕明中延 said...

走召糸及言贊白勺口拉............................................................

宣麟至上 said...

我愛那些使自己的德行成為自己的目標或命定的人................................................

于庭吳 said...

說「吃虧就是便宜的人」,多半不是吃虧的人。......................................................................

淑君韓淑君韓淑君韓 said...

謝謝大大分享 我難過了ˋ 3ˊ............................................................

江仁趙雲虹昆 said...

時間就是塑造生命的材料。

王辛江淑萍康 said...

不會從失敗中找尋教訓的人,成功之路是遙遠的。.................................................

涛子 said...

感謝分享~希望有更多的好文章分享給大家.................................[/url]...............

瑰潼 said...

you got it!i like it!!!