mirror of
https://github.com/tmux-plugins/tmux-resurrect.git
synced 2025-09-02 21:06:58 +00:00
Add mosh-client default strategy
This commit is contained in:
25
strategies/mosh-client_default_strategy.sh
Executable file
25
strategies/mosh-client_default_strategy.sh
Executable file
@ -0,0 +1,25 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# "mosh-client default strategy"
|
||||
#
|
||||
# Example mosh-client process:
|
||||
# mosh-client -# charm tmux at | 198.199.104.142 60001
|
||||
#
|
||||
# When executed, the above will fail. This strategy handles that.
|
||||
|
||||
ORIGINAL_COMMAND="$1"
|
||||
DIRECTORY="$2"
|
||||
|
||||
mosh_command() {
|
||||
local args="$ORIGINAL_COMMAND"
|
||||
|
||||
args="${args#*-#}"
|
||||
args="${args%|*}"
|
||||
|
||||
echo "mosh $args"
|
||||
}
|
||||
|
||||
main() {
|
||||
echo "$(mosh_command)"
|
||||
}
|
||||
main
|
Reference in New Issue
Block a user