about summary refs log tree commit diff stats
path: root/examples/shell_subshell_notice.sh
diff options
context:
space:
mode:
authortoonn <toonn@toonn.io>2019-12-31 15:10:37 +0100
committertoonn <toonn@toonn.io>2019-12-31 15:10:37 +0100
commit73b9d457d461d9f242f0dfb14643c08c0377193b (patch)
tree65f28651cf34e4e5dff4fd9c31462dd896c99e88 /examples/shell_subshell_notice.sh
parent219413fa6fa8ff103a633bebf8535768456a5be6 (diff)
parent5dc0d60a56679da5f98cfc8a03273ccafa6d016a (diff)
downloadranger-73b9d457d461d9f242f0dfb14643c08c0377193b.tar.gz
Merge branch 'dmitmel-examples-bash-automatic-cd'
Diffstat (limited to 'examples/shell_subshell_notice.sh')
-rw-r--r--examples/shell_subshell_notice.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/examples/shell_subshell_notice.sh b/examples/shell_subshell_notice.sh
new file mode 100644
index 00000000..0d8d2431
--- /dev/null
+++ b/examples/shell_subshell_notice.sh
@@ -0,0 +1,10 @@
+# shellcheck shell=sh
+
+# Compatible with ranger 1.5.3 through 1.9.*
+#
+# Change the prompt when you open a shell from inside ranger
+#
+# Source this file from your shell startup file (.bashrc, .zshrc etc) for it to
+# work.
+
+[ -n "$RANGER_LEVEL" ] && PS1="$PS1"'(in ranger) '