Rely on $PWD instead of getcwd() more often

Fixes https://github.com/fish-shell/fish-shell/issues/696
This commit is contained in:
ridiculousfish
2013-04-27 00:45:38 -07:00
parent 807c5f2ef2
commit fe6699f0bf
7 changed files with 22 additions and 30 deletions

View File

@@ -1275,7 +1275,7 @@ struct autosuggestion_context_t
cursor_pos(pos),
searcher(*history, term, HISTORY_SEARCH_TYPE_PREFIX),
detector(history, term),
working_directory(get_working_directory()),
working_directory(env_get_pwd_slash()),
vars(env_vars_snapshot_t::highlighting_keys),
generation_count(s_generation_count),
has_tried_reloading(false)