zsh-users
 help / color / mirror / code / Atom feed
* using zshz to select target directory
@ 2022-09-20  7:55 zzapper
  2022-09-22  7:25 ` Daniel Shahaf
  0 siblings, 1 reply; 3+ messages in thread
From: zzapper @ 2022-09-20  7:55 UTC (permalink / raw)
  To: Zsh-Users List

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




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-09-22  8:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-20  7:55 using zshz to select target directory zzapper
2022-09-22  7:25 ` Daniel Shahaf
2022-09-22  8:15   ` david rayner

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).