[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: Getting the current directory in a service menu
From:       James Richard Tyrer <tyrerj () acm ! org>
Date:       2003-09-08 18:02:15
[Download RAW message or body]

Ladislav Strojil wrote:
> On Monday 08 of September 2003 16:12, ne... wrote:
> 
>>On Sep 8, 2003 at 15:53, Ladislav Strojil in a maddening rage wrote:
>>
>>>On Monday 08 of September 2003 13:52, ne... wrote:
>>>
>>>>In Linux for <command> to act on files in <dir> you would
>>>>have to do:
>>>>
>>>>	cd <dir> && <command>
>>>
>>>Why? With "cd <dir> ; <command>" both cd and <command> are run within the
>>>same shell so the "cd" _does_ change the working directory for command.
>>
>>I have deleted files I didn't want to when I thought this was the
>>case. If the cd <dir> fails, do you really want to execute <command>?
> 
This is only about opening an application program, not about Bash commands 
in general.  So, the answer is YES, you want to open the application even 
if the 'cd' fails.
> 
> Oh, I see. So slightly more explicit wording would be:
> 
>>In Linux for <command> TO ACT ONLY ON FILES THAT IN  <dir> you would
>>have to do:

>>cd <dir> && <command>
> 
Which is not the case here.
> 
> But I get your point. :-) You're right.
> 
No he isn't.  This is only about the limited context of opening an 
application with a 'desktop' file.  Perhaps if he had read the whole thread 
before he answered rather than ... .  "&&" is correctly used when command 
need to be dependent on the previous command.  This is not the case here.

--
JRT

 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic