mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2025-12-26 02:12:33 +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,15 +48,19 @@ FILENAMES
|
|||
HERE
|
||||
}
|
||||
|
||||
sprunge_syntax() {
|
||||
echo "try:
|
||||
if (( $+commands[python] )); then
|
||||
sprunge_syntax() {
|
||||
echo "try:
|
||||
from pygments.lexers import get_lexer_for_filename
|
||||
print(get_lexer_for_filename('$1').aliases[0])
|
||||
except:
|
||||
print('text')" | python
|
||||
}
|
||||
}
|
||||
else
|
||||
sprunge_syntax() { echo 'text' }
|
||||
fi
|
||||
|
||||
sprunge () {
|
||||
sprunge() {
|
||||
local urls url file syntax
|
||||
|
||||
urls=()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue