OS2 World.Com Forum

Subject  :  Bash 3.1
Author  :  El Vato
Date  :  20 Apr, 2007 on 21:19
Upon entering at the command prompt:

set -o vi

I am not getting the Vi-like behaviour of the public domain Korn Shell (pdksh) on OS/2 and Bash on Linux.

For instance, after setting the Vi editing behaviour, if I press the ESC(ape) key out prints an backslash (/) rather than accepting Vi commands.

I have set the history environment variable: bash_history (deducing the name from pdksh_history) and it does not alleviate the above mentioned issue.

Am I missing something


Subject  :  Re:Bash 3.1
Author  :  obiwan
Date  :  20 Apr, 2007 on 22:30
Thanks much for trying it out.

I'm not sure what vi behavior is, but currently the readline code in this port is broken, which affects history, among other things. Will be fixed in the next release, hopefully in a couple weeks. If you fix it let me know. Thanks.


Subject  :  Re:Bash 3.1
Author  :  obiwan
Date  :  20 Apr, 2007 on 23:07
Actually yeah that's definitely a readline issue, and not acceptable.

Because you brought it up I'll push it up in priority and fix it asap. I wanted to see if anyone was actually going to use it before putting too much into it.


Subject  :  Re:Bash 3.1
Author  :  El Vato
Date  :  21 Apr, 2007 on 17:22

obiwan (20 Apr, 2007 22:30):
Thanks much for trying it out.

Well, no need to thank me, my dear fan of Chewbacca. Anything Unixish has a connotation of productivity and efficiency --and I am naturally attracted to beauty in simplicity.

A few years ago I had tried an early version of Bash but its crippled state disappointed me and I continued to use pdksh under OS/2, WinXX (AT&T's port), and Linux.

As an aside, support for vi editing mode is crucial for any shell if an user desires efficiency. Most of the vi editing commands do not require an user to lift his/her fingers from the keyboard standard positioning --reusing the input keys for command manipulation by simply pressing ESC(ape).

The multi purpose keys enabled by the vi editing property by itself makes the Unix/Linux shells desirable for cross-platform productivity.

Greetings to Leia...

P.S. And yes, I have also used the vi editing mode under the Mac OSX shell since all that fancy GUI crap annoys me. Pondering about the comments of some users that purportedly "do not like Ubuntu [but]... they like the Mac OSX" I must add that the only thing different (and proprietary) is the X window implementation of the paranoid Jobs --the OS underneath is a Linux cousin hard at work.


Subject  :  Re:Bash 3.1
Author  :  Smedles
Date  :  26 Apr, 2007 on 08:20

obiwan (20 Apr, 2007 23:07):
Actually yeah that's definitely a readline issue, and not acceptable.

Because you brought it up I'll push it up in priority and fix it asap. I wanted to see if anyone was actually going to use it before putting too much into it.


Hopefully Obiwan will release a new build soon - I gave him a patch on IRC yesterday

Cheers,

Paul.


Subject  :  Re:Bash 3.1
Author  :  obiwan
Date  :  26 Apr, 2007 on 18:46
Yeah thanks for that Smedles. It's much better, though I don't really know how to use/test vi mode.

Sorry for the delay on getting it out. I'll do it tonight. I wanted to include build instructions since it's a little tricky, in case El Vato gets curious.


Subject  :  Re:Bash 3.1
Author  :  obiwan
Date  :  27 Apr, 2007 on 18:30
Ok I uploaded it. File is bash-os2-3.1-fix1.zip. I fixed a couple other things I missed in the previous release too.

I'll be interested in knowing how well the vi mode works now. I was only able to observe that the escape key does what it should.


Subject  :  Re:Bash 3.1
Author  :  El Vato
Date  :  28 Apr, 2007 on 13:39

Smedles (26 Apr, 2007 08:20):

obiwan (20 Apr, 2007 23:07):
Actually yeah that's definitely a readline issue, and not acceptable.

[...].


Hopefully Obiwan will release a new build soon - I gave him a patch on IRC yesterday

Cheers,

Paul.



obiwan (27 Apr, 2007 18:30):
Ok I uploaded it. File is bash-os2-3.1-fix1.zip. I fixed a couple other things I missed in the previous release too.

I'll be interested in knowing how well the vi mode works now. I was only able to observe that the escape key does what it should.


It is a superb port of Bash on OS/2, Obiwan and Smedles! Having been busy on Solaris for most of the day (apropos, Solaris will not accept Bash as a default login shell), I have only had limited but successful testing of your exceptional work.

Below are the environment variables that I set in an OS/2 CMD file (plus some other particular ones like CdRecord direcotory where DVDdao.exe is found): myBashF1.cmd

SET HOME=w:\EMX\USR
SET TERM=ansi-color-3
SET TERMCAP=w:/emx/etc/termcap.x11
PATH %PATH%w:\EMX\BIN;W:\os2\apps\CdRecord;
SET ENDLIBPATH=w:\EMX\DLL
SET INIT=w:\EMX\ETC
SET ELVISPATH=w:\EMX\LIB
SET HISTFILE=%HOME%\bash_history
SET TMPDIR=w:\\tcpip\\tmp

This last environment variable took me sometime to figure out --it needs dual backslashes. A properly set TMPDIR environment variable enables the vi command editing mechanism to effectively use the Bash built-in fc command in conjunction with a temporary session created by the editor elvisemx.exe (as stated below):

"The first form of fc in the SYNOPSIS section puts you into an editor with a range of commands to edit. When you leave the editor, fc inputs the edited commands to the shell."

< http://www.mkssoftware.com/docs/man1/fc.1.asp#SYNOPSIS >

Additionally, in the HOME directory I created the Bash configuration file:
.bashrc It has the following initial aliases and EDITOR variable:

alias ls='ls -F --color=auto'
alias elvis='elvisemx -G vio'
alias h='fc -l'
alias r='fc -e -'
EDITOR=w:/emx/bin/elvisemx.exe

Of course, this information is provided "AS IS" so that anyone who desires to give a spin to your COOL work will not be starting from scratch.

Consequently, combining the emx based executable utilities under the emx/bin directory and the dynamic linked libraries (dll) under the emx/dll, Bash thus far has performed 99% effectively.

The best to you and Smedles (...and Leia, too !


Subject  :  Re:Bash 3.1 support for the export directive on custom prompts.
Author  :  El Vato
Date  :  30 Apr, 2007 on 08:31
Whereas the current Public Domain Korn Shell ( pdksh ) does not support the export color primpt directive, OS/2's Bash 3.1 fix 1 (Bash31F1) does --at least for the initial trial where the subject is the shell prompt customization.

Either at the command prompt or (preferably) editing .bashrc in the user home directory in this manner (see link) wil provide an OS/2 Bash user with a prompt analogous to:

Your Text STring@hostnameCurrentDirectory

As an example, I included the magical incantation in the link above in my .bashrc file to have my OS/2 Bash shell customized and consequently the data becomes easier to discern --aiding efficiency and productivity.

Additionally, since I was experiencing an OS/2 freeze upon executing the Sun Download Manager:

java -jar sdm.jar

from within Bash but not from pdksh environment shell, I made the following change to the myBashF1.cmd Bash configuration environment PATH in my immediately prior post:

PATH w:\EMX\BIN;%PATH%W:\os2\apps\CdRecord;

In other words, I set the emx\bin directory containing the Unix/Linux utilities to complement Bash (and where Bash resides also) at the beginning of the list. That apparently cured the Java application issue.

Note, also, that the above string %PATH% assumes that the environment variable in your CONFIG.SYS ends in a semicolon --else it does not work properly.

Another observation is that if an OS/2 process application is launched from within Bash (say, for example, the mozilla web browser), upon exiting the Bash shell instance that created that, will bring mozilla down with it. This behaviour is not seen in pdksh since when a pdksh shell spawns an mozilla application process, upon exiting the pdksh, the mozilla application becomes a child of the PMSHELL master process (see prior link JPG above), with the same command:

Bash prompt ] mozilla &

I will continue to use and encourage other OS/2 users to learn Bash and install the EMX Unix/Linux utilities. Now that Obiwan and Smedles have done a cool and current Bash port for OS/2, what is learned in that environment can be leveraged in Linux, Solaris, and even WinXX --but with respect to the latter OS, the chains that many OS/2ers have to it will be weaker.

Regards

El Vato !


Subject  :  Re:Bash 3.1 support for the export directive on custom prompts.
Author  :  Smedles
Date  :  30 Apr, 2007 on 12:12
Hi El Vato,


El Vato (30 Apr, 2007 08:31):
Now that Obiwan and Smedles have done a cool and current Bash port for OS/2

Note that I just contributed a readline fix for Bash - Obiwan has done all the hard work here!

Cheers,

Paul.


Subject  :  Re:Bash 3.1
Author  :  obiwan
Date  :  30 Apr, 2007 on 19:44
I am delighted you are enjoying the use of this Bash port so far, El Vato, and I am reading with interest your observations and comparisons with other shells.

I will warn you, though, I recently discovered it cannot run scripts. It throws odd errors. I don't yet understand what is going wrong, but once I free up some time I will dig into it and find out, so expect more fixes.


Subject  :  Re:Bash 3.1 support for the export directive on custom prompts.
Author  :  obiwan
Date  :  06 May, 2007 on 00:27

Smedles (30 Apr, 2007 12:12):

Note that I just contributed a readline fix for Bash - Obiwan has done all the hard work here!

Cheers,

Paul.


In fairness, I just started the port. Knut St. Osmundsen has now applied quite a number of fixes, which should make it much more usable. I've built it again using his patches and uploaded it.

ftp://ftp.netlabs.org/incoming/bash-os2-3.1_p17.zip


Powered by UltraBoard 2000 <www.ub2k.com>