Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
oh-my-zsh
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
github
oh-my-zsh
Commits
81eb2089
Commit
81eb2089
authored
Aug 05, 2020
by
Marc Cornellà
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wd: update to latest version
https://github.com/mfaerevaag/wd/commit/3d20d15d58b9349f872a1abab639aae02374f64c
Fixes #9002
parent
3935ccce
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
3 deletions
+11
-3
wd.sh
plugins/wd/wd.sh
+11
-3
No files found.
plugins/wd/wd.sh
100644 → 100755
View file @
81eb2089
...
...
@@ -183,6 +183,11 @@ wd_add()
then
wd_remove
$point
>
/dev/null
printf
"%q:%s
\n
"
"
${
point
}
"
"
${
PWD
/#
$HOME
/~
}
"
>>
$WD_CONFIG
if
(
whence
sort
>
/dev/null
)
;
then
local
config_tmp
=
$(
mktemp
"
${
TMPDIR
:-
/tmp
}
/wd.XXXXXXXXXX"
)
# use 'cat' below to ensure we respect $WD_CONFIG as a symlink
sort
-o
"
${
config_tmp
}
"
$WD_CONFIG
&&
cat
"
${
config_tmp
}
"
>
$WD_CONFIG
&&
rm
"
${
config_tmp
}
"
fi
wd_export_static_named_directories
...
...
@@ -342,8 +347,8 @@ wd_clean() {
wd_export_static_named_directories
()
{
if
[[
-z
$WD_SKIP_EXPORT
]]
then
grep
'^[0-9a-zA-Z_-]\+:'
"
$WD_CONFIG
"
|
sed
-e
"s,~,
$HOME
,"
-e
's/:/=/'
|
while
read
warpdir
;
do
hash
-d
"
$warpdir
"
command
grep
'^[0-9a-zA-Z_-]\+:'
"
$WD_CONFIG
"
|
sed
-e
"s,~,
$HOME
,"
-e
's/:/=/'
|
while
read
warpdir
;
do
hash
-d
"
$warpdir
"
done
fi
}
...
...
@@ -430,7 +435,10 @@ else
break
;;
"-r"
|
"--remove"
|
"rm"
)
wd_remove
$2
# Loop over all arguments after "rm", separated by whitespace
for
pointname
in
"
${
@
:2
}
"
;
do
wd_remove
$pointname
done
break
;;
"-l"
|
"list"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment