Compare commits

..

No commits in common. "a915bfd9c52dfe016a508e1b4b37de2c27898da3" and "222f929fd4b76e8a5150c3f7b7f5f77165f2df3b" have entirely different histories.

5 changed files with 4 additions and 21 deletions

View file

@ -1,6 +1,6 @@
[package] [package]
name = "remux" name = "remux"
version = "0.3.2" version = "0.3.1"
edition = "2021" edition = "2021"
authors = [ "Valerie Wolfe <sleeplessval@gmail.com>" ] authors = [ "Valerie Wolfe <sleeplessval@gmail.com>" ]
description = "A friendly command shortener for tmux" description = "A friendly command shortener for tmux"

View file

@ -23,6 +23,7 @@ remux n foo
# list sessions # list sessions
tmux ls tmux ls
remux l remux l
remux
# attach # attach
tmux a -t foo tmux a -t foo

View file

@ -64,23 +64,6 @@ pub fn attach(pargs: &mut Arguments) {
tmux.output().ok(); tmux.output().ok();
} }
pub fn context_action() {
let repo = util::repo_root(std::env::current_dir().unwrap());
if !env::tmux() && repo.is_some() {
let target = util::repo_fallback();
let mut args = Arguments::from_vec( vec![(&target).into()] );
if util::session_exists(&target) {
attach(&mut args);
} else {
new(&mut args);
}
return;
} else {
// fallback behavior is list
list();
}
}
pub fn detach(pargs: &mut Arguments) { pub fn detach(pargs: &mut Arguments) {
util::terminal_enforce(); util::terminal_enforce();
// get target or fallback // get target or fallback

View file

@ -13,7 +13,7 @@ println!("remux v{VERSION}
Valerie Wolfe <sleeplessval@gmail.com> Valerie Wolfe <sleeplessval@gmail.com>
A command wrapper for tmux written in Rust. A command wrapper for tmux written in Rust.
usage: remux [command] [<args>] usage: remux <command> [<args>]
commands: commands:
help Show help text for remux, a command, or a help topic. help Show help text for remux, a command, or a help topic.

View file

@ -43,8 +43,6 @@ fn main() {
match subcommand.as_deref() { match subcommand.as_deref() {
Some("help") Some("help")
=> help(&mut args), => help(&mut args),
None
=> command::share::context_action(),
Some("a" | "attach") Some("a" | "attach")
=> command::share::attach(&mut args), => command::share::attach(&mut args),
@ -55,6 +53,7 @@ fn main() {
Some("h" | "has") Some("h" | "has")
=> command::share::has(&mut args), => command::share::has(&mut args),
None |
Some("l" | "ls" | "list") Some("l" | "ls" | "list")
=> command::share::list(), => command::share::list(),