mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2025-12-26 02:12:33 +01:00
Consistent indention levels.
This commit is contained in:
parent
d20f46ef12
commit
d8d7b45f96
1 changed files with 23 additions and 22 deletions
|
|
@ -3,11 +3,11 @@
|
||||||
# Original found at http://www.shellperson.net/sprunge-pastebin-script/
|
# Original found at http://www.shellperson.net/sprunge-pastebin-script/
|
||||||
|
|
||||||
usage() {
|
usage() {
|
||||||
description | fmt -s >&2
|
description | fmt -s >&2
|
||||||
}
|
}
|
||||||
|
|
||||||
description() {
|
description() {
|
||||||
cat << HERE
|
cat << HERE
|
||||||
|
|
||||||
DESCRIPTION
|
DESCRIPTION
|
||||||
Upload data and fetch URL from the pastebin http://sprunge.us
|
Upload data and fetch URL from the pastebin http://sprunge.us
|
||||||
|
|
@ -35,7 +35,7 @@ If a filename is misspelled or doesn't have the necessary path description, it w
|
||||||
--------------------------------------------------------------------------
|
--------------------------------------------------------------------------
|
||||||
|
|
||||||
HERE
|
HERE
|
||||||
exit
|
exit
|
||||||
}
|
}
|
||||||
|
|
||||||
sprunge() {
|
sprunge() {
|
||||||
|
|
@ -43,7 +43,8 @@ sprunge() {
|
||||||
if [ "$*" ]; then
|
if [ "$*" ]; 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:
|
||||||
from pygments.lexers import get_lexer_for_filename
|
from pygments.lexers import get_lexer_for_filename
|
||||||
print(get_lexer_for_filename('$*').aliases[0])
|
print(get_lexer_for_filename('$*').aliases[0])
|
||||||
except:
|
except:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue