We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bf44702 commit 0a3324aCopy full SHA for 0a3324a
home/exact_private_dot_bash.d/private_060_cd_overrides.sh
@@ -1,5 +1,7 @@
1
#!/usr/bin/env bash
2
3
+is_ai_agent && return
4
+
5
function cd
6
{
7
builtin cd "$@" &&
@@ -32,16 +34,15 @@ function _cd_init()
32
34
33
35
36
# Load the path to ondir for faster access from now on. Replace with a noop if ondir is not available
-_ONDIR_PATH=$(which ondir || echo :)
37
+_ONDIR_PATH=$(which ondir || true)
38
_cd_ondir()
39
- local ondir_path=${_ONDIR_PATH:-':'}
- eval "$("$ondir_path" "$OLDPWD" "$PWD")"
40
+ [[ -n $_ONDIR_PATH ]] && eval "$("$_ONDIR_PATH" "$OLDPWD" "$PWD")"
41
}
42
43
_cd_echo()
44
- [[ $PWD != $OLDPWD ]] && echo "$PWD (from $OLDPWD)"
45
+ [[ $PWD != "$OLDPWD" ]] && echo "$PWD (from $OLDPWD)"
46
47
48
cd .
0 commit comments