mirror of
https://git.decapod.one/brethil/dotfiles
synced 2024-12-22 15:21:30 +01:00
zsh: functions: fix upload()
This commit is contained in:
parent
d72886b6c1
commit
9ccf8699ec
|
@ -121,14 +121,14 @@ function upload
|
|||
echo -e "Done, file at:\t$out"
|
||||
if [[ $(uname) == "Darwin" ]]; then
|
||||
clipboard="pbcopy"
|
||||
elif command -v wl-copy; then
|
||||
elif command -v wl-copy &>/dev/null; then
|
||||
clipboard="wl-copy"
|
||||
elif command -v xclip; then
|
||||
elif command -v xclip &>/dev/null ; then
|
||||
clipboard="xclip"
|
||||
else
|
||||
clipboard="cat"
|
||||
fi
|
||||
echo -n"$out" | $clipboard
|
||||
echo -en "$out" | $clipboard
|
||||
}
|
||||
|
||||
## If connecting through ssh and reverse forwarding port 2222 (ssh -R 2222:localhost:22 ), this function allows to copy the files back to the machine one is connecting from by typing 'mecp filename' (configure the username for "localhost" in ~/.ssh/config or add an username)
|
||||
|
|
Loading…
Reference in New Issue
Block a user