[wmii] Feature request?

From: Jeremy Hankins <nowan_AT_nowan.org>
Date: Fri, 26 May 2006 14:52:42 -0400

A way to enter path info via wmiimenu, or similar.

I have the following rather crude solution:

path_menu () {
    while [ -z "$cur" -o -d "$file" ]; do
        if cur=`ls -1 $file | wmiimenu`; then
            if [ -z "$file" ]; then
                file=$cur
            else
                file="$file/$cur"
            fi
        else
            file=""
            break
        fi
    done
    echo $file
}

Unfortunately it has a couple of drawbacks:

 - You have to hit 'enter' to separate elements of the path rather than
   the more intuitive '/'.

 - While entering a path to a file you can only ever see the current
   element.

 - There's no way for the final element to be a directory.

First of all, I've only been playing with wmii for a few days now, so is
there something I'm missing? If not, and if this is desirable
functionality, might it be possible to:

 - Add a command-line switch to wmiimenu which specifies an alternate
   key indicating end-of-input (e.g., '/' in addition to 'return').

 - Provide for a prompt string to be specified as well. So for example,
   the prompt could be set to '/home/', the user would type 'foo/', and
   a new wmiimenu would set the prompt to '/home/foo/'.

 - When an alternate end-of-input key is used ('/') it's included in the
   string that wmiimenu writes to stdout. That way it can be checked
   for by the process calling wmiimenu.

The above is all assuming that you don't want to redo wmiimenu to
include actual path traversal code, which I'm guessing is the case given
the current design.

-- 
Jeremy Hankins <nowan_AT_nowan.org>
PGP fingerprint: 748F 4D16 538E 75D6 8333  9E10 D212 B5ED 37D0 0A03
Received on Fri May 26 2006 - 20:53:25 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 16:07:02 UTC