gardebring / PowerColorLS

PowerShell script to display a colorized directory and file listing with icons
MIT License
61 stars 3 forks source link

For some cases, icons are not displayed #7

Closed haosmos closed 3 years ago

haosmos commented 3 years ago

Hi! 😃

For some reason, in some cases, icons in folders are not displayed.

I am using PowerColorLS version 1.0.2 and terminal-icons version 0.5.1

I'm using PowerShell 7.2.0-preview.6

Here is my powershell profile file with the settings:

# $global:DefaultUser = [System.Environment]::UserName
$env:POSH_SESSION_DEFAULT_USER = [System.Environment]::UserName

Import-Module posh-git

Import-Module oh-my-posh

Set-PoshPrompt -Theme ~/.oh-my-posh.omp.json

Import-Module PSReadLine

Import-Module Terminal-Icons

Import-Module PowerColorLS

# Shows navigable menu of all options when hitting Tab
Set-PSReadLineKeyHandler -Key Tab -Function MenuComplete

# Autocompleteion for Arrow keys
Set-PSReadLineOption -HistorySearchCursorMovesToEnd
Set-PSReadLineKeyHandler -Key UpArrow -Function HistorySearchBackward
Set-PSReadLineKeyHandler -Key DownArrow -Function HistorySearchForward

Set-PSReadLineOption -ShowToolTips
Set-PSReadLineOption -PredictionSource History

#Set the color for Prediction (auto-suggestion)
Set-PSReadlineOption -Colors @{Prediction = "#0bda51" }

Set-PSReadLineOption -Colors @{
  Command            = '#00ff00'
  Number             = '#0ee7ff'
  Member             = '#ffff00'
  Operator           = '#08e8de'
  Type               = '#c72fff'
  Variable           = '#c0ff2f'
  Parameter          = '#fde910'
  ContinuationPrompt = 'DarkGray'
  Default            = '#30d5c8'
}

# Import-Module Get-ChildItemColor

function PowerColorLSWithParams([string] $query = ".") {
  PowerColorLS $query -l -ds -sd -a
}

Set-Alias -Name ls -Value PowerColorLSWithParams -Option AllScope
Set-Alias -Name which -Value Get-Command
# If (-Not (Test-Path Variable:PSise)) {
#   # Only run this in the console and not in the ISE
#   Import-Module Get-ChildItemColor

#   Set-Alias l Get-ChildItem -option AllScope
#   Set-Alias ls Get-ChildItemColorFormatWide -option AllScope
# }

# Import-Module PoshColor

Import-Module z

WindowsTerminal_m5ZBuGI2QC WindowsTerminal_Xi9MBcSqxI

gardebring commented 3 years ago

Hi @haosmos , thanks for reporting an issue. It is however unclear to me what the issue is. You say "in some cases, icons in folders are not displayed" and you provide screenshots. From what I can see from the screenshot the icons for the js, json, md and html files are displayed correctly? What am I missing here? Looking forward to your reply :)

haosmos commented 3 years ago

Hi! 😃

Sorry, I thought the html5 icon was supposed to be displayed instead of the brackets)

It's ok, sorry for the inconvenience) 🙏

Thanks for your cool project! 👍

gardebring commented 3 years ago

Hi! 😃

Sorry, I thought the html5 icon was supposed to be displayed instead of the brackets)

It's ok, sorry for the inconvenience) 🙏

Thanks for your cool project! 👍

Alright. No worries, no inconvenience caused :) I'm glad you enjoy the project :-)