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')
|
||||
|
||||
__gradle-set-project-root-dir() {
|
||||
local dir=`pwd`
|
||||
project_root_dir=`pwd`
|
||||
local dir="${PWD}"
|
||||
project_root_dir="${PWD}"
|
||||
while [[ $dir != '/' ]]; do
|
||||
if [[ -f "$dir/settings.gradle" || -f "$dir/gradlew" ]]; then
|
||||
project_root_dir=$dir
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@ S () {
|
|||
|
||||
sed "/$@/d" ~/.dirs > ~/.dirs1;
|
||||
\mv ~/.dirs1 ~/.dirs;
|
||||
echo "$@"=\"`pwd`\" >> ~/.dirs;
|
||||
echo "$@"=\""${PWD}"\" >> ~/.dirs;
|
||||
source ~/.dirs ;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue