diff options
author | ridiculousfish <corydoras@ridiculousfish.com> | 2012-06-02 14:04:25 -0700 |
---|---|---|
committer | ridiculousfish <corydoras@ridiculousfish.com> | 2012-06-02 14:04:25 -0700 |
commit | b7ba2529658e128bfd4b5aacb7702a13c6a9d820 (patch) | |
tree | 3242654c8485d7272e0c2a982193cab921873f18 /path.h | |
parent | ae12e1b5379d8cee2dd87891670536d01dbce45e (diff) |
Restore implicit cd for paths starting with ., .., or ~
Diffstat (limited to 'path.h')
-rw-r--r-- | path.h | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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); |