Add fuzzy non case sensistive search

This commit is contained in:
fluzzi 2023-03-21 18:23:29 -03:00
parent bc157a990c
commit 8329ca25de
4 changed files with 21 additions and 17 deletions

View File

@ -1,2 +1,2 @@
__version__ = "2.1.7" __version__ = "2.1.8"

View File

@ -586,6 +586,8 @@ class connapp:
#Generates an inquirer list to pick #Generates an inquirer list to pick
if FzfPrompt and self.fzf: if FzfPrompt and self.fzf:
fzf = FzfPrompt(executable_path="fzf-tmux") fzf = FzfPrompt(executable_path="fzf-tmux")
if not self.case:
fzf = FzfPrompt(executable_path="fzf-tmux -i")
answer = fzf.prompt(list, fzf_options="-d 25%") answer = fzf.prompt(list, fzf_options="-d 25%")
if len(answer) == 0: if len(answer) == 0:
return return

View File

@ -241,7 +241,7 @@ class node:
default False. default False.
- timeout (int):Time in seconds for expect to wait for prompt/EOF. - timeout (int):Time in seconds for expect to wait for prompt/EOF.
default 20. default 10.
### Returns: ### Returns:
@ -324,7 +324,7 @@ class node:
need some special symbol. need some special symbol.
- timeout (int):Time in seconds for expect to wait for prompt/EOF. - timeout (int):Time in seconds for expect to wait for prompt/EOF.
default 20. default 10.
### Returns: ### Returns:
bool: true if expected value is found after running the commands bool: true if expected value is found after running the commands
@ -563,7 +563,7 @@ class nodes:
number of members. number of members.
- timeout (int): Time in seconds for expect to wait for prompt/EOF. - timeout (int): Time in seconds for expect to wait for prompt/EOF.
default 20. default 10.
###Returns: ###Returns:
@ -644,7 +644,7 @@ class nodes:
number of members. number of members.
- timeout (int): Time in seconds for expect to wait for prompt/EOF. - timeout (int): Time in seconds for expect to wait for prompt/EOF.
default 20. default 10.
### Returns: ### Returns:

View File

@ -1253,6 +1253,8 @@ __pdoc__ = {
#Generates an inquirer list to pick #Generates an inquirer list to pick
if FzfPrompt and self.fzf: if FzfPrompt and self.fzf:
fzf = FzfPrompt(executable_path="fzf-tmux") fzf = FzfPrompt(executable_path="fzf-tmux")
if not self.case:
fzf = FzfPrompt(executable_path="fzf-tmux -i")
answer = fzf.prompt(list, fzf_options="-d 25%") answer = fzf.prompt(list, fzf_options="-d 25%")
if len(answer) == 0: if len(answer) == 0:
return return
@ -2107,7 +2109,7 @@ tasks:
default False. default False.
- timeout (int):Time in seconds for expect to wait for prompt/EOF. - timeout (int):Time in seconds for expect to wait for prompt/EOF.
default 20. default 10.
### Returns: ### Returns:
@ -2190,7 +2192,7 @@ tasks:
need some special symbol. need some special symbol.
- timeout (int):Time in seconds for expect to wait for prompt/EOF. - timeout (int):Time in seconds for expect to wait for prompt/EOF.
default 20. default 10.
### Returns: ### Returns:
bool: true if expected value is found after running the commands bool: true if expected value is found after running the commands
@ -2417,7 +2419,7 @@ tasks:
default False. default False.
- timeout (int):Time in seconds for expect to wait for prompt/EOF. - timeout (int):Time in seconds for expect to wait for prompt/EOF.
default 20. default 10.
</code></pre> </code></pre>
<h3 id="returns">Returns:</h3> <h3 id="returns">Returns:</h3>
<pre><code>str: Output of the commands you ran on the node. <pre><code>str: Output of the commands you ran on the node.
@ -2459,7 +2461,7 @@ tasks:
default False. default False.
- timeout (int):Time in seconds for expect to wait for prompt/EOF. - timeout (int):Time in seconds for expect to wait for prompt/EOF.
default 20. default 10.
### Returns: ### Returns:
@ -2541,7 +2543,7 @@ tasks:
need some special symbol. need some special symbol.
- timeout (int):Time in seconds for expect to wait for prompt/EOF. - timeout (int):Time in seconds for expect to wait for prompt/EOF.
default 20. default 10.
</code></pre> </code></pre>
<h3 id="returns">Returns:</h3> <h3 id="returns">Returns:</h3>
<pre><code>bool: true if expected value is found after running the commands <pre><code>bool: true if expected value is found after running the commands
@ -2583,7 +2585,7 @@ tasks:
need some special symbol. need some special symbol.
- timeout (int):Time in seconds for expect to wait for prompt/EOF. - timeout (int):Time in seconds for expect to wait for prompt/EOF.
default 20. default 10.
### Returns: ### Returns:
bool: true if expected value is found after running the commands bool: true if expected value is found after running the commands
@ -2775,7 +2777,7 @@ tasks:
number of members. number of members.
- timeout (int): Time in seconds for expect to wait for prompt/EOF. - timeout (int): Time in seconds for expect to wait for prompt/EOF.
default 20. default 10.
###Returns: ###Returns:
@ -2856,7 +2858,7 @@ tasks:
number of members. number of members.
- timeout (int): Time in seconds for expect to wait for prompt/EOF. - timeout (int): Time in seconds for expect to wait for prompt/EOF.
default 20. default 10.
### Returns: ### Returns:
@ -2940,7 +2942,7 @@ tasks:
number of members. number of members.
- timeout (int): Time in seconds for expect to wait for prompt/EOF. - timeout (int): Time in seconds for expect to wait for prompt/EOF.
default 20. default 10.
</code></pre> </code></pre>
<h3 id="returns">Returns:</h3> <h3 id="returns">Returns:</h3>
<pre><code>dict: Dictionary formed by nodes unique as keys, Output of the <pre><code>dict: Dictionary formed by nodes unique as keys, Output of the
@ -2989,7 +2991,7 @@ tasks:
number of members. number of members.
- timeout (int): Time in seconds for expect to wait for prompt/EOF. - timeout (int): Time in seconds for expect to wait for prompt/EOF.
default 20. default 10.
###Returns: ###Returns:
@ -3069,7 +3071,7 @@ tasks:
number of members. number of members.
- timeout (int): Time in seconds for expect to wait for prompt/EOF. - timeout (int): Time in seconds for expect to wait for prompt/EOF.
default 20. default 10.
</code></pre> </code></pre>
<h3 id="returns">Returns:</h3> <h3 id="returns">Returns:</h3>
<pre><code>dict: Dictionary formed by nodes unique as keys, value is True if <pre><code>dict: Dictionary formed by nodes unique as keys, value is True if
@ -3116,7 +3118,7 @@ tasks:
number of members. number of members.
- timeout (int): Time in seconds for expect to wait for prompt/EOF. - timeout (int): Time in seconds for expect to wait for prompt/EOF.
default 20. default 10.
### Returns: ### Returns: