nushell: add login.nu configuration option
Nushell has the option to source from the login.nu file in the case that nushell is used as a login shell. This commit adds the login file alongside the existing config and env files as another configuration option.
This commit is contained in:
parent
24805d3ca7
commit
e15010ee6e
3 changed files with 46 additions and 0 deletions
|
|
@ -16,6 +16,13 @@
|
|||
let-env FOO = 'BAR'
|
||||
'';
|
||||
|
||||
loginFile.text = ''
|
||||
# Prints "Hello, World" upon logging into tty1
|
||||
if (tty) == "/dev/tty1" {
|
||||
echo "Hello, World"
|
||||
}
|
||||
'';
|
||||
|
||||
shellAliases = {
|
||||
"lsname" = "(ls | get name)";
|
||||
"ll" = "ls -a";
|
||||
|
|
@ -38,5 +45,8 @@
|
|||
assertFileContent \
|
||||
"${configDir}/env.nu" \
|
||||
${./env-expected.nu}
|
||||
assertFileContent \
|
||||
"${configDir}/login.nu" \
|
||||
${./login-expected.nu}
|
||||
'';
|
||||
}
|
||||
|
|
|
|||
5
tests/modules/programs/nushell/login-expected.nu
Normal file
5
tests/modules/programs/nushell/login-expected.nu
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
# Prints "Hello, World" upon logging into tty1
|
||||
if (tty) == "/dev/tty1" {
|
||||
echo "Hello, World"
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue