aboutsummaryrefslogtreecommitdiffhomepage
path: root/path.h
diff options
context:
space:
mode:
authorGravatar ridiculousfish <corydoras@ridiculousfish.com>2012-06-02 14:04:25 -0700
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2012-06-02 14:04:25 -0700
commitb7ba2529658e128bfd4b5aacb7702a13c6a9d820 (patch)
tree3242654c8485d7272e0c2a982193cab921873f18 /path.h
parentae12e1b5379d8cee2dd87891670536d01dbce45e (diff)
Restore implicit cd for paths starting with ., .., or ~
Diffstat (limited to 'path.h')
-rw-r--r--path.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/path.h b/path.h
index eff5ac80..9bac301b 100644
--- a/path.h
+++ b/path.h
@@ -31,6 +31,9 @@ bool path_get_config(wcstring &path);
*/
wchar_t *path_get_path( const wchar_t *cmd );
+/** Returns whether the path can be used for an implicit cd command; if so, also returns the path by reference (if desired). This requires it to start with one of the allowed prefixes (., .., ~) and resolve to a directory. */
+bool path_can_be_implicit_cd(const wcstring &path, wcstring *out_path = NULL, const wchar_t *wd = NULL);
+
class env_vars;
bool path_get_path_string(const wcstring &cmd, wcstring &output);
bool path_get_path_string(const wcstring &cmd, wcstring &output, const env_vars &vars);