Commit Graph

88 Commits

Author SHA1 Message Date
Dax T. Games
7b55dab79e Merge remote-tracking branch 'upstream/master' into more_speed_2 2023-05-30 11:18:38 -04:00
Dax T. Games
b2135cd0a9 don't error if vim slias exists 2023-05-30 11:15:04 -04:00
Martin Kemp
34f2aabb8e
Remove PSGet Entirely
Fixes #2841

Signed-off-by: Martin Kemp <me@martinke.mp>
2023-05-23 11:11:39 +01:00
Brian Dukes
e1bf703f50
Fix error from profile.d PowerShell scripts
When there are `ps1` files in `profile.d`, the following error is logged:

>A positional parameter cannot be found that accepts argument 'Sourcing'.
2022-12-20 10:50:44 -06:00
Martin Kemp
470808838f
TotalSecond -> TotalSeconds
Signed-off-by: Martin Kemp <me@martinke.mp>
2022-12-19 10:15:02 +00:00
Martin Kemp
328f4b3073
Use New-TimeSpan to calculate total elapsed time
Fixes #2797

Signed-off-by: Martin Kemp <me@martinke.mp>
2022-12-19 10:13:34 +00:00
David Refoua
ba97011bbc changes to letter casing in variable 2022-11-06 23:19:01 +03:30
David Refoua
0c1ab3fbb1 powershell: fixes for first time launch 2022-11-06 11:34:27 +03:30
David Refoua
96ca7cea4a enhance cmder prompt 2022-10-24 19:58:46 +03:30
David Refoua
9d76f99dcf
closes #2756 2022-10-16 00:44:58 +03:30
David Refoua
8d4afb0570
fix problem with #2756 2022-10-16 00:02:38 +03:30
David Refoua
7f682653e4
consistency with powershell conventions;
* use "PS" instead of no-width "$([char]0x200B)" character in prompt (credit @skycommand)

* fixes additional space after the lambada and before the path

* display "PS" before path to distinguish between PowerShell and CMD
2022-10-15 12:32:52 +03:30
dgames
357e51acd1 spelling fixes 2022-01-15 11:00:58 -05:00
dgames
004535e0bc remove -all 2021-11-21 13:40:53 -05:00
Dax T Games
9f065a63e8
Ps1 git discovery (#2438)
* Fix start errors in path with ()

* Fix start errors in path with ()

* Fix start errors in path with ()

* Fix start errors in path with ()

* remove quotes from debug_output messages

* remove quotes from debug_output messages

* remove quotes from debug_output messages

* discovery newer git version

* new git path config for powershell

* xxx

* add isGitShim

* fix no git found in path

* debug

* revert not ps1 changes

* cleanup

* final

* spacing

* fixes

* cleanup

* cleanup

* timer for Powershell

* fixes

* fixes for git path settings

* grab vendor/bin/alias.cmd from master

Co-authored-by: Dax T. Games <dtgaes@kinggeek.org>
Co-authored-by: dgames <dgames@dtg.local>
2021-11-16 14:22:17 +00:00
Dax T Games
937874f03c
Revert "Revert "Update profile.ps1"" 2020-08-13 07:29:24 -04:00
Dax T Games
829a65f552
Revert "Update profile.ps1" 2020-08-13 07:08:20 -04:00
mcnubblet
3f6aa3b348 Update profile.ps1
Set utf-8 BOM in profile.ps1 to fix incorrect prompt display in PowerShell
2020-08-13 14:05:49 +10:00
Dax T. Games
c332ab1a34 Fix bug introduced in 1.3.15 2020-07-01 16:24:36 -04:00
Dax T. Games
44bc089ee4 move lambda to cmder prompt method for easier user change 2019-11-03 14:14:47 -05:00
Dax T. Games
6ab4599a4d separate powershell functions from profile.ps1 2019-11-03 13:07:20 -05:00
Dax T. Games
661f59d0fb Fix #2191 profile.ps1: CheckGit does not export $gitLoaded 2019-11-03 12:36:28 -05:00
Greg Lucas
7f69f15637 Fix #2192: Set default prompt hooks before loading user profile 2019-10-22 11:17:13 -04:00
Dax T Games
19a2fd11e3 Clink Completions 0.3.4 (#2177)
* update Changelog, clink-completions 0.3.4, fix ps fg color

* Update CHANGELOG.md

* Update CHANGELOG.md
2019-09-28 02:21:47 +02:00
Dax T. Games
345562dbd0 Merge branch 'ps1_prompt' of https://github.com/daxgames/cmder into ps1_prompt 2019-03-31 16:48:10 -04:00
Dax T. Games
13de4924ca make powershell use of bash commands more bash like 2019-03-31 16:47:36 -04:00
Dax T. Games
081624d88e cleanup 2019-03-23 15:03:44 -04:00
Dax T. Games
98a64b71b2 Allow full ps1 prompt customization by 'config/*.ps1' scripts 2019-03-16 13:52:47 -04:00
Cody Ray Hoeft
0c9e0e2f8c Use default files for default user profiles 2018-12-13 12:13:17 -08:00
Dax T. Games
7203671fc9 fix powershell profile.d 2018-11-17 19:55:24 -05:00
Merlin
cb78f0486a Remove duplicate Install-Module detection
Block was inserted twice.
2018-11-03 02:15:03 +01:00
Dax T Games
3a11d45552 add diag helper scripts and adds to the path (#1918)
These scripts are to help us help our users by getting a relative picture of their environment that they can submit with an incident.
2018-11-02 14:00:40 +01:00
Dax T Games
49da3745bc Fix #1806 #1675 (#1870)
## Rename user-profile.* user_profile.* to resolve #1806, #1675

* This is a backward compatible fix and will automatically and silently rename users '%cmder_root%/config/user-profile.\*' to '%cmder_root%/config/user_profile.\*' and '[user_specified_config_root]/user-profile.\*' to '[user_specified_config_root]/user_profile.\*' if the sources exist.

  * Cmder.exe does this for cmd.exe sessions.
  * The init scripts for bash and Powershell handles it for these shells
2018-09-01 00:02:56 +02:00
Dmitri S. Guskov
34bb62409a
Update profile.ps1
Fixes Powershell 5.1 error when Windows Software Restriction Policy is enabled:

bin\vendor\profile.ps1 : Cannot dot-source this command because it was defined in a different language mode. To invoke this command without importing its contents, omit the '.'  operator.
At line:1 char:1
+ . 'bin\vendor\conemu-maximus5\..\profi ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [profile.ps1], NotSupportedException
    + FullyQualifiedErrorId : DotSourceNotSupported,profile.ps1
2018-08-29 14:38:59 +03:00
Dax T Games
27f51f48a4 Profile.ps1 (#1796)
* Fix GIT_INSTALL_ROOT again

* fix profile.ps1
2018-06-03 00:15:33 +02:00
Dax T. Games
65bf25f1d0 fix bash and powershell init scripts 2018-04-03 14:17:34 -04:00
Dax T Games
997e799138 New cmder.exe args and shared install capability (#1696)
@MartiUK: Squashing to avoid adding multiple "fixed" commits

* add args to init.bat

* adding args to cmder launcher

* reworked command line parsing and added a /C [path] arg for individual user config location

* removed unnecessary includes

* make shell init scripts work with CMDER_USER_CONFIG

* update tasks and readme.md

* fix git version check

* readme updates

* add register/unregister back in

* fixed git version again

* removed error if user defines user-aliases store file was not present an init.bat launch

* added enhance_path method to only update path if required

* added enhance_path method to only update path if required

* fixed a path prepend issue in enhance path

* init.bat with args is executed outside cmder/conemu sets cmder_root properly. Thanks @DRSDavidSoft

* fixed enhance path append issue

* implements recursive `/bin` path enhancing.

https://github.com/cmderdev/cmder/issues/1624

* added max depth

* changes command line arg to max_depth

* set max_depth default

* readme.md updates

* add back cmder /c [path] arg so it can be used with admin sessions since the env is not shared.

* readme.md updates

* fix /c setting of cmder_user_config

* changelog and readme

* remove bad arg

* fixed command line parsing and updated command line help on error

* Fixed ConEmu.xml file handling so it works again

* Added default user config root location if '/c' is specified and next arg is not another arg
2018-03-13 16:38:27 +01:00
David Driscoll
badb027c24 use /dir Switch instead of CMDER_START 2018-01-09 14:50:46 +01:00
Jack
7479d620b1
Merge pull request #1417 from gucong3000/patch-2
Compatible with Visual Studio Code (PowerShell) integrated terminal.
2017-10-31 21:09:23 +00:00
Pero Pejovic
68d9425c89 Avoid using aliases in profile.ps1
Aliases such as `ls` may have been overridden in the user's profile script and the resulting behavior may be different from `Get-ChildItem`. For example binding `ls` to GNU `ls.exe` generates an error if there are no matching files.
2017-10-28 14:18:09 +02:00
刘祺
7ca2f5503a Merge branch 'master' into patch-2
# Conflicts:
#	vendor/profile.ps1
2017-08-03 18:32:44 +08:00
Benjamin Staneck
8077c1a612 Merge pull request #1441 from pyranja/fix-psget-clobbering
Avoid clobbering Install-Module
2017-07-15 02:08:09 +02:00
Chrs Borckholder
815b99b98b Avoid clobbering Install-Module
If the Install-Module command is available, do not include the bundled
module path containing a deprecated version of PSGet. Recent powershell
versions include PowerShellGet as standard module installer.

Resolve #1318.
2017-07-14 12:06:48 +02:00
刘祺
a7237370e3 Compatible with Visual Studio Code (PowerShell) 2017-06-23 18:39:36 +08:00
Brian Dukes
7f4a4d34d6
Allow user-profile.ps1 and profile.d/*.ps1 files to override prompt
This defines the default prompt variables ($PrePrompt, $PostPrompt,
$CmderPrompt, and $Prompt) before running the custom scripts (user-profile.ps1
and profile.d/*.ps1), and then saves those prompt values after running the
custom scripts.  This gives the custom scripts and opportunity to override the
prompt code blocks.

This now opens the possibility for profile.d/*.ps1 scripts to affect the
prompt, and also allows both user-profile.ps1 and profile.d/*.ps1 scripts to
overwrite the $Prompt script block and overwrite the prompt behavior entirely.
2017-03-08 14:14:35 -06:00
Jackbennett
db909451c9 Version Check the Posh-Git module to allow module autoloading
Posh-Git before this release does not export `Write-VcsStatus` thus
powershell's autoloading cannot find the reqired module for the function.

note that `get-module -listAvailable` can return an array of multiple
versions.
2016-10-10 12:01:55 +01:00
Jackbennett
b349b19869 Describe why PS functions are called by namespace
As the prompt function is called all the time, specifically namespace the
cmldets it uses to avoid them being hijacked in the user session.
2016-10-10 10:30:01 +01:00
Jackbennett
010049a849 Set window title to current folder unless there's git information.
Unfortunately doesn't apply to conEmu's tab name.
2016-05-27 09:47:34 +01:00
Jackbennett
7a0a1adc02 Use checkGit to hold the git state. Import posh-git at the last minute.
Import-Git now finds if the module isn't installed at all and alerts the
user. But only when in a git folder.
2016-05-23 14:53:34 +01:00
Jackbennett
76b2ed510d If you start doing remote work you can fire off your own start-sshAgent command. 2016-05-23 14:51:55 +01:00