mirror of
https://github.com/AikidoSec/safe-chain.git
synced 2026-05-26 12:10:49 +00:00
Some more cleanup
This commit is contained in:
parent
d064d46668
commit
031c9683b1
23 changed files with 55 additions and 864 deletions
|
|
@ -33,19 +33,13 @@ function teardown(tools) {
|
|||
);
|
||||
}
|
||||
|
||||
// Removes the line that sources the safe-chain fish initialization script (any path, requires safe-chain comment)
|
||||
// Removes the line that sources the safe-chain fish initialization script.
|
||||
removeLinesMatchingPattern(
|
||||
startupFile,
|
||||
/^source\s+.*init-fish\.fish.*#\s*Safe-chain/,
|
||||
eol
|
||||
);
|
||||
|
||||
removeLinesMatchingPattern(
|
||||
startupFile,
|
||||
/^set\s+-gx\s+SAFE_CHAIN_DIR\s+.*#\s*Safe-chain/,
|
||||
eol
|
||||
);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -74,21 +68,20 @@ function getStartupFile() {
|
|||
}
|
||||
}
|
||||
|
||||
/** @param {string} preamble */
|
||||
function buildManualInstructions(preamble) {
|
||||
const instructions = [preamble, ` source ${path.join(getScriptsDir(), "init-fish.fish")}`];
|
||||
instructions.push(
|
||||
`Then restart your terminal or run: source ~/.config/fish/config.fish`,
|
||||
);
|
||||
return instructions;
|
||||
}
|
||||
|
||||
function getManualTeardownInstructions() {
|
||||
return buildManualInstructions(`Remove the following line from your ~/.config/fish/config.fish file:`);
|
||||
return [
|
||||
`Remove the following line from your ~/.config/fish/config.fish file:`,
|
||||
` source ${path.join(getScriptsDir(), "init-fish.fish")}`,
|
||||
`Then restart your terminal or run: source ~/.config/fish/config.fish`,
|
||||
];
|
||||
}
|
||||
|
||||
function getManualSetupInstructions() {
|
||||
return buildManualInstructions(`Add the following line to your ~/.config/fish/config.fish file:`);
|
||||
return [
|
||||
`Add the following line to your ~/.config/fish/config.fish file:`,
|
||||
` source ${path.join(getScriptsDir(), "init-fish.fish")}`,
|
||||
`Then restart your terminal or run: source ~/.config/fish/config.fish`,
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue