mirror of
https://github.com/xpipe-io/xpipe.git
synced 2024-11-21 23:20:23 +00:00
Init file sourcing changes
This commit is contained in:
parent
24600a98be
commit
627a8141cd
2 changed files with 4 additions and 13 deletions
|
@ -48,16 +48,11 @@ public class ScriptHelper {
|
|||
// Normalize line endings
|
||||
content += nl + preInit.stream().flatMap(s -> s.lines()).collect(Collectors.joining(nl)) + nl;
|
||||
|
||||
var applyRcCommand = t.applyRcFileCommand();
|
||||
if (applyRcCommand != null) {
|
||||
content += nl + applyRcCommand + nl;
|
||||
}
|
||||
|
||||
// We just apply the profile files always, as we can't be sure that they definitely have been applied.
|
||||
// Especially if we launch something that is not the system default shell
|
||||
var applyProfilesCommand = t.applyProfileFilesCommand();
|
||||
if (applyProfilesCommand != null) {
|
||||
content += nl + applyProfilesCommand + nl;
|
||||
var applyCommand = t.applyInitFileCommand();
|
||||
if (applyCommand != null) {
|
||||
content += nl + applyCommand + nl;
|
||||
}
|
||||
|
||||
if (config.getDisplayName() != null) {
|
||||
|
|
|
@ -62,16 +62,12 @@ public interface ShellDialect {
|
|||
|
||||
String addToPathVariableCommand(List<String> entries, boolean append);
|
||||
|
||||
default String applyRcFileCommand() {
|
||||
default String applyInitFileCommand() {
|
||||
return null;
|
||||
}
|
||||
|
||||
String changeTitleCommand(String newTitle);
|
||||
|
||||
default String applyProfileFilesCommand() {
|
||||
return null;
|
||||
}
|
||||
|
||||
CommandControl createStreamFileWriteCommand(ShellControl shellControl, String file, long totalBytes);
|
||||
|
||||
default String getCdCommand(String directory) {
|
||||
|
|
Loading…
Reference in a new issue