ghantoos / lshell

lshell is a shell coded in Python, that lets you restrict a user's environment to limited sets of commands, choose to enable/disable any command over SSH (e.g. SCP, SFTP, rsync, etc.), log user's commands, implement timing restriction, and more.
GNU General Public License v3.0
437 stars 112 forks source link

Better auto-completion for allowed paths #172

Open miihael opened 7 years ago

miihael commented 7 years ago

Currently, auto-complete feature only works inside the allowed paths. It would be convenient, if auto-complete also suggests the allowed paths themselves.

For example, using the following configuration:

paths = ['/var/log/nginx/','/var/log/apt/','/var/log/exim4/']

When a user of lshell types cd /var/log/<tab>, the shell should show nginx apt exim4 as the suggestions for auto-complete. If he types cd /var/<tab> - he receives log as the suggestion.

This should not break security, but adds convenience for users.