On Sun, Jun 15, 2008 at 11:39:38AM +0200, Sander van Dijk wrote:
> On 6/14/08, James Turner <[EMAIL PROTECTED]> wrote:
> > Doesn't it make more sense to do a test, then just redirect error
> > output?
>
> Then you'd have to test more than your patch does: right now, your
> patch only tests if we'r
On 6/14/08, James Turner <[EMAIL PROTECTED]> wrote:
> Doesn't it make more sense to do a test, then just redirect error
> output?
Then you'd have to test more than your patch does: right now, your
patch only tests if we're dealing with a directory; whether or not the
user running the script has pe
On (14/06/08 16:20), James Turner wrote:
> To: dynamic window manager
> From: James Turner <[EMAIL PROTECTED]>
> Subject: Re: [dwm] dmenu directory test
>
> On Sat, Jun 14, 2008 at 10:16:03PM +0200, Peter Hartlich wrote:
> > Hi,
> >
> > > [...] I was
> Doesn't it make more sense to do a test, then just redirect error
> output?
That creates a race condition (the directory could be deleted
between test and cd). Note that the rest of the code is only run
if cd was successful.
Also, test may be an external program.
Regards,
Peter
On Sat, Jun 14, 2008 at 10:16:03PM +0200, Peter Hartlich wrote:
> Hi,
>
> > [...] I was wondering if it would make sense to add a test in dmenu_path
> > to make sure the directory actually exists before trying to cd into it?
>
> If you're bothered about cd printing an error message, you could jus
Hi,
> [...] I was wondering if it would make sense to add a test in dmenu_path
> to make sure the directory actually exists before trying to cd into it?
If you're bothered about cd printing an error message, you could just add
2>/dev/null to the cd line.
Regards,
Peter
I just cloned the latest tip for dwm and dmenu. I'm happy to report
everything is working great for me. On that note, I was wondering if it
would make sense to add a test in dmenu_path to make sure the directory
actually exists before trying to cd into it? I know I have $HOME/bin in
my $PATH, bu