mirror of
https://github.com/xpipe-io/xpipe.git
synced 2024-11-22 07:30:24 +00:00
Allow for an easy creation of unsupported shell opener
This commit is contained in:
parent
e3081e3a81
commit
9fbaa5a50b
1 changed files with 14 additions and 0 deletions
|
@ -4,6 +4,20 @@ import lombok.NonNull;
|
|||
|
||||
public interface ShellOpenFunction {
|
||||
|
||||
static ShellOpenFunction unsupported() {
|
||||
return new ShellOpenFunction() {
|
||||
@Override
|
||||
public CommandBuilder prepareWithoutInitCommand() {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommandBuilder prepareWithInitCommand(@NonNull String command) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
static ShellOpenFunction of(String b) {
|
||||
return new ShellOpenFunction() {
|
||||
@Override
|
||||
|
|
Loading…
Reference in a new issue