Skip to content

Commit

Permalink
Merge pull request #81 from MattLewin/master
Browse files Browse the repository at this point in the history
Alphabetize warp points when they are added
  • Loading branch information
mfaerevaag authored Aug 5, 2020
2 parents 736ffaf + 0448f37 commit 3d20d15
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions wd.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 3d20d15

Please sign in to comment.