mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-01-09 02:24:03 +01:00
Renamed $path into $file
This commit is contained in:
parent
eb76f3582f
commit
2cc3c5bf37
1 changed files with 6 additions and 4 deletions
|
|
@ -1,15 +1,17 @@
|
||||||
# Upload files to flag.io
|
# Upload files to flag.io
|
||||||
upload() {
|
upload() {
|
||||||
|
local file
|
||||||
|
|
||||||
if [ $# -lt 1 ]; then
|
if [ $# -lt 1 ]; then
|
||||||
printf 'usage: upload <file> [<file> ...]\n'
|
printf 'usage: upload <file> [<file> ...]\n'
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for path in $@; do
|
for file in $@; do
|
||||||
if [ -f "$path" ]; then
|
if [ -f "$file" ]; then
|
||||||
curl -sT "$path" flag.io | egrep -v '^#'
|
curl -sT "$file" flag.io | egrep -v '^#'
|
||||||
else
|
else
|
||||||
printf 'File not found: %s\n' "$path"
|
printf 'File not found: %s\n' "$file"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue