fixed 'selected' list out of range

This commit is contained in:
ivan 2018-04-08 16:27:16 +03:00
parent 8e930115a5
commit 450b30b196
3 changed files with 5 additions and 5 deletions

View File

@ -24,13 +24,12 @@ sshch -h
```
**If you want to use unsafe 'password' feature you must install 'sshpass' first.**
If you want to use bash autocompletion function with sshch, copy autocompletion script to /etc/bash_completion.d/:
- If you want to use bash autocompletion function with sshch, copy autocompletion script to /etc/bash_completion.d/:
```
sudo cp sshch_bash_completion.sh /etc/bash_completion.d/sshch
```
(changes will come into effect with new bash session)
If you want to use zsh autocompletion:
- If you want to use zsh autocompletion:
1) Place File in a Directory where ZSH can find it
-> Search Path is Stored in $fpath
-> echo $fpath

View File

@ -10,7 +10,7 @@ def main():
url='https://github.com/zlaxy/sshch/',
description='Ssh connection manager',
license='DWTWL 2.5',
version='0.994',
version='0.995',
py_modules=['sshch'],
scripts=['sshch/sshch'],

View File

@ -20,7 +20,7 @@ import curses
from curses import textpad, panel
# https://github.com/zlaxy/sshch
version = "0.994"
version = "0.995"
# path to conf file, default: ~/.config/sshch.conf
conf_file = path.expanduser("~") + '/.config/sshch.conf'
# expand groups by default
@ -682,6 +682,7 @@ def CursesMain():
if not len(selected) > 0:
selected.append(strings[position - 1].split()[0].strip())
CursesConnect(screen, selected)
selected_strings = [" " for i in range(0, row_num + 1)]
if (key_pressed == 32 or key_pressed == (
curses.KEY_IC)) and row_num != 0:
if selected_strings[position] == ' ':