Use `$PWD` instead of `\`pwd\``
Don't subshell when there's a shell parameter for it.pull/1927/head
parent
0dbf1d593c
commit
1f6d6aa147
|
|
@ -23,8 +23,8 @@
|
||||||
COMP_WORDBREAKS=$(echo "$COMP_WORDBREAKS" | sed -e 's/://g')
|
COMP_WORDBREAKS=$(echo "$COMP_WORDBREAKS" | sed -e 's/://g')
|
||||||
|
|
||||||
__gradle-set-project-root-dir() {
|
__gradle-set-project-root-dir() {
|
||||||
local dir=`pwd`
|
local dir="${PWD}"
|
||||||
project_root_dir=`pwd`
|
project_root_dir="${PWD}"
|
||||||
while [[ $dir != '/' ]]; do
|
while [[ $dir != '/' ]]; do
|
||||||
if [[ -f "$dir/settings.gradle" || -f "$dir/gradlew" ]]; then
|
if [[ -f "$dir/settings.gradle" || -f "$dir/gradlew" ]]; then
|
||||||
project_root_dir=$dir
|
project_root_dir=$dir
|
||||||
|
|
|
||||||
|
|
@ -86,7 +86,7 @@ S () {
|
||||||
|
|
||||||
sed "/$@/d" ~/.dirs > ~/.dirs1;
|
sed "/$@/d" ~/.dirs > ~/.dirs1;
|
||||||
\mv ~/.dirs1 ~/.dirs;
|
\mv ~/.dirs1 ~/.dirs;
|
||||||
echo "$@"=\"`pwd`\" >> ~/.dirs;
|
echo "$@"=\""${PWD}"\" >> ~/.dirs;
|
||||||
source ~/.dirs ;
|
source ~/.dirs ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue