added oh-my-ssh back as raw code, not as a submodule.
This commit is contained in:
parent
23fe3ee6d5
commit
f663947bfc
1195 changed files with 126994 additions and 0 deletions
19
.zsh/oh-my-zsh/plugins/copyfile/copyfile.plugin.zsh
Normal file
19
.zsh/oh-my-zsh/plugins/copyfile/copyfile.plugin.zsh
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
# Copies the contents of a given file to the system or X Windows clipboard
|
||||
#
|
||||
# Usage: copyfile <file>
|
||||
function copyfile {
|
||||
emulate -L zsh
|
||||
|
||||
if [[ -z "$1" ]]; then
|
||||
echo "Usage: copyfile <file>"
|
||||
return 1
|
||||
fi
|
||||
|
||||
if [[ ! -f "$1" ]]; then
|
||||
echo "Error: '$1' is not a valid file."
|
||||
return 1
|
||||
fi
|
||||
|
||||
clipcopy $1 || return 1
|
||||
echo ${(%):-"%B$1%b copied to clipboard."}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue