diff options
author | John Hood <cgull@glup.org> | 2015-06-07 04:44:21 -0400 |
---|---|---|
committer | John Hood <cgull@glup.org> | 2017-08-02 00:31:37 -0400 |
commit | 8aac3cc92724c2787d885ca6cfc0855c64e7afe7 (patch) | |
tree | 10f09ef7374839835fa2ca87118a0678d933810f /scripts | |
parent | 91de8901f5da04bc2abba3242164b0a330764d49 (diff) |
Allow non-inserting prediction.
This may be useful for users who find prediction's activity right of
the cursor distracting.
Prediction underscoring is still a little weird sometimes, it replays
a history of known/unknown changes as acks come in from the server.
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/mosh.pl | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/scripts/mosh.pl b/scripts/mosh.pl index e6c890e..044994d 100755 --- a/scripts/mosh.pl +++ b/scripts/mosh.pl @@ -65,6 +65,8 @@ my $server = 'mosh-server'; my $predict = undef; +my $overwrite = 0; + my $bind_ip = undef; my $use_remote_ip = 'proxy'; @@ -97,6 +99,8 @@ qq{Usage: $0 [options] [--] [user@]host [command...] -n --predict=never never use local echo --predict=experimental aggressively echo even when incorrect +-o --overwrite prediction overwrites instead of inserting + -4 --family=inet use IPv4 only -6 --family=inet6 use IPv6 only --family=auto autodetect network type for single-family hosts only @@ -150,6 +154,7 @@ sub predict_check { GetOptions( 'client=s' => \$client, 'server=s' => \$server, 'predict=s' => \$predict, + 'overwrite|o!' => \$overwrite, 'port=s' => \$port_request, 'a' => sub { $predict = 'always' }, 'n' => sub { $predict = 'never' }, @@ -200,6 +205,9 @@ if (!$have_ipv6) { # Force IPv4. $family = "inet"; } +if ( $overwrite ) { + $ENV{ "MOSH_PREDICTION_OVERWRITE" } = "yes"; +} if ( defined $port_request ) { if ( $port_request =~ m{^(\d+)(:(\d+))?$} ) { |