Skip to content

Commit

Permalink
Merge pull request #127 from greymd/feature/refactoring
Browse files Browse the repository at this point in the history
Feature/refactoring
  • Loading branch information
greymd authored May 6, 2019
2 parents 0f2bc37 + d7af840 commit 00d58be
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 34 deletions.
2 changes: 1 addition & 1 deletion bin/xpanes
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ readonly XP_ABS_THIS_FILE_NAME="${XP_THIS_DIR}/${XP_THIS_FILE_NAME}"

# Prevent cache directory being created under root / directory in any case.
# This is quite rare case (but it can be happened).
readonly XP_USER_HOME="${HOME:-/etc}"
readonly XP_USER_HOME="${HOME:-/tmp}"

# Basically xpanes follows XDG Base Direcotry Specification.
# https://specifications.freedesktop.org/basedir-spec/basedir-spec-0.6.html
Expand Down
2 changes: 1 addition & 1 deletion man/create.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
# Use md2man (https://github.com/sunaku/md2man) to generate man file like this.
# Replace 'BOX DRAWINGS LIGHT VERTICAL' (U+2502) to Pipe 'VERTICAL LINE' (U+007C)
# Because of md2man's bug, Pipe may be replaced to another character.
md2man-roff man.md | tr $'\xe2\x94\x82' $'\x7c' > xpanes.1
md2man-roff man.md | sed "s/"$'\xe2\x94\x82'"/"$'\x7c'"/g" > xpanes.1
38 changes: 22 additions & 16 deletions man/man.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,12 @@ SHELL VARIABLES
See *FORMATS* section in tmux(1) for further details.
Default value is `bottom`.

`TMUX_XPANES_PANE_DEAD_MESSAGE`
It defines the message that displayed when a process exits with `-s` option enabled.

Default value is
`\033[41m\033[4m\033[30m Pane is dead: Press [Enter] to exit... \033[0m\033[39m\033[49m`.

MODES
------

Expand Down Expand Up @@ -307,22 +313,22 @@ EXAMPLES

`xpanes` --ssh myuser1@host1 myuser2@host2

+-----------------------------------------------+------------------------------------------------+
│$ ssh -o StrictHostKeyChecking=no myuser@host1 │ $ ssh -o StrictHostKeyChecking=no myuser@host2
+-----------------------------------------------+------------------------------------------------+
+-------------------------------+-------------------------------+
│$ ssh -o StrictHostKeyChecking$ ssh -o StrictHostKeyChecking │
=no myuser@host1 │=no myuser@host2
+-------------------------------+-------------------------------+

#### Create new panes on existing window

Expand Down
38 changes: 22 additions & 16 deletions man/xpanes.1
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,12 @@ See \fIFORMATS\fP section in
.BR tmux (1)
for further details.
Default value is \fB\fCbottom\fR\&.
.TP
\fB\fCTMUX_XPANES_PANE_DEAD_MESSAGE\fR
It defines the message that displayed when a process exits with \fB\fC\-s\fR option enabled.
.IP
Default value is
\fB\fC\\033[41m\\033[4m\\033[30m Pane is dead: Press [Enter] to exit... \\033[0m\\033[39m\\033[49m\fR\&.
.SH MODES
.SS [Normal mode1] Outside of tmux session.
.PP
Expand Down Expand Up @@ -332,22 +338,22 @@ Each line provided by standard input is corresponding to the each pane's command
.PP
.RS
.nf
+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+
|$ ssh \-o StrictHostKeyChecking=no myuser@host1 | $ ssh \-o StrictHostKeyChecking=no myuser@host2 |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+
+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+
|$ ssh \-o StrictHostKeyChecking |$ ssh \-o StrictHostKeyChecking |
|=no myuser@host1 |=no myuser@host2 |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+
.fi
.RE
.SS Create new panes on existing window
Expand Down

0 comments on commit 00d58be

Please sign in to comment.