Compare commits
No commits in common. "a915bfd9c52dfe016a508e1b4b37de2c27898da3" and "222f929fd4b76e8a5150c3f7b7f5f77165f2df3b" have entirely different histories.
a915bfd9c5
...
222f929fd4
5 changed files with 4 additions and 21 deletions
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "remux"
|
||||
version = "0.3.2"
|
||||
version = "0.3.1"
|
||||
edition = "2021"
|
||||
authors = [ "Valerie Wolfe <sleeplessval@gmail.com>" ]
|
||||
description = "A friendly command shortener for tmux"
|
||||
|
|
|
@ -23,6 +23,7 @@ remux n foo
|
|||
# list sessions
|
||||
tmux ls
|
||||
remux l
|
||||
remux
|
||||
|
||||
# attach
|
||||
tmux a -t foo
|
||||
|
|
|
@ -64,23 +64,6 @@ pub fn attach(pargs: &mut Arguments) {
|
|||
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) {
|
||||
util::terminal_enforce();
|
||||
// get target or fallback
|
||||
|
|
|
@ -13,7 +13,7 @@ println!("remux v{VERSION}
|
|||
Valerie Wolfe <sleeplessval@gmail.com>
|
||||
A command wrapper for tmux written in Rust.
|
||||
|
||||
usage: remux [command] [<args>]
|
||||
usage: remux <command> [<args>]
|
||||
|
||||
commands:
|
||||
help Show help text for remux, a command, or a help topic.
|
||||
|
|
|
@ -43,8 +43,6 @@ fn main() {
|
|||
match subcommand.as_deref() {
|
||||
Some("help")
|
||||
=> help(&mut args),
|
||||
None
|
||||
=> command::share::context_action(),
|
||||
|
||||
Some("a" | "attach")
|
||||
=> command::share::attach(&mut args),
|
||||
|
@ -55,6 +53,7 @@ fn main() {
|
|||
Some("h" | "has")
|
||||
=> command::share::has(&mut args),
|
||||
|
||||
None |
|
||||
Some("l" | "ls" | "list")
|
||||
=> command::share::list(),
|
||||
|
||||
|
|
Loading…
Reference in a new issue