nu 0.1.2

A shell for the GitHub era
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use std::path::{Path, PathBuf};

#[derive(Debug, Clone)]
pub struct Environment {
    crate path: PathBuf,
}

impl Environment {
    pub fn basic() -> Result<Environment, std::io::Error> {
        let path = std::env::current_dir()?;

        Ok(Environment { path })
    }

    pub fn path(&self) -> &Path {
        self.path.as_path()
    }
}