Struct pier::Pier[][src]

pub struct Pier {
    pub path: PathBuf,
    // some fields omitted
}

Main library interface

Fields

path: PathBuf

Implementations

impl Pier[src]

pub fn write(&self) -> Result<()>[src]

Wrapper to write the configuration to path.

pub fn config_init(&mut self, new_path: Option<PathBuf>) -> Result<()>[src]

pub fn new() -> Self[src]

pub fn from_file(path: PathBuf, verbose: bool) -> Result<Self>[src]

Create new pier directly from path.

pub fn from(input_path: Option<PathBuf>, verbose: bool) -> Result<Self>[src]

Create new pier from what might be a path, otherwise use the first existing default path.

pub fn fetch_script(&self, alias: &str) -> Result<&Script>[src]

Fetches a script that matches the alias

pub fn edit_script(&mut self, alias: &str) -> Result<&Script>[src]

Edits a script that matches the alias

pub fn remove_script(&mut self, alias: &str) -> Result<()>[src]

Removes a script that matches the alias

pub fn add_script(&mut self, script: Script, force: bool) -> Result<()>[src]

Adds a script that matches the alias

pub fn list_aliases(&self, tags: Option<Vec<String>>) -> Result<()>[src]

Prints only the aliases in current config file that matches tags.

pub fn copy_script(&mut self, from_alias: &str, new_alias: &str) -> Result<()>[src]

Copy an alias a script that matches the alias

pub fn move_script(
    &mut self,
    from_alias: &str,
    new_alias: &str,
    force: bool
) -> Result<()>
[src]

Move a script that matches the alias to another alias

pub fn list_scripts(
    &self,
    tags: Option<Vec<String>>,
    cmd_full: bool,
    cmd_width: Option<usize>
) -> Result<()>
[src]

Prints a terminal table of the scripts in current config file that matches tags.

pub fn run_script(&self, alias: &str, args: Vec<String>) -> Result<ExitStatus>[src]

Runs a script and print stdout and stderr of the command.

Trait Implementations

impl Debug for Pier[src]

impl Default for Pier[src]

Auto Trait Implementations

impl RefUnwindSafe for Pier

impl Send for Pier

impl Sync for Pier

impl Unpin for Pier

impl UnwindSafe for Pier

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,