Fix 'ls' functionality in pwsh6 so that 'ls' acts like linux ls, and 'ls -la' functions at all

This commit is contained in:
jowj 2018-04-07 18:54:25 -05:00
parent d0c008a1a8
commit 17b43738b3

View File

@ -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 # Run commands
Set-UserPrompt Set-UserPrompt
set-alias clerr Clear-Error set-alias clerr Clear-Error
#C:\Users\me\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1 #C:\Users\me\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1
remove-alias "ls"
# Chocolatey profile # Chocolatey profile
$ChocolateyProfile = "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1" $ChocolateyProfile = "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1"
@ -283,3 +292,4 @@ if (Test-Path($ChocolateyProfile)) {
} }
Import-Module 'C:\tools\poshgit\dahlbyk-posh-git-a4faccd\src\posh-git.psd1' Import-Module 'C:\tools\poshgit\dahlbyk-posh-git-a4faccd\src\posh-git.psd1'