From 3319ffb00e3ff54db1446302a7debd7e7f7ff893 Mon Sep 17 00:00:00 2001
From: Michael Aaron Murphy <mmstickman@gmail.com>
Date: Thu, 17 Aug 2017 18:18:59 -0400
Subject: [PATCH] Update Prompt

---
 src/parser/shell_expand/words.rs  | 1 -
 src/shell/colors.rs               | 1 -
 src/shell/plugins/methods/unix.rs | 8 ++++----
 src/shell/plugins/string.rs       | 1 -
 src/shell/variables.rs            | 2 +-
 5 files changed, 5 insertions(+), 8 deletions(-)

diff --git a/src/parser/shell_expand/words.rs b/src/parser/shell_expand/words.rs
index 69634f35..ec69e85e 100644
--- a/src/parser/shell_expand/words.rs
+++ b/src/parser/shell_expand/words.rs
@@ -9,7 +9,6 @@ use super::{is_expression, slice};
 use super::ranges::parse_index_range;
 use super::super::ArgumentSplitter;
 use super::unicode_segmentation::UnicodeSegmentation;
-use shell::plugins::StringError;
 use shell::plugins::methods::{self, StringMethodPlugins, MethodArguments};
 
 use std::path::Path;
diff --git a/src/shell/colors.rs b/src/shell/colors.rs
index 60349789..0565cbf0 100644
--- a/src/shell/colors.rs
+++ b/src/shell/colors.rs
@@ -1,5 +1,4 @@
 use fnv::FnvHashMap;
-use std::u16;
 
 lazy_static! {
     static ref ATTRIBUTES: FnvHashMap<&'static str, &'static str> = {
diff --git a/src/shell/plugins/methods/unix.rs b/src/shell/plugins/methods/unix.rs
index 57a934fb..fc5aa155 100644
--- a/src/shell/plugins/methods/unix.rs
+++ b/src/shell/plugins/methods/unix.rs
@@ -36,7 +36,7 @@ impl From<MethodArguments> for RawMethodArguments {
                         CString::from_vec_unchecked(x.as_bytes().to_owned()).into_raw()
                     }).collect::<Vec<*mut i8>>();
                 args.shrink_to_fit();
-                let mut args_ptr = args.as_mut_ptr();
+                let args_ptr = args.as_mut_ptr();
                 forget(args);
 
                 RawMethodArguments {
@@ -54,7 +54,7 @@ impl From<MethodArguments> for RawMethodArguments {
                 let mut key_array = array.iter().map(|x| unsafe {
                         CString::from_vec_unchecked(x.as_bytes().to_owned()).into_raw()
                     }).collect::<Vec<*mut i8>>();
-                let mut key_array_ptr = key_array.as_mut_ptr();
+                let key_array_ptr = key_array.as_mut_ptr();
                 forget(key_array);
 
                 let args_len = args.len();
@@ -62,7 +62,7 @@ impl From<MethodArguments> for RawMethodArguments {
                         CString::from_vec_unchecked(x.as_bytes().to_owned()).into_raw()
                     }).collect::<Vec<*mut i8>>();
                 args.shrink_to_fit();
-                let mut args_ptr = args.as_mut_ptr();
+                let args_ptr = args.as_mut_ptr();
                 forget(args);
 
                 RawMethodArguments {
@@ -221,7 +221,7 @@ pub fn collect() -> StringMethodPlugins {
         path.push("strings");
         match read_dir(&path).map(LibraryIterator::new) {
             Ok(iterator) => {
-                for (identifier, library) in iterator {
+                for (_, library) in iterator {
                     if let Err(why) = methods.load(library) {
                         eprintln!("ion: string method error: {}", why);
                     }
diff --git a/src/shell/plugins/string.rs b/src/shell/plugins/string.rs
index 0b78e97f..20bbf1b0 100644
--- a/src/shell/plugins/string.rs
+++ b/src/shell/plugins/string.rs
@@ -1,4 +1,3 @@
-use std::ffi::CString;
 use std::fmt::{self, Display, Formatter};
 use std::io;
 use types::Identifier;
diff --git a/src/shell/variables.rs b/src/shell/variables.rs
index 4f1cf110..a471f289 100644
--- a/src/shell/variables.rs
+++ b/src/shell/variables.rs
@@ -37,7 +37,7 @@ impl Default for Variables {
         map.insert("DIRECTORY_STACK_SIZE".into(), "1000".into());
         map.insert("HISTORY_SIZE".into(), "1000".into());
         map.insert("HISTFILE_SIZE".into(), "1000".into());
-        map.insert("PROMPT".into(), "\x1B\']\'0;${USER}: ${PWD}\x07\x1B\'[\'0m\x1B\'[\'1;38;5;85m${USER}\x1B\'[\'37m:\x1B\'[\'38;5;75m${PWD}\x1B\'[\'37m#\x1B\'[\'0m ".into());
+        map.insert("PROMPT".into(), "${c::0x55,bold}${USER}${c::default}:${c::0x4B}${PWD}${c::default}# ${c::reset}".into());
         // Set the PID variable to the PID of the shell
         let pid = getpid().map(|p| p.to_string()).unwrap_or_else(
             |e| e.to_string(),
-- 
GitLab