Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jail autocomplete function - testing required #758

Open
wants to merge 22 commits into
base: master
Choose a base branch
from

Conversation

tschettervictor
Copy link
Contributor

I've rewritten the autocomplete function to be a little easier to follow.
These are the key points.

  • main function is inside common.sh
  • it is only run if the jail is not first found by grepping the jails directory
  • it is only run inside an *.sh file that requires the TARGET=jail arg

When testing, please try to use every single command that is directed toward a jail, and let me know if it works properly or not.

@tschettervictor
Copy link
Contributor Author

With this current code, the autocomplete function is only called if the jails directory is not detected.

The function will then proceed to check the directory, and if not found it will exit. If it find multiple directories, it will exist informing the user of multiple choices. If only one is found, it will set it as the TARGET.

@tschettervictor
Copy link
Contributor Author

@bmac2 Not sure where I can view the shellcheck errors. Usually they are listed right inside the file...

@tschettervictor
Copy link
Contributor Author

@bmac2 @yaazkal

Ive added some shellcheck bypasses for the following reasons.

  1. 2010
  • I noticed this is bypassed elsewhere, and I can't think of a more practical way to do this. grep is the only way I can find for example "jail" when grepping "ja" so...
  1. 2034
  • this is because "TARGET" is not used inside "common.sh" but it is still used whenever it is called inside any other scripts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant