mirror of
https://github.com/cmderdev/cmder.git
synced 2024-11-10 09:49:12 +08:00
Merge branch 'ps1_prompt' of https://github.com/daxgames/cmder into ps1_prompt
This commit is contained in:
commit
345562dbd0
13
.github/issue_template.md
vendored
13
.github/issue_template.md
vendored
@ -44,6 +44,11 @@
|
|||||||
|
|
||||||
(Be sure to also check “Closed” issues in the labels section!)
|
(Be sure to also check “Closed” issues in the labels section!)
|
||||||
|
|
||||||
|
• If you have a request to provide auto-complete support for a new tool,
|
||||||
|
please post your request here:
|
||||||
|
|
||||||
|
https://github.com/vladimir-kotikov/clink-completions/issues
|
||||||
|
|
||||||
• If you are having an issue with any of the **upstream technologies**
|
• If you are having an issue with any of the **upstream technologies**
|
||||||
that are used by Cmder, please make sure that the issue is reproducible
|
that are used by Cmder, please make sure that the issue is reproducible
|
||||||
_only_ when used in combination with Cmder.
|
_only_ when used in combination with Cmder.
|
||||||
@ -52,9 +57,9 @@
|
|||||||
- Clink, the default shell in Cmder
|
- Clink, the default shell in Cmder
|
||||||
- ConEmu, the terminal emulator
|
- ConEmu, the terminal emulator
|
||||||
- Git/MinGW, which also provide *NIX tools
|
- Git/MinGW, which also provide *NIX tools
|
||||||
- clink-completions, which provide autocomplete
|
- clink-completions, which provide autocompletion
|
||||||
|
|
||||||
The issues related to upstream technologies are marked as 👆 [name].
|
The issues related to upstream technologies are labeled as 👆 [name].
|
||||||
|
|
||||||
We'll try our best to help you -- but we recommend creating an issue
|
We'll try our best to help you -- but we recommend creating an issue
|
||||||
specifically at each of the corresponding repositories for the best
|
specifically at each of the corresponding repositories for the best
|
||||||
@ -78,7 +83,7 @@
|
|||||||
|
|
||||||
<!--
|
<!--
|
||||||
Some tips on how to write a better report:
|
Some tips on how to write a better report:
|
||||||
- Put an `x` into all the boxes [ ] relevant to your issue (correct example: [x] • not like this: [ x] or [x ]).
|
- Put an `x` into all the boxes [ ] relevant to your issue (correct example: [x] -- not like this: [ x] or [x ]).
|
||||||
- Use the *Preview* tab to see how your issue will actually look like, before sending it.
|
- Use the *Preview* tab to see how your issue will actually look like, before sending it.
|
||||||
- Make sure the description is worded well enough to be understood, and with as much context and examples as possible.
|
- Make sure the description is worded well enough to be understood, and with as much context and examples as possible.
|
||||||
- Post a screenshot or the command the triggered the problem, if applicable.
|
- Post a screenshot or the command the triggered the problem, if applicable.
|
||||||
@ -98,5 +103,7 @@
|
|||||||
### Version Information
|
### Version Information
|
||||||
<!-- Please write your Cmder and ConEmu version here -->
|
<!-- Please write your Cmder and ConEmu version here -->
|
||||||
|
|
||||||
|
<!-- If applicable, write down your Windows edition too (e.g. Windows 10 Pro 1809) -->
|
||||||
|
|
||||||
### Description of the issue
|
### Description of the issue
|
||||||
<!-- Provide a clear, simple description of your issue here -->
|
<!-- Provide a clear, simple description of your issue here -->
|
||||||
|
4
vendor/init.bat
vendored
4
vendor/init.bat
vendored
@ -51,9 +51,7 @@ call "%cmder_root%\vendor\lib\lib_profile"
|
|||||||
) else if /i "%1"=="/v" (
|
) else if /i "%1"=="/v" (
|
||||||
set verbose_output=1
|
set verbose_output=1
|
||||||
) else if /i "%1"=="/d" (
|
) else if /i "%1"=="/d" (
|
||||||
if not defined VSCODE_CWD (
|
set debug_output=1
|
||||||
set debug_output=1
|
|
||||||
)
|
|
||||||
) else if /i "%1" == "/max_depth" (
|
) else if /i "%1" == "/max_depth" (
|
||||||
if "%~2" geq "1" if "%~2" leq "5" (
|
if "%~2" geq "1" if "%~2" leq "5" (
|
||||||
set "max_depth=%~2"
|
set "max_depth=%~2"
|
||||||
|
12
vendor/profile.ps1
vendored
12
vendor/profile.ps1
vendored
@ -25,7 +25,7 @@ if (! $ENV:CMDER_ROOT ) {
|
|||||||
# Remove trailing '\'
|
# Remove trailing '\'
|
||||||
$ENV:CMDER_ROOT = (($ENV:CMDER_ROOT).trimend("\"))
|
$ENV:CMDER_ROOT = (($ENV:CMDER_ROOT).trimend("\"))
|
||||||
|
|
||||||
# do not load bundled psget if a module installer is already available
|
# Do not load bundled psget if a module installer is already available
|
||||||
# -> recent PowerShell versions include PowerShellGet out of the box
|
# -> recent PowerShell versions include PowerShellGet out of the box
|
||||||
$moduleInstallerAvailable = [bool](Get-Command -Name 'Install-Module' -ErrorAction SilentlyContinue)
|
$moduleInstallerAvailable = [bool](Get-Command -Name 'Install-Module' -ErrorAction SilentlyContinue)
|
||||||
|
|
||||||
@ -99,11 +99,6 @@ if (Get-Module PSReadline -ErrorAction "SilentlyContinue") {
|
|||||||
# Enhance Path
|
# Enhance Path
|
||||||
$env:Path = "$Env:CMDER_ROOT\bin;$Env:CMDER_ROOT\vendor\bin;$env:Path;$Env:CMDER_ROOT"
|
$env:Path = "$Env:CMDER_ROOT\bin;$Env:CMDER_ROOT\vendor\bin;$env:Path;$Env:CMDER_ROOT"
|
||||||
|
|
||||||
#
|
|
||||||
# Prompt Section
|
|
||||||
# Users should modify their user_profile.ps1 as it will be safe from updates.
|
|
||||||
#
|
|
||||||
|
|
||||||
# Drop *.ps1 files into "$ENV:CMDER_ROOT\config\profile.d"
|
# Drop *.ps1 files into "$ENV:CMDER_ROOT\config\profile.d"
|
||||||
# to source them at startup.
|
# to source them at startup.
|
||||||
if (-not (test-path "$ENV:CMDER_ROOT\config\profile.d")) {
|
if (-not (test-path "$ENV:CMDER_ROOT\config\profile.d")) {
|
||||||
@ -168,6 +163,11 @@ if (! (Test-Path $CmderUserProfilePath) ) {
|
|||||||
Copy-Item "$env:CMDER_ROOT\vendor\user_profile.ps1.default" -Destination $CmderUserProfilePath
|
Copy-Item "$env:CMDER_ROOT\vendor\user_profile.ps1.default" -Destination $CmderUserProfilePath
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#
|
||||||
|
# Prompt Section
|
||||||
|
# Users should modify their user_profile.ps1 as it will be safe from updates.
|
||||||
|
#
|
||||||
|
|
||||||
# Only set the prompt if it is currently set to the default
|
# Only set the prompt if it is currently set to the default
|
||||||
# This allows users to configure the prompt in their user_profile.ps1 or config\profile.d\*.ps1
|
# This allows users to configure the prompt in their user_profile.ps1 or config\profile.d\*.ps1
|
||||||
if ( $(get-command prompt).Definition -match 'PS \$\(\$executionContext.SessionState.Path.CurrentLocation\)\$\(' -and `
|
if ( $(get-command prompt).Definition -match 'PS \$\(\$executionContext.SessionState.Path.CurrentLocation\)\$\(' -and `
|
||||||
|
Loading…
Reference in New Issue
Block a user