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

Code #400

Closed
wants to merge 8 commits into from
Original file line number Diff line number Diff line change
Expand Up @@ -14,34 +14,40 @@
* limitations under the License.
*/

package com.github.fonimus.ssh.shell;
package com.github.fonimus.ssh.shell;

import lombok.Getter;
import lombok.Setter;
import org.springframework.shell.CompletionProposal;

/**
* Extended completion proposal to be able to set complete attribute of proposal
*/
public class ExtendedCompletionProposal extends CompletionProposal {

/**
* If should add space after proposed proposal
*/
@Getter
@Setter
private boolean complete;

/**
* Default constructor
*
* @param value string value
* @param complete true if should add space after proposed proposal (true is default value when not using
* extended completion proposal)
*/
public ExtendedCompletionProposal(String value, boolean complete) {
super(value);
this.complete = complete;
}

}
import lombok.Getter;
import lombok.Setter;
import org.springframework.shell.CompletionProposal;

/**
* Extended completion proposal to allow customization of completion behavior.
*/
public class ExtendedCompletionProposal extends CompletionProposal {

/**
* The string value of the proposal.
*/
@Getter
private final String value;

/**
* Indicates if a space should be added after the proposed completion.
*/
@Getter
@Setter
private boolean complete;

/**
* Default constructor.
*
* @param value string value
* @param complete true if a space should be added after the proposed completion
*/
public ExtendedCompletionProposal(String value, boolean complete) {
super(value);
this.value = value;
this.complete = complete;
}
}

Loading