iterative / shtab

↔️ Automagic shell tab completion for Python CLI applications
https://docs.iterative.ai/shtab
Other
363 stars 35 forks source link

fix bash completion with space #81

Closed casperdcl closed 2 years ago

casperdcl commented 2 years ago

fixes #74

(vis. https://stackoverflow.com/questions/1146098/properly-handling-spaces-and-quotes-in-bash-completion)

sourcery-ai[bot] commented 2 years ago

Sourcery Code Quality Report

Merging this PR leaves code quality unchanged.

Quality metrics Before After Change
Complexity 30.54 😞 30.54 😞 0.00
Method Length 87.98 🙂 87.98 🙂 0.00
Working memory 15.03 😞 15.03 😞 0.00
Quality 43.25% 😞 43.25% 😞 0.00%
Other metrics Before After Change
Lines 1283 1284 1
Changed files Quality Before Quality After Quality Change
shtab/init.py 29.55% 😞 29.55% 😞 0.00%
tests/test_shtab.py 78.96% ⭐ 78.96% ⭐ 0.00%

Here are some functions in these files that still need a tune-up:

File Function Complexity Length Working Memory Quality Recommendation
shtab/init.py get_bash_commands 78 ⛔ 500 ⛔ 26 ⛔ 2.75% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
shtab/init.py complete_zsh 62 ⛔ 752 ⛔ 25 ⛔ 3.53% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
shtab/init.py get_bash_commands.recurse 58 ⛔ 447 ⛔ 26 ⛔ 4.47% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
shtab/init.py complete_tcsh 53 ⛔ 398 ⛔ 19 ⛔ 8.79% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
shtab/init.py complete_zsh.recurse 18 🙂 214 ⛔ 16 ⛔ 31.98% 😞 Try splitting into smaller methods. Extract out complex expressions

Legend and Explanation

The emojis denote the absolute quality of the code:

The 👍 and 👎 indicate whether the quality has improved or gotten worse with this pull request.


Please see our documentation here for details on how these metrics are calculated.

We are actively working on this report - lots more documentation and extra metrics to come!

Help us improve this quality report!

casperdcl commented 2 years ago

/tag v1.5.5 60a8525