]> Sergey Matveev's repositories - nnn.git/log
nnn.git
2 years agohandle tilde more strictly in mkpath and abspath
NRK [Sun, 26 Feb 2023 12:11:43 +0000 (18:11 +0600)]
handle tilde more strictly in mkpath and abspath

otherwise, if a file is named "~" it will get incorrectly expanded into
$HOME and disaster can happen.

2 years agoconvert_tilde: return whether the conversion was done or not
NRK [Sat, 25 Feb 2023 07:27:48 +0000 (13:27 +0600)]
convert_tilde: return whether the conversion was done or not

2 years agohandle tilde more correctly
NRK [Sat, 25 Feb 2023 07:18:29 +0000 (13:18 +0600)]
handle tilde more correctly

closes: https://github.com/jarun/nnn/issues/1596

2 years agoMerge pull request #1593 from luukvbaal/preview-tui
Arun [Mon, 20 Feb 2023 14:12:15 +0000 (19:42 +0530)]
Merge pull request #1593 from luukvbaal/preview-tui

Preview-tui hide terminated/broken pipe messages

2 years agoPreview-tui hide terminated/broken pipe messages
Luuk van Baal [Sun, 19 Feb 2023 20:52:55 +0000 (21:52 +0100)]
Preview-tui hide terminated/broken pipe messages

Fix #1583, close #1591

2 years agoMerge pull request #1592 from N-R-K/nmv_tmp_cleanup
Arun [Sun, 19 Feb 2023 16:57:36 +0000 (22:27 +0530)]
Merge pull request #1592 from N-R-K/nmv_tmp_cleanup

nmv: ensure the tmpfile is cleaned up in all cases

2 years agoAdded patch for colemak keyboard layout. Existing renamed to colemak-dh (#1587)
Jacob Moena [Sun, 19 Feb 2023 16:22:32 +0000 (17:22 +0100)]
Added patch for colemak keyboard layout. Existing renamed to colemak-dh (#1587)

* Added patch for colemak keyboard layout. Existing renamed

to colemak-dh

* Missed two spots of O_COLEMAK

* Update check-patches.sh

2 years agonmv: ensure the tmpfile is cleaned up in all cases
NRK [Sun, 19 Feb 2023 15:14:53 +0000 (21:14 +0600)]
nmv: ensure the tmpfile is cleaned up in all cases

currently, there's a couple exit paths where the tmpfile doesn't get
cleaned up.

2 years agoUpdate copyright year
Arun Prakash Jana [Sun, 19 Feb 2023 02:58:20 +0000 (08:28 +0530)]
Update copyright year

2 years agoMerge pull request #1589 from N-R-K/prefer_sel
Arun [Fri, 17 Feb 2023 15:30:44 +0000 (21:00 +0530)]
Merge pull request #1589 from N-R-K/prefer_sel

fix shellcheck issues

2 years agofix shellcheck issues
NRK [Fri, 17 Feb 2023 14:12:07 +0000 (20:12 +0600)]
fix shellcheck issues

2 years agoMerge pull request #1588 from N-R-K/prefer_sel
Arun [Fri, 17 Feb 2023 14:00:59 +0000 (19:30 +0530)]
Merge pull request #1588 from N-R-K/prefer_sel

nmv: prefer selection if -u is active

2 years agoplugin-helper: add nnn_use_selection()
NRK [Fri, 17 Feb 2023 13:51:57 +0000 (19:51 +0600)]
plugin-helper: add nnn_use_selection()

2 years agoexport NNN_PREFER_SELECTION to all plugins
NRK [Fri, 17 Feb 2023 13:24:45 +0000 (19:24 +0600)]
export NNN_PREFER_SELECTION to all plugins

2 years agonmv: prefer selection if -u is active
NRK [Fri, 17 Feb 2023 05:56:28 +0000 (11:56 +0600)]
nmv: prefer selection if -u is active

the rename plugin always asks for "selection vs current" even when -u
flag is active. pass it to the plugin via `NNN_PREFER_SELECTION` so that
there's less distracting prompts.

2 years agoMerge pull request #1586 from luukvbaal/preview-tui
Arun [Fri, 17 Feb 2023 13:12:50 +0000 (18:42 +0530)]
Merge pull request #1586 from luukvbaal/preview-tui

Preview-tui restore current working directory

2 years agoPreview-tui restore current working directory
Luuk van Baal [Fri, 17 Feb 2023 00:45:17 +0000 (01:45 +0100)]
Preview-tui restore current working directory

2 years agoMerge pull request #1585 from luukvbaal/preview-tui
Arun [Fri, 17 Feb 2023 01:48:35 +0000 (07:18 +0530)]
Merge pull request #1585 from luukvbaal/preview-tui

Preview-tui hide wezterm split-pane output

2 years agoPreview-tui hide wezterm split-pane output
Luuk van Baal [Fri, 17 Feb 2023 00:45:17 +0000 (01:45 +0100)]
Preview-tui hide wezterm split-pane output

2 years agoUpdate readme
Arun Prakash Jana [Sun, 12 Feb 2023 19:35:36 +0000 (01:05 +0530)]
Update readme

2 years agoMerge pull request #1580 from luukvbaal/preview-tui
Arun [Sun, 12 Feb 2023 02:28:58 +0000 (07:58 +0530)]
Merge pull request #1580 from luukvbaal/preview-tui

Preview-tui!: refactor environment variables

2 years agoPreview-tui!: refactor environment variables
Luuk van Baal [Tue, 7 Feb 2023 03:59:07 +0000 (04:59 +0100)]
Preview-tui!: refactor environment variables

Problem:    List of environment variables is copied for each previewer.
            Environment variable names are too general.
Solution:   Parameterize environment variable flags with static list of
            variables. Prepend user-facing variables with `NNN_`.

2 years agoMerge pull request #1578 from kuntau/wezterm-preview-support
Arun [Sat, 4 Feb 2023 01:34:24 +0000 (07:04 +0530)]
Merge pull request #1578 from kuntau/wezterm-preview-support

feat(preview-tui): add `wezterm` support

2 years agoUpdate plugins/preview-tui
Nizamuddin Sulieman [Fri, 3 Feb 2023 23:36:57 +0000 (07:36 +0800)]
Update plugins/preview-tui

use `$WEZTERM_PANE` instead, since `$WEZTERM_UNIX_SOCKET` is not set on Linux

Co-authored-by: luukvbaal <31730729+luukvbaal@users.noreply.github.com>
2 years agofeat(preview-tui): use built in `iTerm2` image protocol if
Nizamuddin Sulieman [Thu, 2 Feb 2023 10:25:39 +0000 (18:25 +0800)]
feat(preview-tui): use built in `iTerm2` image protocol if
`NNN_PREVIEW_IMGPROG` is not specified. Add some notes.

2 years agofeat(preview-tui): add `wezterm` support
Nizamuddin Sulieman [Thu, 2 Feb 2023 08:14:56 +0000 (16:14 +0800)]
feat(preview-tui): add `wezterm` support

2 years agoOptimize listed selection size calculation
Arun Prakash Jana [Tue, 31 Jan 2023 13:06:26 +0000 (18:36 +0530)]
Optimize listed selection size calculation

2 years agoMerge pull request #1576 from greenfoo/add_chafa
Arun [Mon, 30 Jan 2023 13:07:42 +0000 (18:37 +0530)]
Merge pull request #1576 from greenfoo/add_chafa

preview-tui: add chafa and PREFERRED_IMAGE_VIEWER env variable

2 years agopreview-tui: add chafa and PREFERRED_IMAGE_VIEWER env variable
Fernando Ramos [Sun, 29 Jan 2023 22:37:24 +0000 (23:37 +0100)]
preview-tui: add chafa and PREFERRED_IMAGE_VIEWER env variable

2 years agoMerge pull request #1575 from luukvbaal/colemak
Arun [Mon, 30 Jan 2023 01:19:00 +0000 (06:49 +0530)]
Merge pull request #1575 from luukvbaal/colemak

Update colemak patch

2 years agoUpdate colemak patch
Luuk van Baal [Sun, 29 Jan 2023 22:05:49 +0000 (23:05 +0100)]
Update colemak patch

2 years agoShow total size of non-filtered selected files in a directory.
Arun Prakash Jana [Sun, 29 Jan 2023 17:54:24 +0000 (23:24 +0530)]
Show total size of non-filtered selected files in a directory.

2 years agoRun cmd as plugin now supported exported variables
Arun Prakash Jana [Sat, 28 Jan 2023 04:31:46 +0000 (10:01 +0530)]
Run cmd as plugin now supported exported variables

2 years agoSet defaults for some multiple choice prompts
Arun Prakash Jana [Sat, 28 Jan 2023 04:18:13 +0000 (09:48 +0530)]
Set defaults for some multiple choice prompts

Archive options: listing
Create new options: create file
Open with options: command type GUI

2 years agoSimplify paged and GUI commands run as plugin
Arun Prakash Jana [Sat, 28 Jan 2023 03:41:15 +0000 (09:11 +0530)]
Simplify paged and GUI commands run as plugin

2 years agoPlace "$nnn" in double quotes in man page examples
Arun Prakash Jana [Sat, 28 Jan 2023 03:01:25 +0000 (08:31 +0530)]
Place "$nnn" in double quotes in man page examples

2 years agoMerge pull request #1571 from KlzXS/plugin_simplification
Arun [Sat, 28 Jan 2023 02:53:24 +0000 (08:23 +0530)]
Merge pull request #1571 from KlzXS/plugin_simplification

Simplify the command as plugin codepath

2 years agoMerge pull request #1570 from KlzXS/general_simplification
Arun [Sat, 28 Jan 2023 02:52:52 +0000 (08:22 +0530)]
Merge pull request #1570 from KlzXS/general_simplification

Second attempt at #1566

2 years agoMerge pull request #1573 from N-R-K/fix_chksum
Arun [Fri, 27 Jan 2023 15:33:45 +0000 (21:03 +0530)]
Merge pull request #1573 from N-R-K/fix_chksum

plugins/chksum: use exit instead of return

2 years agoplugins/chksum: use exit instead of return
NRK [Wed, 25 Jan 2023 19:07:08 +0000 (01:07 +0600)]
plugins/chksum: use exit instead of return

From https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_24:

| The return utility shall cause the shell to stop executing the current
| function or dot script. If the shell is not currently executing a
| function or dot script, the results are unspecified.

Closes: https://github.com/jarun/nnn/issues/1572
2 years agoAdd debug message for bad call
KlzXS [Wed, 25 Jan 2023 17:56:48 +0000 (18:56 +0100)]
Add debug message for bad call

2 years agoUpdate signatures
KlzXS [Wed, 25 Jan 2023 16:37:31 +0000 (17:37 +0100)]
Update signatures

2 years agoSimplify commands as plugins
KlzXS [Wed, 25 Jan 2023 16:15:38 +0000 (17:15 +0100)]
Simplify commands as plugins

Remove restrictions on $nnn

Update the plugin README

2 years agoRevert using UTIL_SH_EXEC
KlzXS [Sun, 22 Jan 2023 15:40:35 +0000 (16:40 +0100)]
Revert using UTIL_SH_EXEC

2 years agoRevert "Simplify get_output()"
Arun Prakash Jana [Sun, 15 Jan 2023 18:49:03 +0000 (00:19 +0530)]
Revert "Simplify get_output()"

This reverts commit 6c23fdfd5fa1c394b71b7e26f5d921845c724ee4.

2 years agoRevert "Give better names to variables"
Arun Prakash Jana [Sun, 15 Jan 2023 18:48:52 +0000 (00:18 +0530)]
Revert "Give better names to variables"

This reverts commit 1a2f783b757699805487eb701d85ca0917692245.

2 years agoRevert "Make CI happy"
Arun Prakash Jana [Sun, 15 Jan 2023 18:48:41 +0000 (00:18 +0530)]
Revert "Make CI happy"

This reverts commit 8a1e32d9eb191db2f1b75fda6f15bf6625ecd3fa.

2 years agoRevert "Concatenate arguments to pass to `sh`"
Arun Prakash Jana [Sun, 15 Jan 2023 18:48:19 +0000 (00:18 +0530)]
Revert "Concatenate arguments to pass to `sh`"

This reverts commit 428c652d365b8571ea8b93bfca9e505f5ff14251.

2 years agoRevert "Paging is achieved through shell command now"
Arun Prakash Jana [Sun, 15 Jan 2023 18:45:54 +0000 (00:15 +0530)]
Revert "Paging is achieved through shell command now"

This reverts commit 243301603edb1bfc31087ee20fa6cf90bad8ff64.

2 years agoPaging is achieved through shell command now
Arun Prakash Jana [Sun, 15 Jan 2023 06:16:03 +0000 (11:46 +0530)]
Paging is achieved through shell command now

2 years agoMerge pull request #1566 from KlzXS/general_simplification
Arun [Sun, 15 Jan 2023 05:46:01 +0000 (11:16 +0530)]
Merge pull request #1566 from KlzXS/general_simplification

General simplification

2 years agoConcatenate arguments to pass to `sh`
Arun [Sun, 15 Jan 2023 05:29:36 +0000 (10:59 +0530)]
Concatenate arguments to pass to `sh`

Co-authored-by: KlzXS <klzx+github@klzx.cf>
Co-authored-by: Arun Prakash Jana <engineerarun@gmail.com>
2 years agoMake CI happy
KlzXS [Sat, 14 Jan 2023 22:18:22 +0000 (23:18 +0100)]
Make CI happy

2 years agoGive better names to variables
KlzXS [Sat, 14 Jan 2023 21:31:16 +0000 (22:31 +0100)]
Give better names to variables

2 years agoSimplify get_output()
KlzXS [Sat, 14 Jan 2023 21:11:10 +0000 (22:11 +0100)]
Simplify get_output()

2 years agoMerge pull request #1565 from N-R-K/discussion_template
Arun [Sat, 14 Jan 2023 13:05:59 +0000 (18:35 +0530)]
Merge pull request #1565 from N-R-K/discussion_template

issue-template: add a section for opening a discussion

2 years agoissue-template: add a section for opening a discussion
NRK [Sat, 14 Jan 2023 12:46:56 +0000 (18:46 +0600)]
issue-template: add a section for opening a discussion

this should give the section more visibility.

2 years agoMerge pull request #1563 from N-R-K/macos_ci
Arun [Tue, 10 Jan 2023 15:29:49 +0000 (20:59 +0530)]
Merge pull request #1563 from N-R-K/macos_ci

attempt at fixing macos CI

2 years agoattempt at fixing macos CI
NRK [Tue, 10 Jan 2023 08:01:46 +0000 (14:01 +0600)]
attempt at fixing macos CI

2 years agoMerge pull request #1559 from leovilok/tabbed-wayland-warn
Arun [Sun, 8 Jan 2023 01:02:50 +0000 (06:32 +0530)]
Merge pull request #1559 from leovilok/tabbed-wayland-warn

preview-tabbed: warn & prevent running on Wayland

2 years agopreview-tabbed: warn & prevent running on Wayland
Léo Villeveygoux [Sat, 7 Jan 2023 22:19:28 +0000 (23:19 +0100)]
preview-tabbed: warn & prevent running on Wayland

2 years agoUpdate bug template
Arun Prakash Jana [Thu, 5 Jan 2023 22:54:11 +0000 (04:24 +0530)]
Update bug template

2 years agoMerge pull request #1555 from N-R-K/icons_fix_ub
Arun [Mon, 2 Jan 2023 23:08:26 +0000 (04:38 +0530)]
Merge pull request #1555 from N-R-K/icons_fix_ub

icons-hash: fix bitwise rotation

2 years agoUpdate plugin docs and examples
Arun Prakash Jana [Mon, 2 Jan 2023 23:07:07 +0000 (04:37 +0530)]
Update plugin docs and examples

2 years agoicons-hash: fix bitwise rotation
NRK [Mon, 2 Jan 2023 20:20:21 +0000 (02:20 +0600)]
icons-hash: fix bitwise rotation

in case the rotation is 0, `v >> (32 - r)` would end up doing a 32 right
shift which is equal to the width of `v` and thus undefined behavior.

ref: https://blog.regehr.org/archives/1063

2 years ago[kdeconnect] Various improvements (#1551)
Raffaele Mancuso [Mon, 2 Jan 2023 16:53:47 +0000 (17:53 +0100)]
[kdeconnect] Various improvements (#1551)

- Support multiple devices paired and available at the same time
- Filter out non-regular files

2 years agoicons-hash: misc improvements (#1553)
N-R-K [Mon, 2 Jan 2023 16:53:18 +0000 (16:53 +0000)]
icons-hash: misc improvements (#1553)

* icons-hash: take total probe count into account as well

* icons-hash: use a better PRNG

the older method was using a multiplicative congruential generator (MCG)
which doesn't work too well especially with just 32 bits of state.

change it to a PCG instead with 64 bits of state (and 32 bits of output)
which should give better results.

and since we should get better rng - the search iteration has been
halved as well to save some build time.

* icons-hash: use an xor-rotate hash function

* icons-hash: fix some compiler warnings

2 years agoMiscellaneous improvements to nmount plugin (#1547)
8B411 [Wed, 21 Dec 2022 17:44:28 +0000 (19:44 +0200)]
Miscellaneous improvements to nmount plugin (#1547)

* plugins/nmount: keep `while` & `do` on one line for consistency

* plugins/nmount: sync only that device, which user wants to unmount

* plugins/nmount: replace all instances of `$dev` with `/dev/$dev`

* plugins/nmount: add `--no-user-interaction` option to `udisksctl`

Otherwise the user will be asked for authentication each time he wants
to unmount, say, HDD, since `udisksctl` will try to power it off.

* plugins/nmount: try to mount only existing block devices

* plugins/nmount: do not invoke `lsblk` immediately after mounting

Sometimes `lsblk` fails to provide mountpoint in such a short time frame.

* plugins/nmount: simplify pipe

* plugins/nmount: keep `echo` arguments in a single pair of quotes

* plugins/nmount: report mountpoint only if mounting was successful

2 years agoAdd Discussions link to README.
Arun Prakash Jana [Sun, 18 Dec 2022 15:04:44 +0000 (20:34 +0530)]
Add Discussions link to README.

2 years agokdeconnect: misc improvements (#1543)
Raffaele Mancuso [Sun, 18 Dec 2022 10:39:11 +0000 (11:39 +0100)]
kdeconnect: misc improvements (#1543)

- Work with multiple connected devices by sending files to the first
  device
- Support multi-files selection
- Support sending hovered file in case no file is selected

Co-authored-by: NRK <nrk@disroot.org>
Co-authored-by: Arun Prakash Jana <engineerarun@gmail.com>
2 years agoUpdate readme
Arun Prakash Jana [Fri, 16 Dec 2022 14:24:53 +0000 (19:54 +0530)]
Update readme

2 years agoMerge pull request #1542 from KlzXS/archive_script
Arun [Tue, 13 Dec 2022 13:10:42 +0000 (18:40 +0530)]
Merge pull request #1542 from KlzXS/archive_script

Remove unnecessary parameter from `archive_selection()`

2 years agoRemove unnecessary parameter from `archive_selection()`
KlzXS [Mon, 12 Dec 2022 15:11:55 +0000 (16:11 +0100)]
Remove unnecessary parameter from `archive_selection()`

2 years agoOptimize link creation
Arun Prakash Jana [Mon, 12 Dec 2022 12:33:11 +0000 (18:03 +0530)]
Optimize link creation

2 years agoClear selection if all links are generated
Arun Prakash Jana [Mon, 12 Dec 2022 10:45:06 +0000 (16:15 +0530)]
Clear selection if all links are generated

2 years agoShow errno on link creation failure
Arun Prakash Jana [Mon, 12 Dec 2022 10:27:20 +0000 (15:57 +0530)]
Show errno on link creation failure

2 years agoRestore check to prevent overwriting hovered file when archiving
Arun Prakash Jana [Mon, 12 Dec 2022 09:12:03 +0000 (14:42 +0530)]
Restore check to prevent overwriting hovered file when archiving

2 years agoImprove archive, rename, new workflows
Arun Prakash Jana [Mon, 12 Dec 2022 04:22:16 +0000 (09:52 +0530)]
Improve archive, rename, new workflows

1. hover on entry created in cwd
2. check user input doesn't end with /
3. check user input len < PATH_MAX
4. support creation in ~ directory
5. handle filter mode after creation
6. ensure absolute path len < PATH_MAX

2 years agoImprove archive creation handling
Arun Prakash Jana [Sun, 11 Dec 2022 20:50:28 +0000 (02:20 +0530)]
Improve archive creation handling

2 years agoFix memory leak
Arun Prakash Jana [Sun, 11 Dec 2022 18:37:14 +0000 (00:07 +0530)]
Fix memory leak

2 years agoUpdate docs
Arun Prakash Jana [Sun, 11 Dec 2022 05:23:16 +0000 (10:53 +0530)]
Update docs

2 years agoUse built-in
Arun Prakash Jana [Sat, 10 Dec 2022 22:12:34 +0000 (03:42 +0530)]
Use built-in

2 years agoFix length calculation
Arun Prakash Jana [Sat, 10 Dec 2022 21:23:34 +0000 (02:53 +0530)]
Fix length calculation

2 years agoAttmept to create PATH if PATH is non-existent
Arun Prakash Jana [Sat, 10 Dec 2022 18:33:24 +0000 (00:03 +0530)]
Attmept to create PATH if PATH is non-existent

2 years agoCreate files in less permissive mode
Arun Prakash Jana [Sat, 10 Dec 2022 16:32:22 +0000 (22:02 +0530)]
Create files in less permissive mode

2 years agoFix build break
Arun Prakash Jana [Sat, 10 Dec 2022 16:13:42 +0000 (21:43 +0530)]
Fix build break

2 years agoFix signed and unsigned comparison
Arun Prakash Jana [Sat, 10 Dec 2022 16:05:56 +0000 (21:35 +0530)]
Fix signed and unsigned comparison

2 years agoAllow creating a new file on startup
Arun Prakash Jana [Sat, 10 Dec 2022 14:54:49 +0000 (20:24 +0530)]
Allow creating a new file on startup

An accessibe parent directory must exist to allow creation

2 years agoAllow overwriting regular files on new empty file creation
Arun Prakash Jana [Sat, 10 Dec 2022 13:51:56 +0000 (19:21 +0530)]
Allow overwriting regular files on new empty file creation

2 years agoUpdate ToDo link
Arun Prakash Jana [Sat, 3 Dec 2022 01:56:26 +0000 (07:26 +0530)]
Update ToDo link

2 years agoUpdate README
Arun Prakash Jana [Sat, 26 Nov 2022 04:06:07 +0000 (09:36 +0530)]
Update README

2 years agoAdd correct check for Wayland in clipboard plugins
Arun Prakash Jana [Sat, 26 Nov 2022 03:40:59 +0000 (09:10 +0530)]
Add correct check for Wayland in clipboard plugins

2 years agoMerge pull request #1531 from sjmulder/pr/cflags
Arun [Fri, 25 Nov 2022 16:54:31 +0000 (22:24 +0530)]
Merge pull request #1531 from sjmulder/pr/cflags

Respect CFLAGS and LDFLAGS when building generator

2 years agoRespect CFLAGS and LDFLAGS when building generator
Sijmen J. Mulder [Fri, 25 Nov 2022 15:38:37 +0000 (16:38 +0100)]
Respect CFLAGS and LDFLAGS when building generator

2 years agoFix #1529: fix improper piping
Arun Prakash Jana [Fri, 25 Nov 2022 14:18:45 +0000 (19:48 +0530)]
Fix #1529: fix improper piping

2 years agoSet rdef to development
Arun Prakash Jana [Thu, 24 Nov 2022 05:54:10 +0000 (11:24 +0530)]
Set rdef to development

2 years agoPrepare for release v4.7 Cuba libre v4.7
Arun Prakash Jana [Thu, 24 Nov 2022 05:28:21 +0000 (10:58 +0530)]
Prepare for release v4.7 Cuba libre

2 years agoplugins/upload: handle selection using ffsend
Darukutsu [Fri, 18 Nov 2022 12:44:16 +0000 (13:44 +0100)]
plugins/upload: handle selection using ffsend

2 years agoMerge pull request #1516 from lgtm-migrator/codeql
Arun [Wed, 9 Nov 2022 17:40:30 +0000 (23:10 +0530)]
Merge pull request #1516 from lgtm-migrator/codeql

Add CodeQL workflow for GitHub code scanning

2 years agoAdd CodeQL workflow for GitHub code scanning
LGTM Migrator [Wed, 9 Nov 2022 15:46:24 +0000 (15:46 +0000)]
Add CodeQL workflow for GitHub code scanning