diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2020-12-10 12:11:49 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2020-12-10 12:11:49 +0300 |
commit | 4f685934617236b3da6c7c254fa230a4f6c5826f (patch) | |
tree | 9c7badecbace3e113555998b8ba4b5ace57a291f /%HOME% | |
parent | .vimrc: disable "editing" directories (diff) | |
download | linux-home-4f685934617236b3da6c7c254fa230a4f6c5826f.tar.gz linux-home-4f685934617236b3da6c7c254fa230a4f6c5826f.zip |
.bashrc: prevent nested ranger instances
Diffstat (limited to '')
-rw-r--r-- | %HOME%/.bashrc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/%HOME%/.bashrc b/%HOME%/.bashrc index e410cd7..164d7b1 100644 --- a/%HOME%/.bashrc +++ b/%HOME%/.bashrc @@ -105,3 +105,12 @@ os_is_cygwin \ if [ "$TILIX_ID" ] || [ "$VTE_VERSION" ]; then [ -r /etc/profile.d/vte.sh ] && source /etc/profile.d/vte.sh fi + +# Prevent nested ranger instances. +ranger() { + if [ -z "$RANGER_LEVEL" ]; then + /usr/bin/ranger "$@" + else + exit + fi +} |