Skip to content
This repository has been archived by the owner on Dec 22, 2024. It is now read-only.

Commit

Permalink
Fix typos (#117)
Browse files Browse the repository at this point in the history
  • Loading branch information
jwilk authored Mar 4, 2024
1 parent a545141 commit effdf8a
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 20 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

This is the second version of my tmux helper _tm_, used to ease my
day-to-day work with [tmux](https://github.com/tmux/tmux/wiki).
It is a rewrite in Rust, as I want to learn more Rust. Accidently that
It is a rewrite in Rust, as I want to learn more Rust. Accidentally that
made it much faster too, which is nice.

The rewrite is intended to be, as much as possible, a drop-in
Expand All @@ -28,11 +28,11 @@ available at [tmbook](https://ganneff.github.io/tmbook/).
# Status
- [X] Commandline parsing
- [X] Attach to existing sessions
- [X] Attach to existing, but "grouped" (seperate window config)
- [X] Attach to existing, but "grouped" (separate window config)
- [X] ls - list sessions
- [X] s - create new session, open SSH directly to one ore more hosts,
- [X] s - create new session, open SSH directly to one or more hosts,
many windows
- [X] ms - create new session, open SSH directly to one ore more
- [X] ms - create new session, open SSH directly to one or more
hosts, one window with many panes, synchronized input.
- [X] k - kill session
- [X] -n - Open sessions to same hosts as existing session instead of
Expand Down Expand Up @@ -71,7 +71,7 @@ the shell variant from earlier, this is not entirely possible. Shell
there, for whatever reason, just don't work when using a compiled
binary now, as they depend on shell internal behaviour.

The folowing is a (possibly) incomplete list of known behaviour
The following is a (possibly) incomplete list of known behaviour
changes.

## LIST commands using ssh possibly requiring pseudo-terminal
Expand Down
2 changes: 1 addition & 1 deletion old/README.org
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ The environment variable TMSSHCMD can be used to alter the default ssh
command and its options used by tm globally. By default it is a plain
"ssh". Inside an extensionless TMDIR file and on hosts added to the
list using the LIST option described above, ssh options can be set by
simply appending them, space seperated, after the hostname. So the
simply appending them, space separated, after the hostname. So the
hostlist
#+BEGIN_QUOTE
user@ws01
Expand Down
14 changes: 7 additions & 7 deletions old/tm
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ set -E
# The following variables can be overwritten outside the script.
#

# We want a useful tmpdir, so set one if it isn't already. Thats the
# We want a useful tmpdir, so set one if it isn't already. That's the
# place where tmux puts its socket, so you want to ensure it doesn't
# change under your feet - like for those with a daily-changing tmpdir
# in their home...
Expand Down Expand Up @@ -153,7 +153,7 @@ function usage() {
echo "-m hostlist Open multi ssh sessions to hosts, synchronizing input"
echo " Due to the way getopts works, hostlist must be enclosed in \"\""
echo "-n Open a second session to the same set of hosts"
echo "-g Group session - attach to an existing session, but keep seperate"
echo "-g Group session - attach to an existing session, but keep separate"
echo " window control"
echo "-k name Kill a session. Note that this needs the exact session name"
echo " as shown by tm ls"
Expand Down Expand Up @@ -301,7 +301,7 @@ function own_config() {
TMSESCFG="free"
fi
# Set IFS to be NEWLINE only, not also space/tab, as our input files
# are \n seperated (one entry per line) and lines may well have spaces.
# are \n separated (one entry per line) and lines may well have spaces.
local IFS="
"
# Fill an array with our config
Expand All @@ -319,7 +319,7 @@ function own_config() {
TMOPTS=${TMDATA[1]}
fi

# Seperate the lines we work with
# Separate the lines we work with
local IFS=""
local -a workdata=(${TMDATA[@]:2})
IFS=${OLDIFS}
Expand All @@ -344,7 +344,7 @@ function own_config() {

$( ${cmd} >| "${TMPDATA}" )
# Set IFS to be NEWLINE only, not also space/tab, the list may have ssh options
# and what not, so \n is our seperator, not more.
# and what not, so \n is our separator, not more.
IFS="
"
out=( $(tr -d '\r' < "${TMPDATA}" ) )
Expand Down Expand Up @@ -481,7 +481,7 @@ case ${cmdline} in
SESSION=${SESSION:-""}
if [[ -n "${SESSION}" ]]; then
# Environment has SESSION set, wherever from. So lets
# see if its an actual tmux session
# see if it's an actual tmux session
if ! tmux has-session -t "${SESSION}" 2>/dev/null; then
# It is not. And no argument. Show usage
usage
Expand Down Expand Up @@ -573,7 +573,7 @@ if [[ ${cmdline} != k ]] && [[ ${havesession} == false ]]; then
# No more space -> have tmux redo the
# layout, so all windows are evenly sized.
do_cmd select-layout -t ${SESSION}:${TMWIN} main-horizontal >/dev/null
# And dont shift parameter away
# And don't shift parameter away
continue
fi
shift
Expand Down
14 changes: 7 additions & 7 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ struct Cli {
/// ssh://\[user@]hostname\[:port].
///
/// When multiple destinations are specified, they are all opened
/// into seperate tmux windows (not sessions!).
/// into separate tmux windows (not sessions!).
#[clap(short = 's', display_order = 15, num_args = 1..)]
sshhosts: Option<Vec<String>>,

Expand All @@ -98,7 +98,7 @@ struct Cli {
second: bool,

/// Group session - attach to an existing session, but keep
/// seperate window config
/// separate window config
///
/// This will show the same set of windows, but allow different
/// handling of the session according to client. This way one
Expand All @@ -122,7 +122,7 @@ struct Cli {
/// Either plain tmux session name, or session/file found in TMDIR
///
/// If this exists as a tmux session, it behaves like `tmux
/// attach`. Otherwise it checks TMDIR for existance of a config
/// attach`. Otherwise it checks TMDIR for existence of a config
/// file and will open a session as specified in there.
#[clap(display_order = 50)]
session: Option<String>,
Expand Down Expand Up @@ -152,7 +152,7 @@ enum Commands {
/// Open SSH session to the destination
///
/// When multiple destinations are specified, they are all opened
/// into seperate tmux windows (not sessions!).
/// into separate tmux windows (not sessions!).
#[clap(display_order = 15)]
S {
/// Target destinations for `ssh(1)`, which may be specified as
Expand Down Expand Up @@ -405,7 +405,7 @@ struct Session {
/// Should this be "grouped" - shares the same set of windows, new
/// windows are linked to all sessions in the group, any window
/// closed is removed from all sessions. But sessions are
/// seperate, as are their current/previous window and session
/// separate, as are their current/previous window and session
/// options.
grouped: bool,
/// The session name when grouped
Expand Down Expand Up @@ -1085,7 +1085,7 @@ impl Session {
// A bunch of "static" variables, though computed at program start, as they
// depend on the users environment.
lazy_static! {
/// We want a useful tmpdir, so set one if it isn't already. Thats
/// We want a useful tmpdir, so set one if it isn't already. That's
/// the place where tmux puts its socket, so you want to ensure it
/// doesn't change under your feet - like for those with a
/// daily-changing tmpdir in their home...
Expand Down Expand Up @@ -1211,7 +1211,7 @@ fn parse_line(line: &str, replace: &Option<String>, current_dir: &Path) -> Resul
debug!("args are {:?}", args);

// Our process spawner, pleased to hand us results as a nice
// string seperated by newline (well, if output contains newlines)
// string separated by newline (well, if output contains newlines)
let cmdout = String::from_utf8(
Command::new(&cmd)
.current_dir(current_dir)
Expand Down

0 comments on commit effdf8a

Please sign in to comment.