public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Re: chere, mksh and pdksh
       [not found] <1321987312.4604.ezmlm@cygwin.com>
@ 2011-11-23  8:48 ` Ronald Fischer
  2011-11-24  1:44   ` Dave Kilroy
  0 siblings, 1 reply; 5+ messages in thread
From: Ronald Fischer @ 2011-11-23  8:48 UTC (permalink / raw)
  To: cygwin; +Cc: kilroyd

> It's been a while since I last refreshed the package, so I'll have a 
> look and see if I can get something done ASAP.

Is there a technical reason, why chere needs to know a predefined set of
"keys" for the shell to install? For instance, would it not be
sufficient to pass the path to the shell? In this case, new shells can
be installed without the need to update chere. Also, if I can use the
path to the shell as a "key", I could (by using appropriate symlinks)
have several "chere" entries for the same shell (for instance, mintty
with ksh AND rxvt with ksh).

Ronald
-- 
Ronald Fischer <ronaldf@eml.cc>
+  If a packet hits a pocket on a socket on a port, 
+  and the bus is interrupted and the interrupt's not caught,
+  then the socket packet pocket has an error to report.
+		(cited after Peter van der Linden)


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: chere, mksh and pdksh
  2011-11-23  8:48 ` chere, mksh and pdksh Ronald Fischer
@ 2011-11-24  1:44   ` Dave Kilroy
  2011-11-24  9:17     ` Ronald Fischer
  0 siblings, 1 reply; 5+ messages in thread
From: Dave Kilroy @ 2011-11-24  1:44 UTC (permalink / raw)
  To: Ronald Fischer; +Cc: cygwin

On 23/11/2011 08:12, Ronald Fischer wrote:
>> It's been a while since I last refreshed the package, so I'll have a
>> look and see if I can get something done ASAP.
>
> Is there a technical reason, why chere needs to know a predefined set of
> "keys" for the shell to install?

If I recall, this was to make it simple to locate any entry chere may 
have created.

> For instance, would it not be
> sufficient to pass the path to the shell? In this case, new shells can
> be installed without the need to update chere.

I think it would have to be a munged path. I suspect '/' would not be 
valid in a key name. New shells would depend on the shell conforming to 
some minimal requirements. If I recall, the existing shells do login 
shells slightly different.

> Also, if I can use the
> path to the shell as a "key", I could (by using appropriate symlinks)
> have several "chere" entries for the same shell (for instance, mintty
> with ksh AND rxvt with ksh).

My feeling is that most people have a prefered terminal, but may need to 
use different shells.

To do what you want, my feeling is that it's easier use what chere does 
as an example. You can even script it with something like:

chere -ip -t mintty -s ksh | sed -e "s/cygwin_ksh/mintty_ksh/g" > a.sh
chere -ip -t rxvt -s ksh | sed -e "s/cygwin_ksh/rxvt_ksh/g" > b.sh
./a.sh
./b.sh


Dave.

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: chere, mksh and pdksh
  2011-11-24  1:44   ` Dave Kilroy
@ 2011-11-24  9:17     ` Ronald Fischer
  0 siblings, 0 replies; 5+ messages in thread
From: Ronald Fischer @ 2011-11-24  9:17 UTC (permalink / raw)
  To: Dave Kilroy; +Cc: cygwin

On Wednesday, November 23, 2011 8:31 PM, "Dave Kilroy"
<kilroyd@googlemail.com> wrote:
> On 23/11/2011 08:12, Ronald Fischer wrote:
> > Is there a technical reason, why chere needs to know a predefined set of
> > "keys" for the shell to install?
> 
> If I recall, this was to make it simple to locate any entry chere may 
> have created.

I thought so. This would go well to allow a path in addition to a key.

> > For instance, would it not be
> > sufficient to pass the path to the shell? In this case, new shells can
> > be installed without the need to update chere.
> 
> I think it would have to be a munged path. I suspect '/' would not be 
> valid in a key name. 

Yes, but I don't think this would be a real problem in practice.

> New shells would depend on the shell conforming to 
> some minimal requirements. If I recall, the existing shells do login 
> shells slightly different.

They do the login differently, but this is not something chere needs to
worry. Any shell could be invoked by just calling the path (this works
from command line).

Of course one might argue that the user would want more control on how
the shell should be invoked. For instance, I want to choose whether the
shell should act as a login shell or as a non-login shell, or whether
the -x should be set on invocation. Note that these are features not
supported by the current chere, but when we think about expanding the
concept, it makes sense thinking about this too.

In fact, this could be achieved easily too, in two ways:

Either chere allows for a path to the shell AND arguments, which means
that the arguments need to be munged in as well; or chere insists in
only getting a path to a shell. In the latter case, the user could
supply a "cover script" (say, in bash), which just does an exec to the
shell he wants to, supplying the necessary parameters.

> > Also, if I can use the
> > path to the shell as a "key", I could (by using appropriate symlinks)
> > have several "chere" entries for the same shell (for instance, mintty
> > with ksh AND rxvt with ksh).
> 
> My feeling is that most people have a prefered terminal, but may need to 
> use different shells.

The terminals behave in different ways, for example how they react on
ANSI escape sequences, so it's handy to be able to run a shell in
different terminals.

> To do what you want, my feeling is that it's easier use what chere does 
> as an example. You can even script it with something like:
> 
> chere -ip -t mintty -s ksh | sed -e "s/cygwin_ksh/mintty_ksh/g" > a.sh
> chere -ip -t rxvt -s ksh | sed -e "s/cygwin_ksh/rxvt_ksh/g" > b.sh
> ./a.sh
> ./b.sh

This is indeed a feasible solution! Good point!

Ronald
-- 
Ronald Fischer <ronaldf@eml.cc>
+  If a packet hits a pocket on a socket on a port, 
+  and the bus is interrupted and the interrupt's not caught,
+  then the socket packet pocket has an error to report.
+		(cited after Peter van der Linden)


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: chere, mksh and pdksh
  2011-11-21 10:15 Ronald Fischer
@ 2011-11-22 14:12 ` Dave Kilroy
  0 siblings, 0 replies; 5+ messages in thread
From: Dave Kilroy @ 2011-11-22 14:12 UTC (permalink / raw)
  To: cygwin

On 21/11/2011 09:24, Ronald Fischer wrote:
> I would like to use "chere" to create a context menu for a terminal
> running ksh.
>
> I have installed mksh, since pdksh is marked as obsolete. However, the
> chere man-page says that it expects pdksh, if I want a Korn Shell. What
> is the best way to proceed?
>
> - Install pdksh too, although it is obsolete?
> - Create a symlink /usr/bin/pkdsh, to point to mksh?

Option 3:
- Bug me to update chere

It's been a while since I last refreshed the package, so I'll have a 
look and see if I can get something done ASAP.


Dave.

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 5+ messages in thread

* chere, mksh and pdksh
@ 2011-11-21 10:15 Ronald Fischer
  2011-11-22 14:12 ` Dave Kilroy
  0 siblings, 1 reply; 5+ messages in thread
From: Ronald Fischer @ 2011-11-21 10:15 UTC (permalink / raw)
  To: cygwin

I would like to use "chere" to create a context menu for a terminal
running ksh.

I have installed mksh, since pdksh is marked as obsolete. However, the
chere man-page says that it expects pdksh, if I want a Korn Shell. What
is the best way to proceed?

- Install pdksh too, although it is obsolete?
- Create a symlink /usr/bin/pkdsh, to point to mksh?

Ronald
-- 
Ronald Fischer <ronaldf@eml.cc>
+  If a packet hits a pocket on a socket on a port, 
+  and the bus is interrupted and the interrupt's not caught,
+  then the socket packet pocket has an error to report.
+		(cited after Peter van der Linden)


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-11-24  9:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1321987312.4604.ezmlm@cygwin.com>
2011-11-23  8:48 ` chere, mksh and pdksh Ronald Fischer
2011-11-24  1:44   ` Dave Kilroy
2011-11-24  9:17     ` Ronald Fischer
2011-11-21 10:15 Ronald Fischer
2011-11-22 14:12 ` Dave Kilroy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).