aboutsummaryrefslogtreecommitdiffhomepage
path: root/expand.cpp
diff options
context:
space:
mode:
authorGravatar ridiculousfish <corydoras@ridiculousfish.com>2012-08-23 11:21:35 -0700
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2012-08-23 11:21:35 -0700
commit5bbf220077145b6c7df9716e45d8f10cc981f01a (patch)
tree977749a4c21674555b7727579fc151680ccffcf3 /expand.cpp
parentf5d4e3f94caf8d546d811afaac91e67d3608a37b (diff)
Fix bug where underlining was failing for paths prefixed with ~
Diffstat (limited to 'expand.cpp')
-rw-r--r--expand.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/expand.cpp b/expand.cpp
index 1374971b..98dfc460 100644
--- a/expand.cpp
+++ b/expand.cpp
@@ -1453,9 +1453,9 @@ static wcstring expand_unescape_string( const wcstring &in, int escape_special )
/**
Attempts tilde expansion of the string specified, modifying it in place.
*/
-static void expand_tilde_internal( wcstring &input )
+static void expand_home_directory( wcstring &input )
{
- const wchar_t * const in = input.c_str();
+ const wchar_t * const in = input.c_str();
if( in[0] == HOME_DIRECTORY )
{
int tilde_error = 0;
@@ -1503,12 +1503,12 @@ static void expand_tilde_internal( wcstring &input )
}
}
-void expand_tilde( wcstring &input)
+void expand_tilde(wcstring &input)
{
if( ! input.empty() && input.at(0) == L'~' )
{
input.at(0) = HOME_DIRECTORY;
- expand_tilde_internal( input );
+ expand_home_directory( input );
}
}
@@ -1631,7 +1631,7 @@ int expand_string( const wcstring &input, std::vector<completion_t> &output, exp
{
wcstring next = in->at(i).completion;
- expand_tilde_internal(next);
+ expand_home_directory(next);
if( flags & ACCEPT_INCOMPLETE )