--- En date de : Ven 7.8.09, wagnerdm@seas.upenn.edu <wagnerdm@seas.upenn.edu> a écrit :
Dunno about your problem, but your script can be simplified:

#!/bin/sh
prompt=Liste
action=cd
if index=`ls -dU */ .*/ | dmenu -i -p "$prompt: $PWD"`; then
  $action $index && lsd; else
  actions
fi

dmenu itself fails if you hit escape; it only succeeds if you actually choose something, so it can be used in the if clause directly.  (I know this because I have a bug in yeganesh that violates this useful behavior.  If I ever get around to making another release, it will have a fix for this. =)

As for autocompletion... doesn't dmenu have that built in?  (Try hitting tab, or left and right when there are multiple completions.)

Hello, 
thanks for your reply,
My script can surely be simplified as i'm still informaticly young :)
but when i try your proposal in a xterm, I have : "line 5 : command not found"
so at the moment i keep my version until i've found what's the trouble. 

I already use escape, to go to the "else" part of my script,
that is to say the script named "actions" which goal is similar to your yeganesh,
It is as "lsd", a simple script.
ls parse a folder with only symbolic links
to my most used programs and scripts
and pipes to dmenu.

For the autocompletion, I meant the one which can be used in XMonad,
for example with : { autoComplete = Just 100000 } in the ~/.xmonad/xmonad.hs
with which, when only one result from the list is still matching, the action
is automaticly executed.

I've paste this script only to explain what I meant in my first message,
which is more xmonad related : 

When I use the XMonad.Prompt.Directory
to dive in subdirectories, how could it calls itself until I send an Escape message,
It might be a single haskell line in the XMonad/Prompt/Directory.hs file
from the xmonad-contrib source but I've no clue :(