From: zzapper <zsh@rayninfo.co.uk>
To: Zsh-Users List <zsh-users@zsh.org>
Subject: using zshz to select target directory
Date: Tue, 20 Sep 2022 08:55:04 +0100 [thread overview]
Message-ID: <597b635d-4f36-2d4e-75bf-006f226b1e28@rayninfo.co.uk> (raw)
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
next reply other threads:[~2022-09-20 7:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-20 7:55 zzapper [this message]
2022-09-22 7:25 ` Daniel Shahaf
2022-09-22 8:15 ` david rayner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=597b635d-4f36-2d4e-75bf-006f226b1e28@rayninfo.co.uk \
--to=zsh@rayninfo.co.uk \
--cc=zsh-users@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).