Permalink
Browse files

\W for / no longer the empty string

  • Loading branch information...
1 parent b9f86e9 commit ab0ed7b5bec17c4af7c04d131f9b23d9c84c33fd @substack committed Aug 6, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 index.js
View
@@ -58,7 +58,7 @@ module.exports = function (str, opts) {
if (x === 'W') {
var dir = opts.cwd || opts.env.PWD || process.cwd();
if (dir === opts.env.HOME) return '~';
- return path.basename(dir);
+ return path.basename(dir) || '/';
}
if (x === '!') return opts.history === undefined ? 0 : opts.history;
if (x === '#') return opts.command === undefined ? 0 : opts.command;

0 comments on commit ab0ed7b

Please sign in to comment.