From 17b43738b33e63d55b0b2677ed93fe9b3198524d Mon Sep 17 00:00:00 2001 From: jowj Date: Sat, 7 Apr 2018 18:54:25 -0500 Subject: [PATCH] Fix 'ls' functionality in pwsh6 so that 'ls' acts like linux ls, and 'ls -la' functions at all --- .powershellCore.ps1 | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.powershellCore.ps1 b/.powershellCore.ps1 index 41fa8bb..2110fdb 100644 --- a/.powershellCore.ps1 +++ b/.powershellCore.ps1 @@ -270,11 +270,20 @@ function Test-ProgressBar { } } +# make 'ls -la' actually work in powershell since i type it by +# default all the fucking time: +function ls { + param( + [switch] $la + ) + get-childitem +} # Run commands Set-UserPrompt set-alias clerr Clear-Error #C:\Users\me\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1 +remove-alias "ls" # Chocolatey profile $ChocolateyProfile = "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1" @@ -282,4 +291,5 @@ if (Test-Path($ChocolateyProfile)) { Import-Module "$ChocolateyProfile" } -Import-Module 'C:\tools\poshgit\dahlbyk-posh-git-a4faccd\src\posh-git.psd1' \ No newline at end of file +Import-Module 'C:\tools\poshgit\dahlbyk-posh-git-a4faccd\src\posh-git.psd1' +