drop dirname in favor of native Bash strings (1 of 2)
Convert `var=${dirname $filename)` to `var="${filename%/*}` in cases where there is no ambiguity.
Make sure that the path in `$BASH_IT` is absolute because this path gets embedded in the template `.bash_profile` file if selected by the user.
This commit is contained in:
@@ -11,7 +11,7 @@ autoenv_init()
|
||||
typeset target home _file
|
||||
typeset -a _files
|
||||
target=$1
|
||||
home="$(dirname "$HOME")"
|
||||
home="${HOME%/*}"
|
||||
|
||||
_files=( $(
|
||||
while [[ "$PWD" != "/" && "$PWD" != "$home" ]]
|
||||
|
||||
Reference in New Issue
Block a user