diff --git a/plugins/python/pyclean.fish b/plugins/python/pyclean.fish index 3b5475a..52c032f 100644 --- a/plugins/python/pyclean.fish +++ b/plugins/python/pyclean.fish @@ -1,10 +1,12 @@ # clean current directory recursively from any .pyc and .pyo files function pyclean - if test -n $argv - set path2CLEAN $argv - else + set -l path2CLEAN + + if set -q $argv set path2CLEAN . + else + set path2CLEAN $argv end find $path2CLEAN -name "*.py[co]" -type f -delete -end \ No newline at end of file +end