| Age | Commit message (Collapse) | Author |
|
In the internal/, fix the "reuse lint" warnings due to embedded SPDX
headers string that contains "\n" considered as invalid.
Realign struct Statement based on fieldaligment check.
|
|
The "$noparse" option allow copying file without reading and parsing
the input file.
|
|
The "share" project has been moved to SourceHut with new name
"pakakeh.go".
|
|
The magic command "#local" define the command to be executed using
shell in local environment.
Its have effect and can only be used in script that executed using
"play".
In script that is executed using "local" it does nothing.
|
|
Instead of returning the string based on cmd and args values, return it
based on its kind.
In this way, the full line of magic command is returned before as is.
|
|
The owner and mode is defined after the magic command with the following
syntax,
[ USER [ ":" GROUP ]] ["+" MODE]
The USER and/or GROUP is optional, its accept the value as in "chown".
The MODE also optional, its value must be an octal.
|
|
This fix missing magic command not printed in stdout.
|
|
Since magic command get and put both use the same function, we can use
loop to check and parse all of the get and put statement variants.
|
|
This changes minimize code duplication when parsing magic command
between "#put:" and "#put!" using single function parseStatementGetPut.
In the returned Statement, we changes where to store the source argument
into args[0] instead of in cmd for better readability and minimize
confusion in Copy/SudoCopy.
|
|
This changes minimize code duplication when parsing magic command
between "#get:" and "#get!" using single function parseStatementGetPut.
In the returned Statement, we changes where to store the source argument
into args[0] instead of in cmd for better readability and minimize
confusion in Copy/SudoCopy.
While at it, we add unit test for "#get:".
Unit test for "#get!" is not possible right now, because it will prompt
for password.
|
|
This mark the development for the next minor version.
|
|
Replace ":=" with explicit variable declaration with types for clarity
and minimizing duplicate variables.
|
|
* Request: from 128 to 96 bytes (-32 bytes)
* Session: from 176 to 160 bytes (-16 bytes)
* Statement: from 56 to 48 bytes (-8 bytes)
* session_test.go:24:13: struct with 48 pointer bytes could be 40
* statement_test.go:13:13: struct with 32 pointer bytes could be 16
|
|
|
|
See https://kilabit.info/journal/2022/gpl for more information.
|
|
Previously, all of the local and remote command execution will be
redirected to operating system standard output and error.
This commit refactoring the code to allow Local or Play command to use
custom standard output and error per request.
|
|
The idea for rewrite is to separate between local and remote script, so
we can apply environment variables to local script. We also parse and
validate each statements before being executed to simplify the code.
|