Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
using zshz to select target directory
- X-seq: zsh-users 28105
- From: zzapper <zsh@xxxxxxxxxxxxxx>
- To: Zsh-Users List <zsh-users@xxxxxxx>
- Subject: using zshz to select target directory
- Date: Tue, 20 Sep 2022 08:55:04 +0100
- Archived-at: <https://zsh.org/users/28105>
- List-id: <zsh-users.zsh.org>
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