Compare commits
No commits in common. "be593c82e75a80f8ba65308fd8b1766e1a4708c2" and "63335916d92bd90fa024accaff40efe7c9a12dbc" have entirely different histories.
be593c82e7
...
63335916d9
2 changed files with 7 additions and 15 deletions
12
README.md
12
README.md
|
@ -7,10 +7,6 @@ A tmux wrapper and command shortener written in Rust. ReMux's
|
|||
goal is to wrap tmux commands to be both shorter, and oriented
|
||||
around session names instead of session IDs.
|
||||
|
||||
To further simplify developer usage, the `attach`, `detach`, `has`, and `new`
|
||||
commands can be used without a target field, and will default to the name of
|
||||
the Git repository root directory, if one is found.
|
||||
|
||||
In their shortest forms, *every* ReMux command is as short or
|
||||
shorter than its equivalent tmux command:
|
||||
|
||||
|
@ -45,6 +41,10 @@ remux n -n foo
|
|||
|
||||
```
|
||||
|
||||
If you're working in a git repository, the `attach`, `detach`, `has`, and `new`
|
||||
commands can be used without a session title, and the repository directory name
|
||||
will be used instead.
|
||||
|
||||
## Dependencies
|
||||
|
||||
ReMux depends on [tmux](https://github.com/tmux/tmux).
|
||||
|
@ -85,10 +85,6 @@ using an AUR package manager such as <a href="https://github.com/Morganamilo/par
|
|||
Install the package using Cargo with the command <code>cargo install tmux-remux</code>.
|
||||
</details>
|
||||
|
||||
## Configuration
|
||||
|
||||
The pretty-print attached symbol (default: `*`) can be set manually by setting `REMUX_ATTACH_SYMBOL`.
|
||||
|
||||
## Libraries
|
||||
|
||||
- [pico-args](https://crates.io/crates/pico_args) — argument parsing
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
//! globally available tmux commands.
|
||||
use std::{
|
||||
env::var,
|
||||
ffi::OsString,
|
||||
process::exit
|
||||
};
|
||||
|
@ -118,9 +117,6 @@ pub fn list() {
|
|||
return;
|
||||
}
|
||||
|
||||
// get attached session symbol
|
||||
let attach_symbol = var("REMUX_ATTACH_SYMBOL").unwrap_or("*".to_string());
|
||||
|
||||
// pretty print session list
|
||||
println!("sessions:");
|
||||
for session in sessions.into_iter() {
|
||||
|
@ -129,9 +125,9 @@ pub fn list() {
|
|||
let attached = session.attached.unwrap_or(0) > 0;
|
||||
|
||||
println!(
|
||||
" {group} ({bold}{blue}{id}{reset}) {bold}{green}{attach}{reset}",
|
||||
// values
|
||||
attach = if attached { attach_symbol.clone() } else { "".to_string() },
|
||||
" {group} ({bold}{blue}{id}{reset}) {bold}{green}{attach_sym}{reset}",
|
||||
// value
|
||||
attach_sym = if attached { "\u{F0339}" } else { "" },
|
||||
// formatting
|
||||
bold = style::Bold,
|
||||
blue = color::Fg(color::Blue),
|
||||
|
|
Loading…
Reference in a new issue