mirror of
https://github.com/nushell/nushell.git
synced 2025-08-11 04:54:01 +02:00
Remove unused help shell. Slight cleanup and improvement. (#3258)
This commit is contained in:
committed by
GitHub
parent
28e1a7915d
commit
1c941557c3
@ -58,6 +58,10 @@ impl Clone for FilesystemShell {
|
||||
}
|
||||
|
||||
impl FilesystemShell {
|
||||
fn is_cli(&self) -> bool {
|
||||
matches!(&self.mode, FilesystemShellMode::Cli)
|
||||
}
|
||||
|
||||
pub fn basic(mode: FilesystemShellMode) -> Result<FilesystemShell, Error> {
|
||||
let path = match std::env::current_dir() {
|
||||
Ok(path) => path,
|
||||
@ -295,7 +299,7 @@ impl Shell for FilesystemShell {
|
||||
|
||||
//Loading local configs in script mode, makes scripts behave different on different
|
||||
//filesystems and might therefore surprise users. That's why we only load them in cli mode.
|
||||
if self.mode == FilesystemShellMode::Cli {
|
||||
if self.is_cli() {
|
||||
match dunce::canonicalize(self.path()) {
|
||||
Err(e) => {
|
||||
trace!(
|
||||
|
Reference in New Issue
Block a user