mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-01-02 02:19:06 +01:00
Truly make python an optional dependency of the sprunge plugin
This commit is contained in:
parent
32eac165c0
commit
21caf6ea77
1 changed files with 8 additions and 4 deletions
|
|
@ -48,6 +48,7 @@ FILENAMES
|
||||||
HERE
|
HERE
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (( $+commands[python] )); then
|
||||||
sprunge_syntax() {
|
sprunge_syntax() {
|
||||||
echo "try:
|
echo "try:
|
||||||
from pygments.lexers import get_lexer_for_filename
|
from pygments.lexers import get_lexer_for_filename
|
||||||
|
|
@ -55,6 +56,9 @@ sprunge_syntax() {
|
||||||
except:
|
except:
|
||||||
print('text')" | python
|
print('text')" | python
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
sprunge_syntax() { echo 'text' }
|
||||||
|
fi
|
||||||
|
|
||||||
sprunge() {
|
sprunge() {
|
||||||
local urls url file syntax
|
local urls url file syntax
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue