2006-02-08 10:20:43 +00:00
|
|
|
#
|
|
|
|
# Make pwd print out the home directory as a tilde.
|
2006-06-01 22:23:00 +00:00
|
|
|
# Also drop '/private' directories on OS X.
|
2006-02-08 10:20:43 +00:00
|
|
|
#
|
|
|
|
|
2010-09-18 02:18:26 +00:00
|
|
|
switch (uname)
|
2007-09-22 19:07:34 +00:00
|
|
|
|
|
|
|
case Darwin
|
2007-01-16 01:29:18 +00:00
|
|
|
function pwd --description "Print working directory"
|
2006-06-01 22:23:00 +00:00
|
|
|
echo $PWD | sed -e 's|/private||' -e "s|^$HOME|~|"
|
|
|
|
end
|
2007-09-22 19:07:34 +00:00
|
|
|
|
|
|
|
case '*'
|
2007-01-16 01:29:18 +00:00
|
|
|
function pwd --description "Print working directory"
|
2006-06-01 22:23:00 +00:00
|
|
|
echo $PWD | sed -e "s|^$HOME|~|"
|
|
|
|
end
|
2007-09-22 19:07:34 +00:00
|
|
|
|
2006-06-01 22:23:00 +00:00
|
|
|
end
|