mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2025-12-26 02:12:33 +01:00
Added a log for sprunge links. No need to re-make them anymore :D Well, unless you have updated it.
This commit is contained in:
parent
d39d26b8fe
commit
630295efc8
1 changed files with 3 additions and 2 deletions
|
|
@ -43,6 +43,7 @@ sprunge() {
|
|||
# read from stdin
|
||||
url=$(curl -s -F 'sprunge=<-' http://sprunge.us <& 0)
|
||||
urls=(${url//[[:space:]]})
|
||||
echo "stdin: $url"
|
||||
else
|
||||
# treat arguments as a list of files to upload
|
||||
for file in $@; do
|
||||
|
|
@ -56,14 +57,14 @@ sprunge() {
|
|||
url=${url//[[:space:]]}
|
||||
[[ $syntax != text ]] && url=${url}?${syntax}
|
||||
|
||||
echo "$file: $url" >> $OMZ/sprunge.log
|
||||
urls+=(${url})
|
||||
done
|
||||
fi
|
||||
|
||||
# output each url on its own line
|
||||
for url in $urls
|
||||
echo $url && echo $url >> "$OMZ/sprunge.log"
|
||||
|
||||
echo $url
|
||||
|
||||
# don't copy to clipboad if piped
|
||||
[[ -t 1 ]] && sendtoclip $urls
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue