Re: a bash user NOT used to ksh



bsh wrote:
xs wrote:
I am a bash user. But recently for some reasons I must work on a linux
station using ksh. I am very unused to ksh. Particularly,
1. pressing up arrow key doesn't give me the previous command.
2. pressing tab doesn't auto-complete the typing.

Bash is not just bash. Bash is readline plus POSIX shell plus
extensions. When talking of ksh, it is "just" the language itself
(with remedial but configurable command line editting interactive
enhancements), which is to say that:

(1) It does--in ksh93. From the FAQ at
http://kornshell.com/doc/faq.html :

Q6. Does ksh support file name completion?
A6. Yes, it does. The default key binding is <ESC><ESC>
however, starting with the 'g' point release, <TAB> also works
for completion. Note, the vi users need to set -o viraw
in order to get <TAB> completion to work.

(2) There is always the ability of using the standard filename
completion, generation, and matching operators, respectively
with the \, * and = commands in (vi) editting mode. RTFM!

(3) If you wish a complex, multi-command user-defined sequence,
the @<letter> command is implemented to write your own.

(4) And, for ksh93, is any of the above is not sufficient, the KEYBD
pseudo-trap is implemented to write your own readline in shellscript!

http://kornshell.com/examples/keybind

(5) Like readline, the ie(1) command from the free AST package
gives all the interactive editting features to any other interactive
program.

http://www.research.att.com/~gsf/man/man1/ie.html

(6) Nothing prevents you from using ksh(1) under a standalone
build of readline/editline/tecla. I haven't ever seen this, but there's
nothing that would prevent this from being done.

http://tiswww.tis.case.edu/~chet/readline/rltop.html
http://tiswww.tis.case.edu/~chet/readline/rl.c

Read: "Adding command-line editing/history to an Application" :
http://blogs.sun.com/roller/page/jbeck/20050614#adding_command_line_editing_history

In addition, there's also:

"cle.c",0.4,http://kaolin.unice.fr/Cle/,$0,"CLE","Erick Gallesio"
<eg@xxxxxxxx>

"ile.c",2.3,<simtel>/unix-c/utils/ile.tar.gz;<comp.sources.unix>/volume25/ile/;http://koala.ilog.fr/ftp/pub/ile.tar.gz,$0,"CLE:
emacs-style","Robert C. Pendleton" <bobp@xxxxxxx>

"editline.c",,,$0,"CLE: simplified readline.c","Rich Salz"
<rsalz@xxxxxxx>, "Simmule Turner"

"fep.c",4.2,http://sunsite.unc.edu/pub/Linux/*/fep-linux.tar.Z;ftp://ftp.uni-erlangen.de/pub/.files/ftplobbi/LOCAL/utilities/screen/misc/fep-4.1.tar.gz,"emacs/vi
CLE with history/aliases","David Engel" <david@xxxxxxx>,"Kazumasa
Utashiro", "Ivo Welch"

"tecla.c;libtecla.c;enhance.c",1.6.1,http://www.astro.caltech.edu/~mcs/tecla/;http://www.astro.caltech.edu/~mcs/tecla/libtecla.tar.gz,$0,"CLE","Martin
C. Shepherd" <mcs@xxxxxxxxxxxxxxxxx>

"uniread.pl",1.01,http://sourceforge.net/projects/uniread/,$0,"CLE","Guy
Rosen" <guyro@xxxxxxxxxxxxxxxxxxxxx>

"vrl.c",1.3.3,http://vons.free.fr/tools/;http://vons.free.fr/tools/vrl-1.3.3.tgz,$0,"CLE","Gert-Jan
Vons" <gert-jan@xxxxxxxxxxx,vons@xxxxxxxxxxxxxxx>

(7) The previous advice concerning using bash(1) interactively
and ksh(1) non-interactively is quite good; you could always do that.

=Brian

awesome, very informative.
.



Relevant Pages

  • Re: a bash user NOT used to ksh
    ... I am very unused to ksh. ... pressing up arrow key doesn't give me the previous command. ... pressing tab doesn't auto-complete the typing. ... Bash is readline plus POSIX shell plus ...
    (comp.unix.shell)
  • Re: Ion3 a good light GUI.
    ... If you use `apt-cache search' from a command line, you can try searching for your applications that way. ... Workspaces are helpful: I keep my GAIM buddy list, terminal from which I play music, and Thunderbird in a separate workspace. ... I installed Ion3 a few weeks ago already now, and when running several greedy applications at same time, such as Thunderbird, Firefox, plus Blender and Galeon, just now, Ion3 allows my machine not to get stocked with a freezed GUI. ... To open one more tab it's with mouse or with Ctrl+Shift, and all applications open in new tabs beside one to the other. ...
    (Ubuntu)
  • Re: Installing Net Framework Service Pack 1
    ... You *do* have a valid install of 1.1, ... We had already established that I had changed the ASP.NET tab to 1.1.4322, ... That's not a registry command. ... It's a command to configure a virtual app as an app which will use the .Net Framework 1.1. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Installing Net Framework Service Pack 1
    ... You *do* have a valid install of 1.1, ... We had already established that I had changed the ASP.NET tab to ... That's not a registry command. ... Here I try to enter the directory where the Net Framework 1.1 ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Installing Net Framework Service Pack 1
    ... You *do* have a valid install of 1.1, ... We had already established that I had changed the ASP.NET tab to 1.1.4322, ... That's not a registry command. ... It's a command to configure a virtual app as an app which will use the .Net Framework 1.1. ...
    (microsoft.public.dotnet.framework.aspnet)