Commit graph

53 commits

Author SHA1 Message Date
Steven Arcangeli
aa0c00c7fd fix(ssh): bad argument when editing files over ssh (#370) 2024-05-13 11:35:50 -06:00
ericguin
3abb6077d7
fix(ssh): config option to pass extra args to SCP (#340)
* Adding in SCP options configuration

This changeset adds in additional SCP options to the config. This allows
the user to specify a list of flags to send to the SCP command that will
be expanded into each shell command.

The primary driver for this is from newe boxes SSHing into pre 9 openSSH
boxes. New openSSH uses sftp server under the hood, rather than the
older SCP protocol. If you go into a system that does not have these
changes, SCP fails to work. The '-O' command line flag was introduced to
resolve this.

Using this change, the user can now pass in `extra_scp_options = {"-O"}`
to resolve the issue.

* Replacing table.unpack with global unpack

* lint: apply stylua

* refactor: change option name and shuffle config around

---------

Co-authored-by: Eric Guinn <eric_guinn@selinc.com>
Co-authored-by: Steven Arcangeli <stevearc@stevearc.com>
2024-05-06 10:42:23 -07:00
Steven Arcangeli
bcfc0a2e01 fix(ssh): garbled output when directory has broken symlinks
The stderr was interleaving with the stdout when performing one of the
ls operations. This was causing the parsing to sometimes fail and crash.
2024-05-01 16:10:10 -07:00
Matthew Wilding
f3a31eba24
fix(windows): navigating into drive letter root directories (#341)
* Fixed drive browsing on windows

* Fixed naming

* fix: Uppercase drive letter only

* updated: Filter out network drives on windows

* Update files.lua

* Update files.lua

* fixed: mapped drives

* addslash to check for double slash

* Fixed indents

* Reverted addslash change

* Fixed windows initial buffer name

* Reverted formatting

* Cleaned up callback

* Fix addslash to handle \ too

* Allow running tests workflow from fork

* Fix workflow

* Test

* Tests

* refactor: readability and comments

* fix: convert buffer name to posix when hijacking directory

---------

Co-authored-by: Steven Arcangeli <stevearc@stevearc.com>
2024-04-23 22:06:59 -07:00
Steven Arcangeli
96f0983e75 fix(windows): file operation preview uses only backslash path separator (#336) 2024-04-23 20:57:22 -07:00
Steven Arcangeli
1f05774e1c feat: experimental support for git operations (#290) 2024-04-19 18:00:44 -04:00
Kevin Oberlies
8bb35eb81a
fix(ssh): escape all file paths for the ssh adapter (#353)
* Escape all paths for ssh file changes using `vim.fn.shellescape()`

* Change away from `vim.fn.shellescape` to custom implementation

Really, only escape `'` with `'\\''` so that it will:
- exit the single quote mode
- escape out a single quote character
- and get back into the single quote mode

Also format long line so linter doesn't complain

* Adding doc comments to the shellescape function

* Adding actual words to the doc comment
2024-04-17 16:19:10 -04:00
Luis Calle
18dfd2458d
fix(windows): can delete non-ascii filenames to trash (#323) 2024-03-04 10:50:22 -08:00
Reinder van Bochove
e27cc4e138
feat: add border config for SSH and keymaps help window (#299)
* feat: add config for ssh window border

* chore: add documentation for ssh window border

* feat: add config for keymaps help window border

* chore: add documentatoin for keymaps help window border
2024-02-19 20:00:49 -08:00
TheLeoP
e71b6caa95
perf(windows): use a single powershell process for trash operations (#271)
* perf(trash_windows): use a single powershell instance for operations

* refactor(trash_windows): encapsulate powershell connection logic

* refactor(windows_trash): better name for functions

* fix(windows_trash): set connection error on initializatino if needed

* refactor(windows_trash): simplify initialization code

* refactor: extract some powershell logic into separate file

---------

Co-authored-by: Steven Arcangeli <stevearc@stevearc.com>
2024-01-15 17:22:11 -08:00
Steven Arcangeli
49b2b3f4a5 fix(trash): mac error deleting dangling symbolic links to trash (#251) 2024-01-07 12:13:37 -08:00
TheLeoP
553b7a0ac1
feat(trash): support for deleting to windows recycle bin (#243)
* feat(windows-trash): support for deleting to windows trash

* feat(windows-trash): add support for view, restore and purge

* fix(windows-trash): undefined path on M.list

* chore(windows-trash): modify comments

* fix(windows-trash): show correct original_path

* fix(windows-trash): add self to powershell_date_grammar

* fix(windows-trash-support): parse deleted date as number

* fix(fs): do not add innecesary \\ on Windows

* feat: extend windows trash adapter

* perf(windows-trash): powershell -> libuv (move, purge and copy)

* fix: don't prompt to save when opening trashed file

* lint: fix luacheck error

* lint: fix luacheck errors

* lint: luacheck error

---------

Co-authored-by: Steven Arcangeli <506791+stevearc@users.noreply.github.com>
2024-01-02 22:05:01 -08:00
Steven Arcangeli
5d9e4368d4 fix(trash): error deleting dangling symbolic links to trash (#251) 2023-12-26 18:03:00 +00:00
Steven Arcangeli
e89a8f8ade fix: crash in ssh and trash adapter detail columns (#235) 2023-11-24 14:13:56 -08:00
Steven Arcangeli
4df43ad5f5 test: fix flaky tests 2023-11-19 21:02:06 -08:00
Steven Arcangeli
6175bd6462
feat: trash support for linux and mac (#165)
* wip: skeleton code for trash adapter

* refactor: split trash implementation for mac and linux

* fix: ensure we create the .Trash/$uid dir

* feat: code complete linux trash implementation

* doc: write up trash features

* feat: code complete mac trash implementation

* cleanup: remove previous, terrible, undocumented trash feature

* fix: always disabled trash

* feat: show original path of trashed files

* doc: add a note about calling actions directly

* fix: bugs in trash implementation

* fix: schedule_wrap in mac trash

* doc: fix typo and line wrapping

* fix: parsing of arguments to :Oil command

* doc: small documentation tweaks

* doc: fix awkward wording in the toggle_trash action

* fix: warning on Windows when delete_to_trash = true

* feat: :Oil --trash can open specific trash directories

* fix: show all trash files in device root

* fix: trash mtime should be sortable

* fix: shorten_path handles optional trailing slash

* refactor: overhaul the UI

* fix: keep trash original path vtext from stacking

* refactor: replace disable_changes with an error filter

* fix: shorten path names in home directory relative to root

* doc: small README format changes

* cleanup: remove unnecessary preserve_undo logic

* test: add a functional test for the freedesktop trash adapter

* test: more functional tests for trash

* fix: schedule a callback to avoid main loop error

* refactor: clean up mutator logic

* doc: some comments and type annotations
2023-11-05 12:40:58 -08:00
Steven Arcangeli
57db10d748 lint: apply stylua 2023-11-05 07:29:15 -08:00
Steven Arcangeli
126a8a2346 fix: can view drives on Windows 2023-11-05 07:27:28 -08:00
Steven Arcangeli
8418e94734 fix: call vimL function in main loop (#206) 2023-10-28 11:02:05 -07:00
Steven Arcangeli
164135793d fix: more correct gf binding for ssh files 2023-10-15 16:47:57 -07:00
Steven Arcangeli
f72b9b2637 format: auto sort requires 2023-10-08 23:36:59 -07:00
Steven Arcangeli
650aa1916f ci: use stylua 0.18.2 2023-10-08 23:01:24 -07:00
Steven Arcangeli
ee813638d2 feat: make gf work in ssh files (#186) 2023-09-30 14:20:28 -07:00
Steven Arcangeli
a9ceb90a63
fix: add busybox support for ssh adapter (#173) 2023-09-21 12:12:57 -07:00
Steven Arcangeli
83e4d04922 fix: correctly resolve new files when selected (#179) 2023-09-18 20:48:40 -07:00
Steven Arcangeli
879d280617 feat: api to sort directory contents (#169) 2023-09-08 21:56:34 -07:00
Mahlon E. Smith
ebcd720a09
fix: ssh adapter supports any system with /bin/sh (#161)
This allows support of other *nix operating systems where bash is not
universally present.
2023-08-24 09:17:54 -07:00
Steven Arcangeli
e45aeebc2b types: update type annotations for LuaLS 3.7 2023-08-24 09:15:06 -07:00
Steven Arcangeli
b61bc9b701 fix: set nomodifiable after BufWritePre in ssh adapter (#159) 2023-08-23 11:02:18 -07:00
Steven Arcangeli
bfa0e8705e fix: errors when writing files over ssh (#159) 2023-08-22 13:19:03 -07:00
Steven Arcangeli
7aeb239a6a refactor: rename supports_xfer 2023-08-20 21:50:02 +00:00
Steven Arcangeli
f4819d8b43 refactor: remove cache side effects from adapter.list 2023-08-20 21:50:02 +00:00
Steven Arcangeli
ffb89bf416 perf: tweak uv readdir params for performance 2023-08-20 18:31:17 +00:00
Steven Arcangeli
866085407f refactor: fix type annotations for adapters 2023-08-20 18:18:36 +00:00
Steven Arcangeli
ff62fc28cd fix: sometimes use shell to run trash command (#99) 2023-08-20 05:10:09 +00:00
Steven Arcangeli
8f7807946a fix: remaining type errors 2023-08-13 13:32:35 -07:00
Steven Arcangeli
47c7737618 fix: type annotations and type errors 2023-08-12 20:32:52 -07:00
Steven Arcangeli
0ccf95ae5d fix: actions.terminal supports ssh adapter (#152) 2023-08-12 12:49:07 -07:00
Steven Arcangeli
a5ff72a8da fix: url-escape paths for scp (#134) 2023-06-30 00:59:08 -07:00
Steven Arcangeli
4a4e0f4013 refactor: small perf win by eliminating string object keys 2023-06-25 22:44:44 -07:00
fecet
c72bcb45b2 fix: oil-ssh assume target machine's locales 2023-06-14 16:26:49 +08:00
Steven Arcangeli
f535c1057c feat: support custom trash commands (#110) 2023-05-23 23:40:41 -07:00
Steven Arcangeli
496d60fcff feat: config option for trashing deleted files (#99) 2023-05-06 21:07:01 -07:00
Steven Arcangeli
273c2cecbf feat: can cancel out of progress window 2023-03-29 18:43:56 -07:00
Steven Arcangeli
080dd27474 refactor: clean up duplicate helper method 2023-03-29 18:42:48 -07:00
Steven Arcangeli
d7805c7751 feat: convert oil://path/to/file.lua to normal file path (#77) 2023-03-17 21:48:38 -07:00
Steven Arcangeli
f5961e731f fix: more detailed information when ssh connection fails (#27) 2023-01-19 00:40:58 -08:00
Steven Arcangeli
ca4da68aae feat: builtin support for editing files over ssh (#27) 2023-01-18 10:25:22 -08:00
Steven Arcangeli
aa68ec4d98 fix: ssh adapter handles character and block files 2023-01-12 00:50:22 -08:00
Steven Arcangeli
9a03af7cb7 fix: url formatting errors when ssh connection specifies port 2023-01-11 23:23:28 -08:00