mirror of
https://github.com/jarun/nnn.git
synced 2024-11-24 03:41:27 +00:00
Plugin suedit - preserve environment
This commit is contained in:
parent
d54bc230f6
commit
6f14190e6d
1
nnn.1
1
nnn.1
|
@ -414,6 +414,7 @@ separated by \fI;\fR:
|
|||
----------------------------------- + -------------------------------------------------
|
||||
Key:Command | Description
|
||||
----------------------------------- + -------------------------------------------------
|
||||
e:-!sudo -E vim $nnn* | Edit file as root in vim
|
||||
g:-!git diff | Show git diff
|
||||
h:-!hx $nnn* | Open hovered file in hx hex editor
|
||||
k:-!fuser -kiv $nnn* | Interactively kill process(es) using hovered file
|
||||
|
|
|
@ -170,6 +170,7 @@ Notes:
|
|||
|
||||
| Key:Command | Description |
|
||||
|---|---|
|
||||
| `e:-!sudo -E vim $nnn*` | Edit file as root in vim |
|
||||
| `g:-!git diff` | Show git diff |
|
||||
| `h:-!hx $nnn*` | Open hovered file in [hx](https://github.com/krpors/hx) hex editor |
|
||||
| `k:-!fuser -kiv $nnn*` | Interactively kill process(es) using hovered file |
|
||||
|
|
|
@ -8,9 +8,9 @@
|
|||
EDITOR="${EDITOR:-vim}"
|
||||
|
||||
if type sudo >/dev/null 2>&1; then
|
||||
sudo "$EDITOR" "$1"
|
||||
sudo -E "$EDITOR" "$1"
|
||||
elif type sudoedit >/dev/null 2>&1; then
|
||||
sudoedit "$1"
|
||||
sudoedit -E "$1"
|
||||
elif type doas >/dev/null 2>&1; then
|
||||
doas "$EDITOR" "$1"
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue