How do you get the complete-file key binding to work the sam

Hi.

This is a minor question, but I was wanting to know if there is a way to
change the key binding for file completion for ksh under the QRTP.

Suppose I have the following file and directory I wish to access:

/home/rodney/foo/bar/fb.c

So, I make an environment variable, like such: export
$myfoo=/home/rodney/foo

Under QNX4, I could type in: cd $myfoo/ba and then hit twice,
which would resolve the path to: cd $myfoo/bar/

Under the QRTP, when I do this same behaviour, the final resolution is
to evaluate the environment variable and tack a space on the end,
without resolving the
path first: cd /home/rodney/foo/ba_ (Note: the underscore represents
the added space )

I find this a little annoying since it then means I have to backspace
the added space and hit twice, again, to resolve the path.

This is no big deal - I can live with it. If anyone happens to know how
I could accomplish it, however, I would appreciate it.

Thanks for listening to my petty quibbling and for any help in this
matter.

Rodney Lott

The magic you are looking for under ksh is ‘bind’. If you just type ‘bind’
at the prompt you will see the keybindings for stuff. Now, if you wanted to
set your completion to be you would put something like

bind ^I=complete

in your .profile. Incidentally, one thing you might like to note under
photon is that the default pterm is not started as a login shell and will
not, therefore, read your configuration files (/etc/profile, ~/.profile).
To change this, you need to right-click on the shelf and click setup. Then
go to the pterm entry and change ‘pterm’ to ‘pterm -l’. The other place is
in ~/.ph/wm/wm.menu where you can add a -l after the pterm entry. This
second change won’t happen until you restart the window manager though.

cheers,

Kris

Rodney Lott <rod@fuelcelltechnologies.ca> wrote:

Hi.

This is a minor question, but I was wanting to know if there is a way to
change the key binding for file completion for ksh under the QRTP.

Suppose I have the following file and directory I wish to access:

/home/rodney/foo/bar/fb.c

So, I make an environment variable, like such: export
$myfoo=/home/rodney/foo

Under QNX4, I could type in: cd $myfoo/ba and then hit twice,
which would resolve the path to: cd $myfoo/bar/

Under the QRTP, when I do this same behaviour, the final resolution is
to evaluate the environment variable and tack a space on the end,
without resolving the
path first: cd /home/rodney/foo/ba_ (Note: the underscore represents
the added space )

I find this a little annoying since it then means I have to backspace
the added space and hit twice, again, to resolve the path.

This is no big deal - I can live with it. If anyone happens to know how
I could accomplish it, however, I would appreciate it.

Thanks for listening to my petty quibbling and for any help in this
matter.

Rodney Lott


Kris Warkentin
kewarken@qnx.com
(613)591-0836 x9368
“You’re bound to be unhappy if you optimize everything” - Donald Knuth

Hi, Kris.

The stuff about the pterm stuff is useful - thanks.

I guess I wasn’t quite clear enough about the bind question, though.

I have done comparisons of the bind stuff on my QNX4 and QNX6 systems.
When I do the following on both machines:

bind | grep complete

I find that both list the following for the double Esc (ie. ^[^[ ):
^[^[ = complete

So, in theory, they are both using the desired binding. The problem is
that the
complete on QNX6 doesn’t behave in the same way as the complete on
QNX4! This is
what I want to change, not how I access that functionality. The QNX4
complete
didn’t try to expand out the environment variables that I defined, but
would just
add to the path as I desired.

Thanks.

Rodney


Kris Eric Warkentin wrote:

The magic you are looking for under ksh is ‘bind’. If you just type ‘bind’
at the prompt you will see the keybindings for stuff. Now, if you wanted to
set your completion to be you would put something like

bind ^I=complete

in your .profile. Incidentally, one thing you might like to note under
photon is that the default pterm is not started as a login shell and will
not, therefore, read your configuration files (/etc/profile, ~/.profile).
To change this, you need to right-click on the shelf and click setup. Then
go to the pterm entry and change ‘pterm’ to ‘pterm -l’. The other place is
in ~/.ph/wm/wm.menu where you can add a -l after the pterm entry. This
second change won’t happen until you restart the window manager though.

cheers,

Kris

Rodney Lott <> rod@fuelcelltechnologies.ca> > wrote:
Hi.

This is a minor question, but I was wanting to know if there is a way to
change the key binding for file completion for ksh under the QRTP.

Suppose I have the following file and directory I wish to access:

/home/rodney/foo/bar/fb.c

So, I make an environment variable, like such: export
$myfoo=/home/rodney/foo

Under QNX4, I could type in: cd $myfoo/ba and then hit twice,
which would resolve the path to: cd $myfoo/bar/

Under the QRTP, when I do this same behaviour, the final resolution is
to evaluate the environment variable and tack a space on the end,
without resolving the
path first: cd /home/rodney/foo/ba_ (Note: the underscore represents
the added space )

I find this a little annoying since it then means I have to backspace
the added space and hit twice, again, to resolve the path.

This is no big deal - I can live with it. If anyone happens to know how
I could accomplish it, however, I would appreciate it.

Thanks for listening to my petty quibbling and for any help in this
matter.

Rodney Lott


Kris Warkentin
kewarken@qnx.com
(613)591-0836 x9368
“You’re bound to be unhappy if you optimize everything” - Donald Knuth

Ah…I see what you mean…I guess I should have read the whole posting :stuck_out_tongue:

Now I just went to qnx4 and tried that and got exactly the same behaviour with
the $myfoo and all…I’m wondering which shell you’re using on qnx4. It seems
to be a ksh thing as near as I can tell. I should take a look at ksh and see
if I can see how it’s doing that.

cheers,

Kris

Rodney Lott <rod@fuelcelltechnologies.ca> wrote:

Hi, Kris.

The stuff about the pterm stuff is useful - thanks.

I guess I wasn’t quite clear enough about the bind question, though.

I have done comparisons of the bind stuff on my QNX4 and QNX6 systems.
When I do the following on both machines:

bind | grep complete

I find that both list the following for the double Esc (ie. ^[^[ ):
^[^[ = complete

So, in theory, they are both using the desired binding. The problem is
that the
complete on QNX6 doesn’t behave in the same way as the complete on
QNX4! This is
what I want to change, not how I access that functionality. The QNX4
complete
didn’t try to expand out the environment variables that I defined, but
would just
add to the path as I desired.

Thanks.

Rodney



Kris Eric Warkentin wrote:

The magic you are looking for under ksh is ‘bind’. If you just type ‘bind’
at the prompt you will see the keybindings for stuff. Now, if you wanted to
set your completion to be you would put something like

bind ^I=complete

in your .profile. Incidentally, one thing you might like to note under
photon is that the default pterm is not started as a login shell and will
not, therefore, read your configuration files (/etc/profile, ~/.profile).
To change this, you need to right-click on the shelf and click setup. Then
go to the pterm entry and change ‘pterm’ to ‘pterm -l’. The other place is
in ~/.ph/wm/wm.menu where you can add a -l after the pterm entry. This
second change won’t happen until you restart the window manager though.

cheers,

Kris

Rodney Lott <> rod@fuelcelltechnologies.ca> > wrote:
Hi.

This is a minor question, but I was wanting to know if there is a way to
change the key binding for file completion for ksh under the QRTP.

Suppose I have the following file and directory I wish to access:

/home/rodney/foo/bar/fb.c

So, I make an environment variable, like such: export
$myfoo=/home/rodney/foo

Under QNX4, I could type in: cd $myfoo/ba and then hit twice,
which would resolve the path to: cd $myfoo/bar/

Under the QRTP, when I do this same behaviour, the final resolution is
to evaluate the environment variable and tack a space on the end,
without resolving the
path first: cd /home/rodney/foo/ba_ (Note: the underscore represents
the added space )

I find this a little annoying since it then means I have to backspace
the added space and hit twice, again, to resolve the path.

This is no big deal - I can live with it. If anyone happens to know how
I could accomplish it, however, I would appreciate it.

Thanks for listening to my petty quibbling and for any help in this
matter.

Rodney Lott


Kris Warkentin
kewarken@qnx.com
(613)591-0836 x9368
“You’re bound to be unhappy if you optimize everything” - Donald Knuth


Kris Warkentin
kewarken@qnx.com
(613)591-0836 x9368
“You’re bound to be unhappy if you optimize everything” - Donald Knuth

Hi, Kris.

I just did a little research. QNX6 apparently uses a different version
of ksh,
whereas the ksh in QNX4 is based upon ksh86.

If you do find out any way to make the ksh behave like the QNX4 version,
let me
know.

Thanks.

Rodney

Kris Eric Warkentin wrote:

Ah…I see what you mean…I guess I should have read the whole posting > :stuck_out_tongue:

Now I just went to qnx4 and tried that and got exactly the same behaviour with
the $myfoo and all…I’m wondering which shell you’re using on qnx4. It seems
to be a ksh thing as near as I can tell. I should take a look at ksh and see
if I can see how it’s doing that.

cheers,

Kris

Rodney Lott <> rod@fuelcelltechnologies.ca> > wrote:
Hi, Kris.

The stuff about the pterm stuff is useful - thanks.

I guess I wasn’t quite clear enough about the bind question, though.

I have done comparisons of the bind stuff on my QNX4 and QNX6 systems.
When I do the following on both machines:

bind | grep complete

I find that both list the following for the double Esc (ie. ^[^[ ):
^[^[ = complete

So, in theory, they are both using the desired binding. The problem is
that the
complete on QNX6 doesn’t behave in the same way as the complete on
QNX4! This is
what I want to change, not how I access that functionality. The QNX4
complete
didn’t try to expand out the environment variables that I defined, but
would just
add to the path as I desired.

Thanks.

Rodney

Kris Eric Warkentin wrote:

The magic you are looking for under ksh is ‘bind’. If you just type ‘bind’
at the prompt you will see the keybindings for stuff. Now, if you wanted to
set your completion to be you would put something like

bind ^I=complete

in your .profile. Incidentally, one thing you might like to note under
photon is that the default pterm is not started as a login shell and will
not, therefore, read your configuration files (/etc/profile, ~/.profile).
To change this, you need to right-click on the shelf and click setup. Then
go to the pterm entry and change ‘pterm’ to ‘pterm -l’. The other place is
in ~/.ph/wm/wm.menu where you can add a -l after the pterm entry. This
second change won’t happen until you restart the window manager though.

cheers,

Kris

Rodney Lott <> rod@fuelcelltechnologies.ca> > wrote:
Hi.

This is a minor question, but I was wanting to know if there is a way to
change the key binding for file completion for ksh under the QRTP.

Suppose I have the following file and directory I wish to access:

/home/rodney/foo/bar/fb.c

So, I make an environment variable, like such: export
$myfoo=/home/rodney/foo

Under QNX4, I could type in: cd $myfoo/ba and then hit twice,
which would resolve the path to: cd $myfoo/bar/

Under the QRTP, when I do this same behaviour, the final resolution is
to evaluate the environment variable and tack a space on the end,
without resolving the
path first: cd /home/rodney/foo/ba_ (Note: the underscore represents
the added space )

I find this a little annoying since it then means I have to backspace
the added space and hit twice, again, to resolve the path.

This is no big deal - I can live with it. If anyone happens to know how
I could accomplish it, however, I would appreciate it.

Thanks for listening to my petty quibbling and for any help in this
matter.

Rodney Lott


Kris Warkentin
kewarken@qnx.com
(613)591-0836 x9368
“You’re bound to be unhappy if you optimize everything” - Donald Knuth


Kris Warkentin
kewarken@qnx.com
(613)591-0836 x9368
“You’re bound to be unhappy if you optimize everything” - Donald Knuth

Ah…the qnx4 I’m using must be using pdksh (like nto) rather than ksh86.

If I have some time in the next little while, I’ll see what I can do.

cheers,

Kris

Rodney Lott <rod@fuelcelltechnologies.ca> wrote:

Hi, Kris.

I just did a little research. QNX6 apparently uses a different version
of ksh,
whereas the ksh in QNX4 is based upon ksh86.

If you do find out any way to make the ksh behave like the QNX4 version,
let me
know.

Thanks.

Rodney

Kris Eric Warkentin wrote:

Ah…I see what you mean…I guess I should have read the whole posting > :stuck_out_tongue:

Now I just went to qnx4 and tried that and got exactly the same behaviour with
the $myfoo and all…I’m wondering which shell you’re using on qnx4. It seems
to be a ksh thing as near as I can tell. I should take a look at ksh and see
if I can see how it’s doing that.

cheers,

Kris

Rodney Lott <> rod@fuelcelltechnologies.ca> > wrote:
Hi, Kris.

The stuff about the pterm stuff is useful - thanks.

I guess I wasn’t quite clear enough about the bind question, though.

I have done comparisons of the bind stuff on my QNX4 and QNX6 systems.
When I do the following on both machines:

bind | grep complete

I find that both list the following for the double Esc (ie. ^[^[ ):
^[^[ = complete

So, in theory, they are both using the desired binding. The problem is
that the
complete on QNX6 doesn’t behave in the same way as the complete on
QNX4! This is
what I want to change, not how I access that functionality. The QNX4
complete
didn’t try to expand out the environment variables that I defined, but
would just
add to the path as I desired.

Thanks.

Rodney

Kris Eric Warkentin wrote:

The magic you are looking for under ksh is ‘bind’. If you just type ‘bind’
at the prompt you will see the keybindings for stuff. Now, if you wanted to
set your completion to be you would put something like

bind ^I=complete

in your .profile. Incidentally, one thing you might like to note under
photon is that the default pterm is not started as a login shell and will
not, therefore, read your configuration files (/etc/profile, ~/.profile).
To change this, you need to right-click on the shelf and click setup. Then
go to the pterm entry and change ‘pterm’ to ‘pterm -l’. The other place is
in ~/.ph/wm/wm.menu where you can add a -l after the pterm entry. This
second change won’t happen until you restart the window manager though.

cheers,

Kris

Rodney Lott <> rod@fuelcelltechnologies.ca> > wrote:
Hi.

This is a minor question, but I was wanting to know if there is a way to
change the key binding for file completion for ksh under the QRTP.

Suppose I have the following file and directory I wish to access:

/home/rodney/foo/bar/fb.c

So, I make an environment variable, like such: export
$myfoo=/home/rodney/foo

Under QNX4, I could type in: cd $myfoo/ba and then hit twice,
which would resolve the path to: cd $myfoo/bar/

Under the QRTP, when I do this same behaviour, the final resolution is
to evaluate the environment variable and tack a space on the end,
without resolving the
path first: cd /home/rodney/foo/ba_ (Note: the underscore represents
the added space )

I find this a little annoying since it then means I have to backspace
the added space and hit twice, again, to resolve the path.

This is no big deal - I can live with it. If anyone happens to know how
I could accomplish it, however, I would appreciate it.

Thanks for listening to my petty quibbling and for any help in this
matter.

Rodney Lott


Kris Warkentin
kewarken@qnx.com
(613)591-0836 x9368
“You’re bound to be unhappy if you optimize everything” - Donald Knuth


Kris Warkentin
kewarken@qnx.com
(613)591-0836 x9368
“You’re bound to be unhappy if you optimize everything” - Donald Knuth


Kris Warkentin
kewarken@qnx.com
(613)591-0836 x9368
“You’re bound to be unhappy if you optimize everything” - Donald Knuth

No worries. Take your time - it’s not a huge priority.

Thanks very much.

Rodney

Kris Eric Warkentin wrote:

Ah…the qnx4 I’m using must be using pdksh (like nto) rather than ksh86.

If I have some time in the next little while, I’ll see what I can do.

cheers,

Kris

Rodney Lott <> rod@fuelcelltechnologies.ca> > wrote:
Hi, Kris.

I just did a little research. QNX6 apparently uses a different version
of ksh,
whereas the ksh in QNX4 is based upon ksh86.

If you do find out any way to make the ksh behave like the QNX4 version,
let me
know.

Thanks.

Rodney

Kris Eric Warkentin wrote:

Ah…I see what you mean…I guess I should have read the whole posting > :stuck_out_tongue:

Now I just went to qnx4 and tried that and got exactly the same behaviour with
the $myfoo and all…I’m wondering which shell you’re using on qnx4. It seems
to be a ksh thing as near as I can tell. I should take a look at ksh and see
if I can see how it’s doing that.

cheers,

Kris

Rodney Lott <> rod@fuelcelltechnologies.ca> > wrote:
Hi, Kris.

The stuff about the pterm stuff is useful - thanks.

I guess I wasn’t quite clear enough about the bind question, though.

I have done comparisons of the bind stuff on my QNX4 and QNX6 systems.
When I do the following on both machines:

bind | grep complete

I find that both list the following for the double Esc (ie. ^[^[ ):
^[^[ = complete

So, in theory, they are both using the desired binding. The problem is
that the
complete on QNX6 doesn’t behave in the same way as the complete on
QNX4! This is
what I want to change, not how I access that functionality. The QNX4
complete
didn’t try to expand out the environment variables that I defined, but
would just
add to the path as I desired.

Thanks.

Rodney

Kris Eric Warkentin wrote:

The magic you are looking for under ksh is ‘bind’. If you just type ‘bind’
at the prompt you will see the keybindings for stuff. Now, if you wanted to
set your completion to be you would put something like

bind ^I=complete

in your .profile. Incidentally, one thing you might like to note under
photon is that the default pterm is not started as a login shell and will
not, therefore, read your configuration files (/etc/profile, ~/.profile).
To change this, you need to right-click on the shelf and click setup. Then
go to the pterm entry and change ‘pterm’ to ‘pterm -l’. The other place is
in ~/.ph/wm/wm.menu where you can add a -l after the pterm entry. This
second change won’t happen until you restart the window manager though.

cheers,

Kris

Rodney Lott <> rod@fuelcelltechnologies.ca> > wrote:
Hi.

This is a minor question, but I was wanting to know if there is a way to
change the key binding for file completion for ksh under the QRTP.

Suppose I have the following file and directory I wish to access:

/home/rodney/foo/bar/fb.c

So, I make an environment variable, like such: export
$myfoo=/home/rodney/foo

Under QNX4, I could type in: cd $myfoo/ba and then hit twice,
which would resolve the path to: cd $myfoo/bar/

Under the QRTP, when I do this same behaviour, the final resolution is
to evaluate the environment variable and tack a space on the end,
without resolving the
path first: cd /home/rodney/foo/ba_ (Note: the underscore represents
the added space )

I find this a little annoying since it then means I have to backspace
the added space and hit twice, again, to resolve the path.

This is no big deal - I can live with it. If anyone happens to know how
I could accomplish it, however, I would appreciate it.

Thanks for listening to my petty quibbling and for any help in this
matter.

Rodney Lott


Kris Warkentin
kewarken@qnx.com
(613)591-0836 x9368
“You’re bound to be unhappy if you optimize everything” - Donald Knuth


Kris Warkentin
kewarken@qnx.com
(613)591-0836 x9368
“You’re bound to be unhappy if you optimize everything” - Donald Knuth


Kris Warkentin
kewarken@qnx.com
(613)591-0836 x9368
“You’re bound to be unhappy if you optimize everything” - Donald Knuth

Kris Eric Warkentin a écrit :

The magic you are looking for under ksh is ‘bind’. If you just type ‘bind’
at the prompt you will see the keybindings for stuff. Now, if you wanted to
set your completion to be you would put something like

bind ^I=complete

in your .profile. Incidentally, one thing you might like to note under
photon is that the default pterm is not started as a login shell and will
not, therefore, read your configuration files (/etc/profile, ~/.profile).
To change this, you need to right-click on the shelf and click setup. Then
go to the pterm entry and change ‘pterm’ to ‘pterm -l’. The other place is
in ~/.ph/wm/wm.menu where you can add a -l after the pterm entry. This
second change won’t happen until you restart the window manager though.

cheers,

Kris

Rodney Lott <> rod@fuelcelltechnologies.ca> > wrote:
Hi.

This is a minor question, but I was wanting to know if there is a way to
change the key binding for file completion for ksh under the QRTP.

Suppose I have the following file and directory I wish to access:

/home/rodney/foo/bar/fb.c

So, I make an environment variable, like such: export
$myfoo=/home/rodney/foo

Under QNX4, I could type in: cd $myfoo/ba and then hit twice,
which would resolve the path to: cd $myfoo/bar/

Under the QRTP, when I do this same behaviour, the final resolution is
to evaluate the environment variable and tack a space on the end,
without resolving the
path first: cd /home/rodney/foo/ba_ (Note: the underscore represents
the added space )

I find this a little annoying since it then means I have to backspace
the added space and hit twice, again, to resolve the path.

This is no big deal - I can live with it. If anyone happens to know how
I could accomplish it, however, I would appreciate it.

Thanks for listening to my petty quibbling and for any help in this
matter.

Rodney Lott


Kris Warkentin
kewarken@qnx.com
(613)591-0836 x9368
“You’re bound to be unhappy if you optimize everything” - Donald Knuth

It seems impossible to bind ^I^I=list-command like in Bash. Right?

Thanks,
Alain.

Hi,

(…) Incidentally, one thing you might like to note under
photon is that the default pterm is not started as a login shell and will
not, therefore, read your configuration files (/etc/profile, ~/.profile).
To change this, you need to right-click on the shelf and click setup. (…)

well, it seems to me quite complicated:) How about using something like
shell resource file? When you define export ENV=~/.shrc in your
~/.profile, then ~/.shrc resource is applied on every executed shell,
including non-login shells. In it you can define your favourite bindings…

Have a nice day
Pavel Franc

I haven’t been following this thread all that closely, so maybe I’m going
to say something wrong here.
But when you have a pterm session open in Photon, you can hit ctrl-alt-o
(or right-click and hit properties/prefs/something like that) and define
what sort of *rc file it will load; you can set one that will be loaded for
that specific session, or for all pterm sessions.

“Pavel Franc” <pfranc@retia.cz> wrote in message
news:3B24D7E9.50200@retia.cz

Hi,

(…) Incidentally, one thing you might like to note under
photon is that the default pterm is not started as a login shell and
will
not, therefore, read your configuration files (/etc/profile,
~/.profile).
To change this, you need to right-click on the shelf and click setup.
(…)

well, it seems to me quite complicated:) How about using something like
shell resource file? When you define export ENV=~/.shrc in your
~/.profile, then ~/.shrc resource is applied on every executed shell,
including non-login shells. In it you can define your favourite
bindings…

Have a nice day
Pavel Franc

But when you have a pterm session open in Photon, you can hit ctrl-alt-o
(or right-click and hit properties/prefs/something like that) and define
what sort of *rc file it will load; you can set one that will be loaded for
that specific session, or for all pterm sessions.

No, I don’t mean this resource file (e.g. ~/.ph/pterm/pterm.rc), this
is something quite different (sorry for the confusion in terms:) This
file contains only some pterm-specific settings in binary form.

What am I talking about is the standard shell “environment” file that is
executed whenever a shell starts. This file name is saved in environment
variable ENV which can be set in your ~/.profile. E.g. you define in
your profile that ENV is set to ~/.shrc and so every shell will process
~/.shrc file.

For more see the ksh man page.

Hi
Pavel Franc