mirror of
https://github.com/jarun/nnn.git
synced 2025-01-15 13:26:37 +00:00
Minor improvements
This commit is contained in:
parent
b752744ca0
commit
b75a22f72d
|
@ -7,6 +7,8 @@ Before suggesting changes, please read a bit about [the design principles nnn fo
|
|||
|
||||
`nnn` follows the Linux kernel coding style closely. The C source code uses TABs and the plugins use 4 spaces for indentation.
|
||||
|
||||
Changes should not break the patch framework. Please run `make checkpatches` before raising a PR.
|
||||
|
||||
CI runs `shellcheck` on plugins. Please watch out for any failures if you are modifying/adding a plugin.
|
||||
|
||||
## Resources
|
||||
|
|
|
@ -1113,11 +1113,7 @@ static size_t mkpath(const char *dir, const char *name, char *out)
|
|||
|
||||
if (name[0] != '/') { // NOLINT
|
||||
/* Handle root case */
|
||||
if (istopdir(dir))
|
||||
len = 1;
|
||||
else
|
||||
len = xstrsncpy(out, dir, PATH_MAX);
|
||||
|
||||
len = istopdir(dir) ? 1 : xstrsncpy(out, dir, PATH_MAX);
|
||||
out[len - 1] = '/'; // NOLINT
|
||||
}
|
||||
return (xstrsncpy(out + len, name, PATH_MAX - len) + len);
|
||||
|
@ -2440,8 +2436,7 @@ static bool plugscript(const char *plugin, uchar_t flags)
|
|||
|
||||
static void opstr(char *buf, char *op)
|
||||
{
|
||||
snprintf(buf, CMD_LEN_MAX, "xargs -0 sh -c '%s \"$0\" \"$@\" . < /dev/tty' < %s",
|
||||
op, selpath);
|
||||
snprintf(buf, CMD_LEN_MAX, "xargs -0 sh -c '%s \"$0\" \"$@\" . < /dev/tty' < %s", op, selpath);
|
||||
}
|
||||
|
||||
static bool rmmulstr(char *buf)
|
||||
|
|
Loading…
Reference in a new issue