diff --git a/appveyor.yml b/appveyor.yml
index f976d2b..5f37569 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -10,9 +10,6 @@ branches:
except:
- gh-pages
-# Do not build on tags
-skip_tags: true
-
#---------------------------------#
# environment configuration #
#---------------------------------#
@@ -50,7 +47,7 @@ artifacts:
#---------------------------------#
# notifications #
#---------------------------------#
-
+
notifications:
# Webhook
- provider: Webhook
diff --git a/config/ConEmu.xml b/config/ConEmu.xml
index bd520e2..929cf24 100644
--- a/config/ConEmu.xml
+++ b/config/ConEmu.xml
@@ -123,14 +123,14 @@
-
-
-
+
+
+
-
-
+
+
-
+
diff --git a/launcher/src/CmderLauncher.cpp b/launcher/src/CmderLauncher.cpp
index 510d8ad..4982fd0 100644
--- a/launcher/src/CmderLauncher.cpp
+++ b/launcher/src/CmderLauncher.cpp
@@ -156,22 +156,21 @@ void StartCmder(std::wstring path, bool is_single_mode)
}
SetEnvironmentVariable(L"CMDER_ROOT", exeDir);
- if (!streqi(path.c_str(), L""))
+ if (streqi(path.c_str(), L""))
+ {
+ wchar_t* homeProfile = 0;
+ SHGetKnownFolderPath(FOLDERID_Profile, 0, NULL, &homeProfile);
+ if (!SetEnvironmentVariable(L"CMDER_START", homeProfile)) {
+ MessageBox(NULL, _T("Error trying to set CMDER_START to given path!"), _T("Error"), MB_OK);
+ }
+ CoTaskMemFree(static_cast(homeProfile));
+ }
+ else
{
if (!SetEnvironmentVariable(L"CMDER_START", path.c_str())) {
MessageBox(NULL, _T("Error trying to set CMDER_START to given path!"), _T("Error"), MB_OK);
}
}
- else
- {
- wchar_t* homeProfile = 0;
- SHGetKnownFolderPath(FOLDERID_Profile, 0, NULL, &homeProfile);
- if (!SetEnvironmentVariable(L"CMDER_START", homeProfile)) {
- MessageBox(NULL, _T("Error trying to set CMDER_START to USER_PROFILE!"), _T("Error"), MB_OK);
- }
- CoTaskMemFree(static_cast(homeProfile));
- }
-
// Ensure EnvironmentVariables are propagated.
SendMessageTimeout(HWND_BROADCAST, WM_SETTINGCHANGE, 0, (LPARAM)"Environment", SMTO_ABORTIFHUNG, 5000, NULL);
SendMessageTimeout(HWND_BROADCAST, WM_SETTINGCHANGE, 0, (LPARAM) L"Environment", SMTO_ABORTIFHUNG, 5000, NULL); // For Windows >= 8
diff --git a/vendor/clink.lua b/vendor/clink.lua
index fed2baf..b6f0059 100644
--- a/vendor/clink.lua
+++ b/vendor/clink.lua
@@ -71,8 +71,45 @@ local function get_hg_dir(path)
return get_dir_contains(path, '.hg')
end
+-- adapted from from clink-completions' git.lua
local function get_git_dir(path)
- return get_dir_contains(path, '.git')
+
+ -- return parent path for specified entry (either file or directory)
+ local function pathname(path)
+ local prefix = ""
+ local i = path:find("[\\/:][^\\/:]*$")
+ if i then
+ prefix = path:sub(1, i-1)
+ end
+ return prefix
+ end
+
+ -- Checks if provided directory contains git directory
+ local function has_git_dir(dir)
+ return #clink.find_dirs(dir..'/.git') > 0 and dir..'/.git'
+ end
+
+ local function has_git_file(dir)
+ local gitfile = io.open(dir..'/.git')
+ if not gitfile then return false end
+
+ local git_dir = gitfile:read():match('gitdir: (.*)')
+ gitfile:close()
+
+ return git_dir and dir..'/'..git_dir
+ end
+
+ -- Set default path to current directory
+ if not path or path == '.' then path = clink.get_cwd() end
+
+ -- Calculate parent path now otherwise we won't be
+ -- able to do that inside of logical operator
+ local parent_path = pathname(path)
+
+ return has_git_dir(path)
+ or has_git_file(path)
+ -- Otherwise go up one level and make a recursive call
+ or (parent_path ~= path and get_git_dir(parent_path) or nil)
end
---
diff --git a/vendor/profile.ps1 b/vendor/profile.ps1
index 6ed8a04..5713f76 100644
--- a/vendor/profile.ps1
+++ b/vendor/profile.ps1
@@ -53,7 +53,7 @@ try {
}
function checkGit($Path) {
- if (Test-Path -Path (Join-Path $Path '.git/') ) {
+ if (Test-Path -Path (Join-Path $Path '.git') ) {
Write-VcsStatus
return
}
diff --git a/vendor/sources.json b/vendor/sources.json
index 23c56e4..e592752 100644
--- a/vendor/sources.json
+++ b/vendor/sources.json
@@ -1,8 +1,8 @@
[
{
"name": "git-for-windows",
- "version": "v2.7.0.windows.2",
- "url": "https://github.com/git-for-windows/git/releases/download/v2.7.0.windows.2/PortableGit-2.7.0.2-32-bit.7z.exe"
+ "version": "v2.7.1.windows.1",
+ "url": "https://github.com/git-for-windows/git/releases/download/v2.7.1.windows.1/PortableGit-2.7.1-32-bit.7z.exe"
},
{
"name": "clink",
@@ -11,8 +11,8 @@
},
{
"name": "conemu-maximus5",
- "version": "160202",
- "url": "https://github.com/Maximus5/ConEmu/releases/download/v16.02.02/ConEmuPack.160202.7z"
+ "version": "160207",
+ "url": "https://github.com/Maximus5/ConEmu/releases/download/v16.02.07/ConEmuPack.160207.7z"
},
{
"name": "clink-completions",