mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2025-12-26 02:12:33 +01:00
One bug fix, one removal of an unnecessary cat.
This commit is contained in:
parent
1a5e86d9a6
commit
e0535cce8b
1 changed files with 2 additions and 2 deletions
|
|
@ -24,7 +24,7 @@ sprunge () {
|
|||
local url syntax
|
||||
|
||||
if [[ -t 0 ]]; then
|
||||
if [[ "$*" ]]; then
|
||||
if [[ -n "$*" ]]; then
|
||||
if [[ -f "$*" ]]; then
|
||||
# Use python to attempt to detect the syntax
|
||||
syntax=$(echo "try:
|
||||
|
|
@ -32,7 +32,7 @@ sprunge () {
|
|||
print(get_lexer_for_filename('$*').aliases[0])
|
||||
except:
|
||||
print('text')" | python)
|
||||
url=$(cat "$*" | curl -F 'sprunge=<-' http://sprunge.us)
|
||||
url=$(curl -F 'sprunge=<-' http://sprunge.us < "$*")
|
||||
fi
|
||||
else
|
||||
cat << HERE
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue