* feat: notify when changing the current directory
* Update actions.lua
---------
Co-authored-by: Ruslan Hrabovyi <ruslan.hrabovyi@ligadigital.com>
Co-authored-by: Steven Arcangeli <506791+stevearc@users.noreply.github.com>
* Return from delete_hidden_buffers when win type is command
* lint: apply stylua formatting
---------
Co-authored-by: Steven Arcangeli <stevearc@stevearc.com>
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>