Add mosh-client default strategy

This commit is contained in:
*Kim Zick (rummik)
2018-12-28 19:57:28 -05:00
parent b020b2481e
commit e99f1977b6
3 changed files with 34 additions and 0 deletions

View 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