Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

using zshz to select target directory



Hi

The following actually works very well but I feel it's a bit of a kludge/work-around.

I can copy a file 'fish.jpg' to the directory which zshz thinks I'm most likely to want according to my string 'myfishes'

e.g.

sz fish.jpg myfishs

sz () {
    alias z='zshz 2>&1'
    if (( $# != 2 ))
    then
        echo 'Usage: Enter file to copy & destination directory string for z'
        echo 'e.g: sz file.txt project2'
        return 1
    fi
    f=$1
    zshz $2 2>&1
    cp -ip ~-/$f .
}

Is there anything more elegant more 'zsh'?


zzapper






Messages sorted by: Reverse Date, Date, Thread, Author