Add PROFILE_HOME to CDPATH.
authorIain Patterson <me@iain.cx>
Mon, 2 Jun 2014 09:25:17 +0000 (10:25 +0100)
committerIain Patterson <me@iain.cx>
Thu, 11 Feb 2016 13:09:16 +0000 (13:09 +0000)
Append PROFILE_HOME to CDPATH so we can easily cd to it having become
another user.

.profile.d/cdpath.bashrc [new file with mode: 0644]

diff --git a/.profile.d/cdpath.bashrc b/.profile.d/cdpath.bashrc
new file mode 100644 (file)
index 0000000..4b8fda8
--- /dev/null
@@ -0,0 +1 @@
+[ -n "$PROFILE_HOME" ] && CDPATH="${CDPATH:+$CDPATH:}$PROFILE_HOME"