plugin/python: shfmt
My apologies to future `git blame` hunters ♥
This commit is contained in:
@@ -106,6 +106,7 @@ plugins/available/nodenv.plugin.bash
|
||||
plugins/available/percol.plugin.bash
|
||||
plugins/available/plenv.plugin.bash
|
||||
plugins/available/pyenv.plugin.bash
|
||||
plugins/available/python.plugin.bash
|
||||
plugins/available/rbenv.plugin.bash
|
||||
plugins/available/ruby.plugin.bash
|
||||
plugins/available/textmate.plugin.bash
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
cite about-plugin
|
||||
# shellcheck shell=bash
|
||||
about-plugin 'alias "shttp" to SimpleHTTPServer'
|
||||
|
||||
if _command_exists python2; then
|
||||
alias shttp='python2 -m SimpleHTTPServer'
|
||||
elif _command_exists python
|
||||
elif _command_exists python; then
|
||||
alias shttp='python -m SimpleHTTPServer'
|
||||
else
|
||||
return 1
|
||||
@@ -19,14 +19,13 @@ function pyedit() {
|
||||
|
||||
if [[ "$xpyc" == "" ]]; then
|
||||
echo "Python module $1 not found"
|
||||
return -1
|
||||
|
||||
return 1
|
||||
elif [[ "$xpyc" == *__init__.py* ]]; then
|
||||
xpydir="${xpyc%/*}";
|
||||
echo "$EDITOR $xpydir";
|
||||
${VISUAL:-${EDITOR:-${ALTERNATE_EDITOR:-nano}}} "$xpydir";
|
||||
xpydir="${xpyc%/*}"
|
||||
echo "$EDITOR $xpydir"
|
||||
${VISUAL:-${EDITOR:-${ALTERNATE_EDITOR:-nano}}} "$xpydir"
|
||||
else
|
||||
echo "$EDITOR ${xpyc%.*}.py";
|
||||
${VISUAL:-${EDITOR:-${ALTERNATE_EDITOR:-nano}}} "${xpyc%.*}.py";
|
||||
echo "$EDITOR ${xpyc%.*}.py"
|
||||
${VISUAL:-${EDITOR:-${ALTERNATE_EDITOR:-nano}}} "${xpyc%.*}.py"
|
||||
fi
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user