Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typo #24

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/command_evaluation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ impl CommandExecutionHandler {

result = &mut handle => {
// resulting_output contains the command's output if everything went well,
// stderr if it exited non-zero, and if any other error occured information about that.
// stderr if it exited non-zero, and if any other error occurred information about that.
let resulting_output = match result {
Ok(Ok(result)) => {
if result.success() {
Expand Down
6 changes: 3 additions & 3 deletions src/commandlist.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use std::fs::File;
use std::io::prelude::*;
use std::path::PathBuf;

const SERIALIZATION_ENTRY_SEPERATOR: &str = "---";
const SERIALIZATION_ENTRY_SEPARATOR: &str = "---";

#[derive(Debug, PartialEq, Eq, Clone)]
pub struct CommandEntry(Vec<String>);
Expand Down Expand Up @@ -84,14 +84,14 @@ impl CommandList {
}

pub fn serialize(&self) -> String {
self.as_strings().join(&format!("\n{}\n", SERIALIZATION_ENTRY_SEPERATOR))
self.as_strings().join(&format!("\n{}\n", SERIALIZATION_ENTRY_SEPARATOR))
}

pub fn deserialize(path: Option<PathBuf>, max_size: Option<usize>, lines: &str) -> CommandList {
let mut entries = CommandList::new(path, max_size);
let mut current_entry = Vec::new();
for line in lines.lines().filter(|x| !x.is_empty()) {
if line == SERIALIZATION_ENTRY_SEPERATOR {
if line == SERIALIZATION_ENTRY_SEPARATOR {
entries.push(CommandEntry::new(current_entry));
current_entry = Vec::new();
} else {
Expand Down
2 changes: 1 addition & 1 deletion src/pipr_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ pub const DEFAULT_CONFIG: &str = "
# finish_hook: Executed once you close pipr, getting the command you constructed piped into stdin.
# finish_hook = \"xclip -selection clipboard -in\"

# Paranoid history mode writes every sucessfully running command into the history in autoeval mode.
# Paranoid history mode writes every successfully running command into the history in autoeval mode.
paranoid_history_mode_default = false

autoeval_mode_default = true
Expand Down