summaryrefslogtreecommitdiff
path: root/src/lib.rs
diff options
context:
space:
mode:
authorPhilipp Gesang <phg@phi-gamma.net>2021-12-12 12:12:23 +0100
committerPhilipp Gesang <phg@phi-gamma.net>2021-12-12 12:21:02 +0100
commitb32495bd359fa25b9cd4d52e72da1e24630a0663 (patch)
treebf705e538b461d012107cf4dba53a002ecc124e5 /src/lib.rs
parent33d3f2b30d77f242ed0a6a228a9f183778504640 (diff)
downloadvtcol-b32495bd359fa25b9cd4d52e72da1e24630a0663.tar.gz
bin: allow specifying the console on the command line
As in: $ vtcol --console /dev/tty6 colors get solarized $ vtcol --console /dev/tty6 colors set phosphor $ vtcol --console /dev/tty6 colors get phosphor That simplifies testing so much I wonder why the heck I needed this long to finally implement it.
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 64cf6f3..4ff9bba 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -921,7 +921,7 @@ impl Console
Ok(fd)
}
- fn from_path<P: AsRef<Path>>(path: P) -> io::Result<Self>
+ pub fn from_path<P: AsRef<Path>>(path: P) -> io::Result<Self>
{
let p =
std::ffi::CString::new(path.as_ref().to_str().unwrap()).unwrap();