Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
A unix shell script which allows you to "pick" files one at a time and then drop them in one place
Shell
Branch: master
Pull request Compare This branch is 1 commit behind iaindooley:master.

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
README
drop
pick

README

Hi, I made this shell script so that I could
pick up files as I wander about on the command
line and then drop them in the same location.

I thought you might like it, too. In order to
install and use:

chmod 755 pick && sudo cp pick /usr/bin/
chmod 755 drop && sudo cp drop /usr/bin/

then you can cruise around and do:

pick filename1 filename2
cd otherdir
pick otherfile
... etc ...

cd /home
mkdir central && cd central
drop

It's not robust at all - it stores your picks
in ~/.pick until you call drop at which time it
uses the file paths in ~/.pick to create a new
executable ~/.drop file to copy each of the
files you picked to the current working
directory.

Thanks to André Paramés Pereira for the patch
to run multiple files at once.

git user erickworking added this gist:

https://gist.github.com/833140

"It allows multiple file selection and running
arbitrary commands. The string {} is replaced
by the file name in run (e.g. "run cp -v {} ."
copies all the files to the current directory)."

Thanks to andresp on reddit for strengthening
the script so it won't break with special chars
or spaces, and also making it more efficient!
Something went wrong with that request. Please try again.