]> Sergey Matveev's repositories - nnn.git/log
nnn.git
10 months agoClear less'es screen master
Sergey Matveev [Tue, 31 Oct 2023 16:35:10 +0000 (19:35 +0300)]
Clear less'es screen

10 months agoF2/F5 cd/cp
Sergey Matveev [Thu, 26 Oct 2023 15:09:19 +0000 (18:09 +0300)]
F2/F5 cd/cp

10 months agoF3 view
Sergey Matveev [Thu, 26 Oct 2023 13:53:23 +0000 (16:53 +0300)]
F3 view

10 months agoF4 edit
Sergey Matveev [Thu, 26 Oct 2023 13:53:08 +0000 (16:53 +0300)]
F4 edit

11 months agoMerge pull request #1770 from 7ocb/pass-path-to-abspath
Arun [Sat, 25 Nov 2023 13:06:52 +0000 (18:36 +0530)]
Merge pull request #1770 from 7ocb/pass-path-to-abspath

When handling SEL_NEW pass `path` to `abspath` call

11 months agoMerge pull request #1773 from 7ocb/handle-link-by-readlink-not-realpath-mk2
Arun [Sat, 25 Nov 2023 13:04:01 +0000 (18:34 +0530)]
Merge pull request #1773 from 7ocb/handle-link-by-readlink-not-realpath-mk2

When handling bookmark, use readlink, not realpath

11 months agoWhen handling bookmark, use readlink, not realpath
me [Tue, 21 Nov 2023 17:52:38 +0000 (20:52 +0300)]
When handling bookmark, use readlink, not realpath

This is to cd to path as it pointed by symlink, not to it's real path. Bookmarked directory may itself contain symlinks in path, which should be respected.

For example: if directory is physically in /mnt/storage/some and it's symlinked to ~/some and directory ~/some/dir added to bookmarks, it's expected that when following bookmark directory will be changed to ~/some/dir (as in bookmark's link) not to /mnt/storage/some/dir (as dir real path).

11 months agoMerge pull request #1769 from N-R-K/fix-helpstr
Arun [Tue, 21 Nov 2023 16:41:12 +0000 (22:11 +0530)]
Merge pull request #1769 from N-R-K/fix-helpstr

fix buffer overflow on certain platforms

11 months agoWhen handling SEL_NEW pass `path` to `abspath` call
me [Tue, 21 Nov 2023 16:18:52 +0000 (19:18 +0300)]
When handling SEL_NEW pass `path` to `abspath` call

If `path` is not provided to `abspath`, later will do `getcwd`, and it's result will differ from `path`. This causes problem that when creating directory inside path reached with symlink, subsequent call to get_cwd_entry does not recognize newly created path as subpath of current path, thus not selecting newly created element.

11 months agosilence ci warning
NRK [Tue, 21 Nov 2023 14:50:45 +0000 (20:50 +0600)]
silence ci warning

11 months agofix buffer overflow on certain platforms
NRK [Tue, 21 Nov 2023 13:30:40 +0000 (19:30 +0600)]
fix buffer overflow on certain platforms

the size of g_buf depends on PATH_MAX and NAME_MAX which on certain
platforms (such as mac) might not be big enough to decode the help
string. use an explicit buffer with proper size instead.

Closes: https://github.com/jarun/nnn/issues/1768
11 months agoMerge pull request #1762 from azuline/sortctx
Arun [Sun, 19 Nov 2023 08:09:24 +0000 (13:39 +0530)]
Merge pull request #1762 from azuline/sortctx

restore sort function pointers when restoring cfg

11 months agofactor out a `setcfg` function for setting the cfg global
blissful [Sat, 18 Nov 2023 21:30:40 +0000 (16:30 -0500)]
factor out a `setcfg` function for setting the cfg global

11 months agorestore sort function pointers when restoring cfg
blissful [Fri, 17 Nov 2023 22:25:16 +0000 (17:25 -0500)]
restore sort function pointers when restoring cfg

11 months agoAdd example: run cmd as plugin to change directory
Arun Prakash Jana [Fri, 17 Nov 2023 19:29:09 +0000 (00:59 +0530)]
Add example: run cmd as plugin to change directory

11 months agoMerge pull request #1755 from cronyakatsuki/alacritty
Arun [Fri, 17 Nov 2023 13:38:03 +0000 (19:08 +0530)]
Merge pull request #1755 from cronyakatsuki/alacritty

preview-tabbed: Add alacritty as xembed client for text-based preview

11 months agoMerge pull request #1749 from abhinav3398/master
luukvbaal [Thu, 16 Nov 2023 14:50:08 +0000 (15:50 +0100)]
Merge pull request #1749 from abhinav3398/master

preview-tui: tmux sixel support for img, gif & vid preview
preview-tui: mpv kitty backend and better previewer handling

11 months agopreview-tui: mpv kitty backend and better previewer handling
Luuk van Baal [Sat, 11 Nov 2023 16:53:20 +0000 (17:53 +0100)]
preview-tui: mpv kitty backend and better previewer handling

11 months agopreview-tui: tmux sixel support for img, gif & vid preview
Abhinav Lakhani [Sun, 15 Oct 2023 06:27:46 +0000 (00:27 -0600)]
preview-tui: tmux sixel support for img, gif & vid preview

11 months agoAdd alacritty as xembed client for text-based preview
CronyAkatsuki [Fri, 3 Nov 2023 12:08:09 +0000 (12:08 +0000)]
Add alacritty as xembed client for text-based preview

12 months agoMerge pull request #1747 from luukvbaal/master
Arun [Wed, 18 Oct 2023 01:23:33 +0000 (06:53 +0530)]
Merge pull request #1747 from luukvbaal/master

Preview-tui avoid early exit after SIGWINCH

12 months agoPreview-tui avoid early exit after SIGWINCH
Luuk van Baal [Tue, 10 Oct 2023 00:50:27 +0000 (02:50 +0200)]
Preview-tui avoid early exit after SIGWINCH

12 months agoMerge pull request #1744 from s-hamann/fix-colemak-patch
Arun [Sun, 8 Oct 2023 12:03:02 +0000 (17:33 +0530)]
Merge pull request #1744 from s-hamann/fix-colemak-patch

Fix colemak patch

12 months agoFix colemak patch
black [Sun, 8 Oct 2023 07:28:58 +0000 (09:28 +0200)]
Fix colemak patch

13 months agoMerge pull request #1741 from N-R-K/rm-colemak-dh
Arun [Sat, 30 Sep 2023 16:42:55 +0000 (22:12 +0530)]
Merge pull request #1741 from N-R-K/rm-colemak-dh

rm colemak-dh

13 months agorm colemak-dh
NRK [Sat, 30 Sep 2023 16:24:22 +0000 (22:24 +0600)]
rm colemak-dh

one colemak patch ought to be enough.

Closes: https://github.com/jarun/nnn/issues/1735
13 months agofix nu quitcd: switched quotes (#1737)
J-Kappes [Sat, 30 Sep 2023 16:19:01 +0000 (18:19 +0200)]
fix nu quitcd: switched quotes (#1737)

Closes: https://github.com/jarun/nnn/issues/1736
13 months agoMerge pull request #1732 from N-R-K/pr-clang-tidy
Arun [Sat, 23 Sep 2023 08:24:39 +0000 (13:54 +0530)]
Merge pull request #1732 from N-R-K/pr-clang-tidy

Fix CI

13 months agofix CI
NRK [Sat, 23 Sep 2023 06:20:22 +0000 (12:20 +0600)]
fix CI

13 months agosplit clang-tidy checks into multiple lines
NRK [Sat, 23 Sep 2023 06:19:52 +0000 (12:19 +0600)]
split clang-tidy checks into multiple lines

makes it more readable and more easily editable. also produces better
diff when editing.

13 months agoUpdate CI name
Arun Prakash Jana [Sat, 23 Sep 2023 02:51:20 +0000 (08:21 +0530)]
Update CI name

13 months agoMerge pull request #1729 from azuline/eza
Arun [Thu, 21 Sep 2023 04:09:44 +0000 (09:39 +0530)]
Merge pull request #1729 from azuline/eza

Add support for eza as a replacement for exa

13 months agoAdd support for eza as a replacement for exa
blissful [Wed, 20 Sep 2023 19:50:58 +0000 (15:50 -0400)]
Add support for eza as a replacement for exa

13 months agoFix patch build errors
Arun Prakash Jana [Wed, 20 Sep 2023 18:04:17 +0000 (23:34 +0530)]
Fix patch build errors

13 months agoOption `-N` to use native prompt
Arun Prakash Jana [Wed, 20 Sep 2023 17:32:04 +0000 (23:02 +0530)]
Option `-N` to use native prompt

This is useful for situations where the executable is compiled with
readline support but the user wants to use the native prompt. Often
this happens because packagers build without readline disabled.

13 months agoMerge pull request #1728 from Xerillic/master
Arun [Wed, 20 Sep 2023 12:21:22 +0000 (17:51 +0530)]
Merge pull request #1728 from Xerillic/master

wallpaper plugin: remove unneeded code

13 months agowallpaper plugin: remove unneeded code
Xerillic [Wed, 13 Sep 2023 23:53:55 +0000 (19:53 -0400)]
wallpaper plugin: remove unneeded code

13 months agoMerge pull request #1727 from Xerillic/master
Arun [Wed, 13 Sep 2023 17:14:55 +0000 (22:44 +0530)]
Merge pull request #1727 from Xerillic/master

wallpaper plugin: add ability to set wallpaper for specific monitors

13 months agoplugins for integration with MacOS clipboard
umaranis [Thu, 7 Sep 2023 19:39:06 +0000 (05:39 +1000)]
plugins for integration with MacOS clipboard

13 months agowallpaper plugin: add ability to set wallpaper for specific monitors using nitrogen
Xerillic [Wed, 13 Sep 2023 00:58:37 +0000 (20:58 -0400)]
wallpaper plugin: add ability to set wallpaper for specific monitors using nitrogen

13 months agofzhist plugin: add support for zsh history #1721 (#1722)
Syed Umar Anis [Thu, 7 Sep 2023 12:33:01 +0000 (22:33 +1000)]
fzhist plugin: add support for zsh history #1721 (#1722)

* fzhist plugin: add support for zsh history

* fzhist plugin: check $HISTFILE for history file location

* fzhist plugin: remove extra trailing spaces

14 months agoUse CircleCI parallelism
Arun Prakash Jana [Sun, 27 Aug 2023 13:28:15 +0000 (18:58 +0530)]
Use CircleCI parallelism

14 months agoUse identifiable CircleCI test name
Arun Prakash Jana [Sun, 27 Aug 2023 12:38:27 +0000 (18:08 +0530)]
Use identifiable CircleCI test name

14 months agoUpdate Haiku nnn.rdef
Arun Prakash Jana [Sun, 27 Aug 2023 04:39:11 +0000 (10:09 +0530)]
Update Haiku nnn.rdef

14 months agoPrepare for release v4.9 Elixir v4.9
Arun Prakash Jana [Sun, 27 Aug 2023 04:25:13 +0000 (09:55 +0530)]
Prepare for release v4.9 Elixir

14 months agoMerge pull request #1719 from umaranis/master
Arun [Sun, 27 Aug 2023 03:42:40 +0000 (09:12 +0530)]
Merge pull request #1719 from umaranis/master

Update finder plugin find command with default path #1718

14 months agoUpdate finder plugin find command with default path #1718
Syed Umar Anis [Sun, 27 Aug 2023 00:00:12 +0000 (10:00 +1000)]
Update finder plugin find command with default path #1718

14 months agoMerge pull request #1711 from quantonganh/dup-first-char-macOS
Arun [Sun, 20 Aug 2023 12:29:30 +0000 (17:59 +0530)]
Merge pull request #1711 from quantonganh/dup-first-char-macOS

Double-width icons can cause duplicated first characters in the filename on macOS

14 months agoMerge pull request #1712 from Rahlir/plugin-fzopen-fix
Arun [Wed, 16 Aug 2023 23:39:19 +0000 (05:09 +0530)]
Merge pull request #1712 from Rahlir/plugin-fzopen-fix

Fix bug in fzopen when selection is canceled

14 months agoFix bug in fzopen when selection is canceled
Tadeas Uhlir [Sat, 12 Aug 2023 15:41:30 +0000 (17:41 +0200)]
Fix bug in fzopen when selection is canceled

14 months agoDouble-width icons can cause duplicated first characters in the filename on macOS
Quan Tong [Wed, 9 Aug 2023 05:37:16 +0000 (12:37 +0700)]
Double-width icons can cause duplicated first characters in the filename on macOS

14 months agoMove to Ubuntu 22.04 on Circle CI
Arun Prakash Jana [Mon, 7 Aug 2023 00:41:55 +0000 (06:11 +0530)]
Move to Ubuntu 22.04 on Circle CI

14 months agoFix #1704 - Show only selected file name if sel is preferred
Arun Prakash Jana [Sat, 5 Aug 2023 18:23:01 +0000 (23:53 +0530)]
Fix #1704 - Show only selected file name if sel is preferred

15 months agoUpdate help
Arun Prakash Jana [Fri, 28 Jul 2023 15:22:21 +0000 (20:52 +0530)]
Update help

15 months agoMerge pull request #1698 from ANtlord/young-files
Arun [Fri, 28 Jul 2023 15:09:29 +0000 (20:39 +0530)]
Merge pull request #1698 from ANtlord/young-files

Jump to the next young file

15 months agoJump to the next young file
ANtlord [Sat, 22 Jul 2023 18:41:14 +0000 (19:41 +0100)]
Jump to the next young file

Forward jumping to the next young file is implemented. The starting
position from which the next young file is searched is the next
position. If no young file has been found, the search starts from the
beginning. It stops at the initial position where the search has
started.

15 months agoMerge pull request #1686 from Anomalocaridid/nmount-replace-pmount
Arun [Sat, 15 Jul 2023 18:50:50 +0000 (00:20 +0530)]
Merge pull request #1686 from Anomalocaridid/nmount-replace-pmount

nmount: make `pmount` optional

15 months agonmount: add support for luks volumes for udisksctl
Anomalocaridid [Sun, 9 Jul 2023 00:22:49 +0000 (20:22 -0400)]
nmount: add support for luks volumes for udisksctl

15 months agonmount: update dependencies in plugins/README.md
Anomalocaridid [Sat, 8 Jul 2023 23:55:10 +0000 (19:55 -0400)]
nmount: update dependencies in plugins/README.md

15 months agonmount: make pmount optional
Anomalocaridid [Sat, 8 Jul 2023 23:55:07 +0000 (19:55 -0400)]
nmount: make pmount optional

15 months agoMerge pull request #1679 from N-R-K/ifdef_fixes
Arun [Tue, 4 Jul 2023 14:51:43 +0000 (20:21 +0530)]
Merge pull request #1679 from N-R-K/ifdef_fixes

Remove some unnecessary ifdefs

16 months agodefine _FILE_OFFSET_BITS 64 unconditionally
NRK [Sat, 1 Jul 2023 02:56:18 +0000 (08:56 +0600)]
define _FILE_OFFSET_BITS 64 unconditionally

according to the manpage, it won't have any effect on 64bit system
anyways. and musl always uses 64bit so this macro doesn't have any
effect there either.

16 months agoMerge pull request #1668 from N-R-K/better_compress
Arun [Fri, 16 Jun 2023 06:44:02 +0000 (12:14 +0530)]
Merge pull request #1668 from N-R-K/better_compress

better and faster string compression

16 months agoMerge pull request #1673 from JingMatrix/master
Arun [Fri, 16 Jun 2023 06:42:41 +0000 (12:12 +0530)]
Merge pull request #1673 from JingMatrix/master

Add djvu icon

16 months agoAdd djvu icon
JingMatrix [Wed, 17 May 2023 12:31:45 +0000 (14:31 +0200)]
Add djvu icon

Use paperclip as icon since it is used by DjVuLibre.

16 months agofix failing colemak patches
NRK [Thu, 15 Jun 2023 02:54:00 +0000 (08:54 +0600)]
fix failing colemak patches

16 months agobetter helpstring compression
NRK [Tue, 13 Jun 2023 16:41:56 +0000 (22:41 +0600)]
better helpstring compression

this avoids multiple printf calls and instead decodes the buffer
natively. using %NN instead of %-NNc also saves two bytes per run.
helpstr is also made `static` to avoid unnecessary stack allocation.

16 months agoMerge pull request #1672 from luukvbaal/preview-tui
Arun [Wed, 14 Jun 2023 10:50:15 +0000 (16:20 +0530)]
Merge pull request #1672 from luukvbaal/preview-tui

Preview-tui add -C to NNN_PAGER

16 months agoPreview-tui add -C to NNN_PAGER
Luuk van Baal [Wed, 14 Jun 2023 07:24:23 +0000 (09:24 +0200)]
Preview-tui add -C to NNN_PAGER

This makes it so that when the paged text is fewer lines than the preview pane, it is placed at the top instead of at the bottom

17 months agoMerge pull request #1658 from N-R-K/chmod_fix
Arun [Fri, 26 May 2023 23:14:56 +0000 (04:44 +0530)]
Merge pull request #1658 from N-R-K/chmod_fix

fix: properly update mode after xchmod

17 months agofix: properly update mode after xchmod
NRK [Fri, 26 May 2023 13:27:07 +0000 (19:27 +0600)]
fix: properly update mode after xchmod

xchmod now returns the new mode through a pointer, no need to assume all
executable bits were toggled.

Closes: https://github.com/jarun/nnn/issues/1657
17 months agoMerge pull request #1655 from mistersmee/gitstatus-nerd
Arun [Mon, 22 May 2023 12:38:39 +0000 (18:08 +0530)]
Merge pull request #1655 from mistersmee/gitstatus-nerd

patches/gitstatus: Fix nerd fonts broken by 3.0.0 update

17 months agopatches/gitstatus: Fix nerd fonts broken by 3.0.0 update
Aseem Athale [Mon, 22 May 2023 08:46:27 +0000 (14:16 +0530)]
patches/gitstatus: Fix nerd fonts broken by 3.0.0 update

Signed-off-by: Aseem Athale <athaleaseem@gmail.com>
17 months agoMerge pull request #1650 from leo-arch/master
Arun [Thu, 18 May 2023 20:27:34 +0000 (01:57 +0530)]
Merge pull request #1650 from leo-arch/master

Fix crash when PWD is set to empty string

17 months agoMerge pull request #1651 from N-R-K/cp_mv
Arun [Thu, 18 May 2023 20:26:53 +0000 (01:56 +0530)]
Merge pull request #1651 from N-R-K/cp_mv

make the cp/mv modification more robust

17 months agoMerge pull request #1646 from Delgan/patch-2
Arun [Thu, 18 May 2023 20:23:48 +0000 (01:53 +0530)]
Merge pull request #1646 from Delgan/patch-2

Fix some broken table links in docs

17 months agomake the cp/mv modification more robust
NRK [Sun, 14 May 2023 16:13:15 +0000 (22:13 +0600)]
make the cp/mv modification more robust

this makes it so that if the cp/mv commands are changed the in the
future, it will continue to work reliably instead of having hardcoded
indexes to modify the array.

the `#ifdef __linux__` is also removed, compilers should be smart enough
to see that PROGRESS_{CP,MV} are unused (on non-linux systems) and
optimize it out.

17 months agoMerge pull request #1648 from N-R-K/g3_debug
Arun [Mon, 15 May 2023 01:08:03 +0000 (06:38 +0530)]
Merge pull request #1648 from N-R-K/g3_debug

Makefile: use -g3 for debug builds

17 months agoFix crash when PWD is set to empty string
leo-arch [Sun, 14 May 2023 20:12:04 +0000 (20:12 +0000)]
Fix crash when PWD is set to empty string

nnn crashes when PWD is set to empty string: `PWD="" nnn`

17 months agoMakefile: use -g3 for debug builds
NRK [Sun, 14 May 2023 16:13:44 +0000 (22:13 +0600)]
Makefile: use -g3 for debug builds

-g3 builds additional information such as macro definition and so on.

17 months agoFix some broken table links in docs
Delgan [Sat, 13 May 2023 15:25:59 +0000 (17:25 +0200)]
Fix some broken table links in docs

17 months agoMerge pull request #1645 from Delgan/patch-1
Arun [Fri, 12 May 2023 16:33:22 +0000 (22:03 +0530)]
Merge pull request #1645 from Delgan/patch-1

Add "$NNN_TERMINAL_ARGS" for "preview-tui" plugin

17 months agoMerge pull request #1644 from jaspwr/master
Arun [Fri, 12 May 2023 16:32:52 +0000 (22:02 +0530)]
Merge pull request #1644 from jaspwr/master

Update Haskell icon colour

17 months agoMerge pull request #1643 from UnleashedMarf/iconlookup-fix
Arun [Fri, 12 May 2023 15:37:29 +0000 (21:07 +0530)]
Merge pull request #1643 from UnleashedMarf/iconlookup-fix

Fix syntax-error in .iconlookup

17 months agoAllow $NNN_TERMINAL additional arguments for "preview-tui" plugin
Delgan [Fri, 12 May 2023 12:20:04 +0000 (14:20 +0200)]
Allow $NNN_TERMINAL additional arguments for "preview-tui" plugin

This can be used to start terminal with a custom title and prevent focus switch with i3 window manager.

17 months agoUpdate Haskell icon color
Jasper [Fri, 12 May 2023 05:19:04 +0000 (15:19 +1000)]
Update Haskell icon color

17 months agoFix another typo
UnleashedMarf [Thu, 11 May 2023 17:44:17 +0000 (19:44 +0200)]
Fix another typo

Co-authored-by: luukvbaal <luukvbaal@gmail.com>
17 months agoFix syntax-error in .iconlookup
UnleashedMarf [Thu, 11 May 2023 16:58:11 +0000 (18:58 +0200)]
Fix syntax-error in .iconlookup

Fixed syntax-error that prevented .iconlookup from executing.

17 months agoUpdate docs
Arun Prakash Jana [Sat, 6 May 2023 12:25:50 +0000 (17:55 +0530)]
Update docs

17 months agoMerge pull request #1639 from atomcult/posix-quitcd
Arun [Sat, 6 May 2023 03:04:31 +0000 (08:34 +0530)]
Merge pull request #1639 from atomcult/posix-quitcd

quitcd.bash_zsh: make POSIX compliant; minor fixes and style changes

17 months agoquitcd.bash_zsh: make POSIX compliant; minor fixes and style changes
J. Brock [Fri, 5 May 2023 04:51:39 +0000 (00:51 -0400)]
quitcd.bash_zsh: make POSIX compliant; minor fixes and style changes

This commit makes the following changes to quitcd.bash_zsh:
- POSIX compliance and an according rename of the script
- Enforces consistent if-then statements and indentation
- Minor comment fixes

Signed-off-by: J. Brock <joseph.brock@protonmail.com>
17 months agoMerge pull request #1638 from luukvbaal/nerdfix
Arun [Fri, 5 May 2023 00:06:27 +0000 (05:36 +0530)]
Merge pull request #1638 from luukvbaal/nerdfix

Update nerd-font icons to v3

17 months agoUpdate nerd-font icons to v3
Luuk van Baal [Thu, 4 May 2023 22:59:44 +0000 (00:59 +0200)]
Update nerd-font icons to v3

This is an upstream breaking change.
Update your font to the latest version if you see missing icons.

18 months agoFilter adjustment when opening context from plugin
Arun Prakash Jana [Sat, 29 Apr 2023 16:13:29 +0000 (21:43 +0530)]
Filter adjustment when opening context from plugin

- Clear filter only when a plugin is selected manually.
  Plugin dir should be unfiltered when opened.
- Plugins invoked by keys don't require clearing filter
  of original context. If a new context is opened using
  the plugin, it will be unfiltered by default. If the
  same context is re-used (when all the contexts are in
  use) the filter should be cleared so the the new path
  is opened unfiltered.

18 months agoMerge pull request #1633 from N-R-K/assert_fix
Arun [Sun, 23 Apr 2023 15:31:27 +0000 (21:01 +0530)]
Merge pull request #1633 from N-R-K/assert_fix

icons-hash: replace assert with handmade version

18 months agoicons-hash: replace assert with handmade version
NRK [Sat, 22 Apr 2023 11:08:00 +0000 (17:08 +0600)]
icons-hash: replace assert with handmade version

since 2fc9d51, the hash-table generator inherits environmental
CFLAGS and so we shouldn't disallow setting -DNDEBUG.

fixes: https://github.com/jarun/nnn/issues/1632

18 months agoMerge pull request #1630 from musjj/preview-tui-escape
Arun [Fri, 21 Apr 2023 21:32:37 +0000 (03:02 +0530)]
Merge pull request #1630 from musjj/preview-tui-escape

feat(preview-tui): handle quoting in `start_preview` more robustly

18 months agoperf(preview-tui): replace env for loop with parameter expansion
Luuk van Baal [Wed, 19 Apr 2023 23:06:43 +0000 (01:06 +0200)]
perf(preview-tui): replace env for loop with parameter expansion

18 months agofeat(preview-tui): handle quoting in start_preview more robustly
musjj [Wed, 19 Apr 2023 01:20:41 +0000 (08:20 +0700)]
feat(preview-tui): handle quoting in start_preview more robustly

This commit makes the script more resistant to naughty filenames.
The script now depends on bash for the following features:
- Arrays
Correctly creating and passing argument lists is now simple
- Parameter transformation
`${parameter@Q}` makes it easy to correctly quote a string so that it
can be safely re-evaluated by the interpreter later.

On iTerm, the shell command used to render the preview is now passed to
osascript via a named pipe: `$FIFO_OSASCRIPT`. By not embedding the
shell command directly, we now no longer need to worry about osascript's
quoting rules. It's not perfect, because $SHELL and $TMPDIR might
contain naughty characters, but it's quite unlikely to happen.

18 months agoMerge pull request #1628 from spfanning/patch-1
Arun [Fri, 14 Apr 2023 13:24:22 +0000 (18:54 +0530)]
Merge pull request #1628 from spfanning/patch-1

Support wezterm split size percentage in preview-tui