Fix opening things in file browser, fix [code] highlighting

This commit is contained in:
Sebastian Morr 2020-10-06 10:38:31 +02:00
parent f3ff5c5147
commit 8c4c4feeef
12 changed files with 29 additions and 100 deletions

View file

@ -1,14 +1,16 @@
#!/usr/bin/env perl
use IO::Socket;
use File::Spec;
$socket = IO::Socket::INET->new(PeerAddr => "127.0.0.1",
PeerPort => 1234,
Proto => "tcp",
Type => SOCK_STREAM);
# Send the length of the first argument as a byte.
$socket->send(chr(length($ARGV[0])));
# Send the first argument as a string.
$socket->send($ARGV[0]);
my $absolute_path = File::Spec->rel2abs($ARGV[0]);
# Send the length of string as a byte.
$socket->send(chr(length($absolute_path)));
# Send the first argument as a string.
$socket->send($absolute_path);