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
|
local url syntax
|
||||||
|
|
||||||
if [[ -t 0 ]]; then
|
if [[ -t 0 ]]; then
|
||||||
if [[ "$*" ]]; then
|
if [[ -n "$*" ]]; then
|
||||||
if [[ -f "$*" ]]; then
|
if [[ -f "$*" ]]; then
|
||||||
# Use python to attempt to detect the syntax
|
# Use python to attempt to detect the syntax
|
||||||
syntax=$(echo "try:
|
syntax=$(echo "try:
|
||||||
|
|
@ -32,7 +32,7 @@ sprunge () {
|
||||||
print(get_lexer_for_filename('$*').aliases[0])
|
print(get_lexer_for_filename('$*').aliases[0])
|
||||||
except:
|
except:
|
||||||
print('text')" | python)
|
print('text')" | python)
|
||||||
url=$(cat "$*" | curl -F 'sprunge=<-' http://sprunge.us)
|
url=$(curl -F 'sprunge=<-' http://sprunge.us < "$*")
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
cat << HERE
|
cat << HERE
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue