Fix spacing
This commit is contained in:
parent
1987f7e948
commit
75d0a41854
|
|
@ -352,9 +352,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
|
|||
|
||||
[[package]]
|
||||
name = "libc"
|
||||
version = "0.2.122"
|
||||
version = "0.2.123"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ec647867e2bf0772e28c8bcde4f0d19a9216916e890543b5a03ed8ef27b8f259"
|
||||
checksum = "cb691a747a7ab48abc15c5b42066eaafde10dc427e3b6ee2a1cf43db04c763bd"
|
||||
|
||||
[[package]]
|
||||
name = "log"
|
||||
|
|
@ -520,9 +520,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "quote"
|
||||
version = "1.0.17"
|
||||
version = "1.0.18"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "632d02bff7f874a36f33ea8bb416cd484b90cc66c1194b1a1110d067a7013f58"
|
||||
checksum = "a1feb54ed693b93a84e14094943b84b7c4eae204c512b7ccb95ab0c66d278ad1"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
]
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
let
|
||||
rust = import (builtins.fetchTarball
|
||||
"https://github.com/oxalica/rust-overlay/archive/46d8d20fce510c6a25fa66f36e31f207f6ea49e4.tar.gz");
|
||||
"https://github.com/oxalica/rust-overlay/archive/80868ba348db2b5e733483454cbb5770f2951077.tar.gz");
|
||||
pkgs = import (builtins.fetchTarball
|
||||
"https://github.com/NixOS/nixpkgs/archive/d19a9162c848517cfc9437f10945b736d718b948.tar.gz") {
|
||||
"https://github.com/NixOS/nixpkgs/archive/d8cec85ca62e9f6c1576a8d87ebd17350710b449.tar.gz") {
|
||||
overlays = [ rust ];
|
||||
};
|
||||
in pkgs.mkShell {
|
||||
|
|
|
|||
|
|
@ -35,6 +35,8 @@ make_template!(Zsh, "zsh.txt");
|
|||
#[cfg(feature = "nix-dev")]
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use std::{ffi::OsString, os::unix::prelude::OpenOptionsExt};
|
||||
|
||||
use askama::Template;
|
||||
use assert_cmd::Command;
|
||||
use rstest::rstest;
|
||||
|
|
@ -149,7 +151,7 @@ mod tests {
|
|||
let source = Nushell(&opts).render().unwrap();
|
||||
|
||||
let tempdir = tempfile::tempdir().unwrap();
|
||||
let tempdir = tempdir.path().to_str().unwrap();
|
||||
let tempdir = tempdir.path();
|
||||
|
||||
let assert =
|
||||
Command::new("nu").env("HOME", tempdir).args(&["--commands", &source]).assert().success().stderr("");
|
||||
|
|
|
|||
|
|
@ -58,8 +58,7 @@ fi
|
|||
{% endif -%}
|
||||
|
||||
{{ section }}
|
||||
# When using zoxide with --no-cmd, alias these internal functions as
|
||||
# desired.
|
||||
# When using zoxide with --no-cmd, alias these internal functions as desired.
|
||||
#
|
||||
|
||||
__zoxide_z_prefix='z#'
|
||||
|
|
|
|||
|
|
@ -41,8 +41,7 @@ if (builtin:not (builtin:eq $E:__zoxide_shlvl $E:SHLVL)) {
|
|||
{%- endif %}
|
||||
|
||||
{{ section }}
|
||||
# When using zoxide with --no-cmd, alias these internal functions as
|
||||
# desired.
|
||||
# When using zoxide with --no-cmd, alias these internal functions as desired.
|
||||
#
|
||||
|
||||
# Jump to a directory using only keywords.
|
||||
|
|
|
|||
|
|
@ -53,8 +53,7 @@ end
|
|||
{%- endif %}
|
||||
|
||||
{{ section }}
|
||||
# When using zoxide with --no-cmd, alias these internal functions as
|
||||
# desired.
|
||||
# When using zoxide with --no-cmd, alias these internal functions as desired.
|
||||
#
|
||||
|
||||
# Jump to a directory using only keywords.
|
||||
|
|
|
|||
|
|
@ -37,8 +37,7 @@ echo "zoxide: PWD hooks are not supported on Nushell.\nUse `zoxide init nushell
|
|||
{%- endmatch %}
|
||||
|
||||
{{ section }}
|
||||
# When using zoxide with --no-cmd, alias these internal functions as
|
||||
# desired.
|
||||
# When using zoxide with --no-cmd, alias these internal functions as desired.
|
||||
#
|
||||
|
||||
# Jump to a directory using only keywords.
|
||||
|
|
|
|||
|
|
@ -47,8 +47,7 @@ fi
|
|||
{%- endmatch %}
|
||||
|
||||
{{ section }}
|
||||
# When using zoxide with --no-cmd, alias these internal functions as
|
||||
# desired.
|
||||
# When using zoxide with --no-cmd, alias these internal functions as desired.
|
||||
#
|
||||
|
||||
# Jump to a directory using only keywords.
|
||||
|
|
|
|||
|
|
@ -67,8 +67,7 @@ if ($__zoxide_hooked -ne 1) {
|
|||
}
|
||||
|
||||
{{ section }}
|
||||
# When using zoxide with --no-cmd, alias these internal functions as
|
||||
# desired.
|
||||
# When using zoxide with --no-cmd, alias these internal functions as desired.
|
||||
#
|
||||
|
||||
# Jump to a directory using only keywords.
|
||||
|
|
|
|||
|
|
@ -108,8 +108,7 @@ if "__zoxide_hook" not in globals():
|
|||
{% endif %}
|
||||
|
||||
{{ section }}
|
||||
# When using zoxide with --no-cmd, alias these internal functions as
|
||||
# desired.
|
||||
# When using zoxide with --no-cmd, alias these internal functions as desired.
|
||||
#
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -46,8 +46,7 @@ fi
|
|||
{%- endif %}
|
||||
|
||||
{{ section }}
|
||||
# When using zoxide with --no-cmd, alias these internal functions as
|
||||
# desired.
|
||||
# When using zoxide with --no-cmd, alias these internal functions as desired.
|
||||
#
|
||||
|
||||
__zoxide_z_prefix='z#'
|
||||
|
|
|
|||
|
|
@ -136,6 +136,7 @@ fn enable_nix() -> bool {
|
|||
}
|
||||
let nix_enabled = env::var_os("IN_NIX_SHELL").unwrap_or_default() == "pure";
|
||||
if nix_enabled {
|
||||
env::set_var("CARGO_TARGET_DIR", "target_nix");
|
||||
return true;
|
||||
}
|
||||
let nix_detected = Command::new("nix-shell").arg("--version").status().map(|s| s.success()).unwrap_or(false);
|
||||
|
|
@ -147,10 +148,6 @@ fn enable_nix() -> bool {
|
|||
let args = env::args();
|
||||
let cmd = shell_words::join(args);
|
||||
|
||||
let status = Command::new("nix-shell")
|
||||
.args(&["--pure", "--run", &cmd, "--", "shell.nix"])
|
||||
.env("CARGO_TARGET_DIR", "target_nix")
|
||||
.status()
|
||||
.unwrap();
|
||||
let status = Command::new("nix-shell").args(&["--pure", "--run", &cmd, "--", "shell.nix"]).status().unwrap();
|
||||
process::exit(status.code().unwrap_or(1));
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue