Skip to content

sdavidsson90/copytools.sh

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 

Repository files navigation

copytools.sh

These functions will allow you to copy something and drop it off somewhere else.

The idea is that you should not have to spell out the full path(s) of a file in a single command, but navigate to the file, do the copy action, navigate to a desired location and do the paste action.

The beauty is that the functions work with the system clipboard. A copy action done in the command line will be accessible in a GUI app (and vice versa).

List of available functions

  • cpwd: copy working directory
  • cpfc: copy file contents
  • cpfp: copy file path
  • p: print clipboard content to stdout
  • pf: paste file to current working directory
  • mvf: move file to current working directory

Demo

Demoing copytools.sh

Setup

Assuming that $LOCATION is the location of the script on your system, add this line to your .bashrc/.zshrc:

source $LOCATION/copytools.sh

Compatibility

Bash/ZSH on MacOS/Linux. Headless Linux servers are not supported.

About

Tools for copying and pasting in the command line

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages