01:07
melezhik joined
01:11
melezhik left
16:15
melezhik joined
16:37
melezhik left
16:38
melezhik joined
16:45
melezhik is now known as MyButterfliable
16:49
MyButterfliable is now known as melezhik,
melezhik left
16:50
melezhik joined
16:56
melezhik left
16:57
MyButterfliable joined
16:58
MyButterfliable left,
melezhik joined
17:27
melezhik left
17:34
melezhik joined
17:41
melezhik left
18:30
gabriel80546 joined
|
|||
gabriel80546 | my script is not working | 18:31 | |
script -> | |||
#!/usr/bin/env perl6 | |||
my $key = run 'xmodmap', '-e', '"keycode 66 = Shift_L Shift_R"', :out; | |||
say "saida: -> ", $key.out.get; | |||
output -> | |||
xmodmap: unknown command on line commandline:1 | 18:32 | ||
xmodmap: 1 error encountered, aborting. | |||
saida: -> Nil | |||
im sorry for posting that | 18:33 | ||
but i think the documentation didn't help me | 18:34 | ||
xmodmap is a command that exists | 18:36 | ||
gabriel@adriano:~$ which xmodmap | |||
'''/usr/bin/xmodmap | |||
my bad also the out of xmodmap is empty anyways | 18:38 | ||
i will try shell or spawn | 18:45 | ||
[Coke] | ... you're running xmodmap, or the error wouldn't be coming. | 18:46 | |
so what's the issue? | 18:47 | ||
m: run 'notacommand'; | |||
camelia | The spawned command 'notacommand' exited unsuccessfully (exit code: 1, signal: 0) in block <unit> at <tmp> line 1 |
||
gabriel80546 | shell works | 18:48 | |
script -> | 18:49 | ||
#!/usr/bin/env perl6 | |||
my $key = shell ("xmodmap -e 'keycode 66 = Shift_L Shift_R'"); | |||
say "\$key", $key | |||
output -> | |||
$keyProc.new(in => IO::Pipe, out => IO::Pipe, err => IO::Pipe, exitcode => 0, signal => 0, pid => 4511, command => ("xmodmap -e 'keycode 66 = Shift_L Shift_R'",)) | |||
[Coke] | 18:50 | ||
i run what you said | |||
> run 'notacommand' | |||
Proc.new(in => IO::Pipe, out => IO::Pipe, err => IO::Pipe, exitcode => 1, signal => 0, pid => Nil, command => ("notacommand",)) | |||
> | 18:51 | ||
[Coke] | if you try to do anything with that result, you'll get the error shown above. even "sink run 'notacommand'" will trigger it | 18:52 | |
you can see the exitcode is 1, though. | |||
In the one that worked, you had single quotes around the arg to xmodmap. in the one that didn't, you had double quotes. | |||
You probably don't even need the quotes in the first one, because you're using run. the args are already split up in the arguments to run, you don't need to protect them. | 18:53 | ||
gabriel80546 | i am curious how it would work with run | 18:54 | |
now it works | 18:55 | ||
you are absolutly right | 18:56 | ||
script -> | |||
#!/usr/bin/env perl6 | |||
my $key = run "xmodmap", "-e", "keycode 66 = Shift_L Shift_R", :out; | |||
say "\$key ", $key.out.get; | |||
output -> | |||
$key Nil | |||
that is the output that i expected | |||
thank you very much | 18:57 | ||
19:21
melezhik joined
|
|||
[Coke] | sure! | 19:28 | |
19:28
melezhik left
20:43
MyButterfliable joined
20:51
MyButterfliable left
20:52
melezhik joined
21:07
melezhik left
21:08
melezhik joined
21:14
melezhik left
21:21
melezhik joined
21:42
melezhik left
22:29
melezhik joined
22:46
melezhik left
|