NOTE: the `o` and `c` keymaps will continue to work. This only changes
the text labels and adds new keymaps for `y` and `n`.
* chore: replace ok and cancel with yes and no in confirmation window
* chore: allow to configure labels and keymaps for confirmation window
* chore: remove potential duplicate cancel keymaps
* chore: update README and oil.txt
* chore: nowait on confirm mappings and cleanup
* refactor: fully transition to yes/no
* move the config from under the `confirmation` key to the `preview`
key, which is already in use for customizing the window
* fully default to yes/no, keeping the o/c keybindings for backwards
compatibility
* make all of the `cancel` keybindings explicit (q, C-c, esc)
* more dynamically choose highlighting of the action labels
* refactor: just use yes/no and abandon configuration
---------
Co-authored-by: Steven Arcangeli <stevearc@stevearc.com>
* 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>
* 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>
* 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
The previous mechanism used histget() to get the last command or
expression to detect if the user issued a `:wq` or similar. This had the
issue where if a user issued a `:wq`, started vim again, then entered
oil and saved via some mechanism that is _not_ a command (e.g. a
keymap), we would incorrectly detect that `:wq` and exit after saving.
The new mechanism tracks all keypresses and may end up with false
negatives (e.g. ":wqaff<backspace><backspace>ll"), but those are less
frustrating than false positives.
* fix: close preview window when leaving oil buffer
* refactor: try different approach for closing the preview window
* fix: use util.is_oil_bufnr
---------
Co-authored-by: Steven Arcangeli <stevearc@stevearc.com>
* feat: do not close preview when cd into dir
* refactor: add helper method to run function after oil buffer loads
* Keep preview window open
* Remove some test logic
* Use `run_after_load` when moving to parent directory
* Remove unnecessary update of current window
* refactor: create helper function for updating preview
---------
Co-authored-by: Steven Arcangeli <stevearc@stevearc.com>
* 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>
* 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>
* save buffers changed by will_rename_files
* prevent closing already open buffers
* chore: move to config option
* chore: fixes
* fix: a crash and some formatting
---------
Co-authored-by: Steven Arcangeli <506791+stevearc@users.noreply.github.com>
* feat: allow multiple hlgroups inside one column
* types: refactor formatting of highlight types
* types: LuaLS can't infer type information from unpack
---------
Co-authored-by: Steven Arcangeli <506791+stevearc@users.noreply.github.com>
* Implement actions for sending oil entries to quickfix/location-list
* Use vim.notify instead of vim.notify_once in util quickfix function
* Remove redundant files/directories options for sending to qf
always send just files
* set qflist/loclist with a single call
* Add type annotations and default values for send_to_quickfix
* In visual mode, send only selected items to qf
* perf: only execute on current buffer since this event is called on each buffer
* fix: only execute `SessionLoadPost` autocommand when a full session is loaded