We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
╰─ $ builtin cd bin /home/zw963/bin ╭─ 02:05 zw963 ⮀ ~/bin ⮀ ➦ 0 ╰─ $ cd .. ╭─ 02:06 zw963 ⮀ ~ ⮀ ➦ 0 ╰─ $ \cd bin /home/zw963/bin
So, this the following output will be:
here=$(cd "$(dirname "$BASH_SOURCE")"; pwd)
The here variable would output 2 line string, instead only 1 line.
╰─ $ bin/1.sh +++ dirname bin/1.sh ++ cd bin ++ pwd + here='/home/zw963/bin /home/zw963/bin'
here is /home/zw963/bin /home/zw963/bin
/home/zw963/bin /home/zw963/bin
so, it should be fix with:
here=$(cd "$(dirname "$BASH_SOURCE")" >/dev/null; pwd)
print the cd folder name probably is a shell config issue, but, anyway, new config more robust.
The text was updated successfully, but these errors were encountered:
BTW, this issue only happen when set $CDPATH
Sorry, something went wrong.
No branches or pull requests
So, this the following output will be:
here=$(cd "$(dirname "$BASH_SOURCE")"; pwd)
The here variable would output 2 line string, instead only 1 line.
here is
/home/zw963/bin /home/zw963/bin
so, it should be fix with:
print the cd folder name probably is a shell config issue, but, anyway, new config more robust.
The text was updated successfully, but these errors were encountered: