Giter Club home page Giter Club logo

terminal-icons's Introduction

Terminal-Icons

A PowerShell module to show file and folder icons in the terminal.

GitHub Actions PSGallery License
GitHub Actions Status PowerShell Gallery License

Icon

Overview

Terminal-Icons is a PowerShell module that adds file and folder icons when displaying items in the terminal. This relies on the custom fonts provided by Nerd Fonts.

You must be using one of the fonts provided by Nerd Fonts for this module to work as these fonts include tons of custom glyphs/icons that are referenced by their unicode number.

How Does this Work?

It uses a custom format.ps1xml file that inspects the items being displayed and looks up their appropriate icon based on name or extension. Icons for well-known files/folders are attempted to be used first before displaying an icon based on the file extension. Any files/folders that are not matched are shown using a generic file or folder icon.

Installation

To install the module from the PowerShell Gallery:

Install-Module -Name Terminal-Icons -Repository PSGallery

You can also install it from Scoop:

scoop bucket add extras
scoop install terminal-icons

Usage

Import-Module -Name Terminal-Icons

Get-Item ./README.md

Get-ChildItem

Get-ChildItem | Format-List

Get-ChildItem | Format-Wide

Commands

Command Description
Add-TerminalIconsColorTheme Add a Terminal-Icons color theme for the current user.
Add-TerminalIconsIconTheme Add a Terminal-Icons icon theme for the current user.
Format-TerminalIcons Prepend a custom icon (with color) to the provided file or folder object when displayed.
Get-TerminalIconsColorTheme List the available color themes.
Get-TerminalIconsIconTheme List the available icon themes.
Get-TerminalIconsTheme Get the currently applied color and icon theme.
Remove-TerminalIconsTheme Removes a given icon or color theme.
Set-TerminalIconsColorTheme DEPRECATED Set the Terminal-Icons color theme.
Set-TerminalIconsIconTheme DEPRECATED Set the Terminal-Icons icon theme.
Set-TerminalIconsTheme Set the Terminal-Icons icon and/or color theme.
Show-TerminalIconsTheme List example directories and files to show the currently applied color and icon themes.

Screenshots

Get-ChildItem -Path . -Force

Screenshot 1

Tips

If using the default console in Windows and not something like VSCode, ConEmu, Terminus, etc., you may have issues getting a nerd font to be recognized correctly. Try following this quick guide by Mark Wragg. Issue #269 on Nerd Fonts has more information.

Contributions

Any ideas on how to improve this module are welcome. If you have ideas for an appropriate glyph to display for a well-known folder or file, or a particular file extension, please raise an issue. If you'd like to submit an entirely new color or icon theme, take a look at the existing ones here and here, create your new file(s) named what ever you like, and submit a pull request.

terminal-icons's People

Contributors

corbob avatar devblackops avatar edm115 avatar gaardhus avatar hexeption avatar karankad avatar kkoziarski avatar mjecloud avatar mwallner avatar nikouu avatar rashil2000 avatar sanamhub avatar sitiom avatar tamkenghong avatar tiberriver256 avatar tillig avatar tradiff avatar wangkanai avatar zanseb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

terminal-icons's Issues

Add Visual Studio Solution filter file extension (.slnf)

Expected Behavior

Showing nf-dev-visualstudio icon for .slnf files.

Current Behavior

.slnf files are not handled and default icon is displayed

Possible Solution

In devblackops.psd1 add line:

'.slnf' = 'nf-dev-visualstudio'

Context

Handling and displaying proper icon for .slnf files.

Add icon for R language files

Hi!

I just started using Powershell and installed this awesome module. I work a lot with R scripts and I'd like if (in future versions) you can add icons for this kind of files. Locally, I added a few lines for the icon and color for R files. I couldn't find nice icons for RMarkdown (.rmd) and Rproj (.Rproj) files, so I just added what I had.

The icon I'm using (locally) for R files is 'nf-mdi-language_r' and for the color I choose '276DC2'

Thanks!

Glyphs are not rendered correctly

2021-04-12_08h57_15

Expected Behavior

The glyphs are rendered correctly in Windows Terminal.

Current Behavior

It seems that the glyphs are not recognized at all in Windows Terminal. I have both FiraCode Nerd Font and Caskaydia Cove Nerd Font installed and these fonts do successfully work in VS Code, Rider and Visual Studio.

Steps to Reproduce (for bugs)

  1. I had both FiraCode Nerd Font and Caskaydia Cove Nerd Font installed, as well as Oh my Posh 3.
  2. I've installed Terminal-Icons via Install-Module -Name Terminal-Icons -Repository PSGallery
  3. I've added the new module to my profile $profile: Import-Module -Name Terminal-Icons
  4. Restart of complete machine

Your Environment

  • Module version used: I guess 0.3.0 - I've executed Install-Module -Name Terminal-Icons -Repository PSGallery
  • Operating System and PowerShell version:
    • Windows 10 Version 1909, OS Build 18363.1440
    • PowerShell Core 7.1.3
    • Windows Terminal 1.6.10571.0

XML glyph renders with an extra space before filename

Expected Behavior

Most of the icons render in a single character width; I expect the XML icon to also render in one character.

Current Behavior

On both Windows (PowerShell 7.1.3 / Windows Terminal) and Mac (PowerShell 7.1.3 / iTerm2) the XML icons appear to insert a leading space before the filename. Other icons don't do that.

Here's JetBrainsMono Nerd Font:

JetBrainsMono Nerd Font

Here's FiraCode Nerd Font:

FiraCode Nerd Font

It doesn't seem to matter about the font or the terminal, there's always that extra space.

Possible Solution

I'm not sure if it's a double-character glyph where the extra space is an artifact or if there's a hidden character in the icon theme I haven't seen yet. Double-wide glyphs can get weird.

Steps to Reproduce (for bugs)

  1. Set up your terminal to use FiraCode Nerd Font or JetBrainsMono Nerd Font. Doesn't seem to matter if it's Mac or Windows.
  2. List a folder with an XML file in it.

Context

New user of the module, just noticed the odd spacing when listing a folder.

Your Environment

  • Module version used: 0.4.0
  • Operating System and PowerShell version: MacOS Big Sur 11.2.3, PowerShell 7.1.3, iTerm2

Request: Light theme

Provide a light mode (black on white) option/theme for those who don't dabble in the dark arts.

Feature request | Adding formatted Length output for files and folders

Thanks a lot for creating such a nice module. Something I'm missing a bit when using Terminal-Icons is having a formatted Length output, indicating the size of files and folders in B|KB|MB|GB respectively.
I have created a pull request with a modified Terminal-Icons.format.ps1xml file to add this.

Slow import

Import-Module Terminal-Icons command takes a usually 2-3 seconds, and therefore slows down the PowerShell load times when put in the '$PROFILE'. I'm on pretty beefy machine so hardware is not an issue.

Expected Behavior

It shouldn't take that long.

Current Behavior

The output of Measure-Command { Import-Module Terminal-Icons } is 'TotalMilliseconds : 2118.1497' for example.

Possible Solution

I think the culprit is the 'Terminal-Icons/Data/glyphs.ps1' file. It's too long and most of the nerd font icons aren't even used. To decrease load time we should source only those icons that are being used in the 'Terminal-Icons/Data/iconThemes/devblackops.psd1' file.

Context

PowerShell ends up taking too long to start, which hampers its usage.

Your Environment

  • Module version used: 0.1.1
  • Operating System: Windows 10.0.19041.0
  • PowerShell version: 5.1.19041.546

Importing Terminal-Icons is not successful

When Improting the Terminal-Icons Module i get the error message as seen in the screenshot.

Expected Behavior

The Module should Import without errors

Current Behavior

The module doesn't load correctly

I already tryed reinstalling the Module multiple times.

image

Your Environment

  • Module version used:
    Version 0.5.2
  • Operating System and PowerShell version:

Windows 10
Powershell Version 5.1.19041.1151

Unable to Import

Expected Behavior

Imports without error and if anything required is missing, let us know.

Current Behavior

Sea of red

[90 ms] C:\github\dbatools> ipmo terminal-icons
At C:\Program Files\WindowsPowerShell\Modules\terminal-icons\0.1.0\Data\glyphs.ps1:23 char:6
+     'nf-dev-appstore'                                = ''
+      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Unexpected token 'nf-dev-appstore'                                = ''
    'nf-dev-aptana'                                  = 'îž™'
    'nf-dev-asterisk'                                = ''
    'nf-dev-atlassian'                               = '�'
    'nf-dev-atom'                                    = '�'
    'nf-dev-aws'                                     = 'îž­'
    'nf-dev-backbone'                                = '�'
    'nf-dev-bing_small'                              = ''
    'nf-dev-bintray'                                 = 'îž'
    'nf-dev-bitbucket'                               = ''
    'nf-dev-blackberry'                              = ''
    'nf-dev-bootstrap'                               = '�'
    'nf-dev-bower'                                   = '�'
    'nf-dev-brackets'                                = '�'
    'nf-dev-bugsense'                                = '�'
    'nf-dev-celluloid'                               = '�'
    'nf-dev-chart'                                   = 'î�' in expression or statement.
At C:\Program Files\WindowsPowerShell\Modules\terminal-icons\0.1.0\Data\glyphs.ps1:23 char:6
+     'nf-dev-appstore'                                = 'îœ'
+      ~
The hash literal was incomplete.
At C:\Program Files\WindowsPowerShell\Modules\terminal-icons\0.1.0\Data\glyphs.ps1:124 char:6
+     'nf-dev-krakenjs'                                = 'îž…'
+      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Unexpected token 'nf-dev-krakenjs'                                = 'îž…'
    'nf-dev-krakenjs_badge'                          = 'îž'
    'nf-dev-laravel'                                 = ''
    'nf-dev-less'                                    = '�'
    'nf-dev-linux'                                   = ''
    'nf-dev-magento'                                 = '�'
    'nf-dev-mailchimp'                               = 'îžš'
    'nf-dev-markdown'                                = ''
    'nf-dev-materializecss'                          = ''
    'nf-dev-meteor'                                  = ''
    'nf-dev-meteorfull'                              = ''
    'nf-dev-mitlicence'                              = 'îž‹'
    'nf-dev-modernizr'                               = ''
    'nf-dev-mongodb'                                 = ''
    'nf-dev-mootools'                                = '�'
    'nf-dev-mootools_badge'                          = '�'
    'nf-dev-mozilla'                                 = ''
    'nf-dev-msql_server'                             = '�'
    'nf-dev-mysql'                                   = 'îœ'
    'nf-dev-nancy'                                   = '�'
    'nf-dev-netbeans'                                = 'îž›'
    'nf-dev-netmagazine'                             = ''
    'nf-dev-nginx'                                   = '�'
    'nf-dev-nodejs'                                  = ''
    'nf-dev-nodejs_small'                            = ''
    'nf-dev-npm'                                     = ''
    'nf-dev-onedrive'                                = '�'
    'nf-dev-openshift'                               = 'îž·'
    'nf-dev-opensource'                              = '�'
    'nf-dev-opera'                                   = '�'
    'nf-dev-perl'                                    = '�'
    'nf-dev-phonegap'                                = ''
    'nf-dev-photoshop'                               = ''
    'nf-dev-php'                                     = ''
    'nf-dev-postgresql'                              = '�'
    'nf-dev-prolog'                                  = 'îž¡'
    'nf-dev-python'                                  = ''
    'nf-dev-rackspace'                               = 'îž¹'
    'nf-dev-raphael'                                 = '�'
    'nf-dev-rasberry_pi'                             = ''
    'nf-dev-react'                                   = ''
    'nf-dev-redhat'                                  = 'îž»'
    'nf-dev-redis'                                   = '�'
    'nf-dev-requirejs'                               = '�'
    'nf-dev-responsive'                              = 'îž—'
    'nf-dev-ruby'                                    = ''
    'nf-dev-ruby_on_rails'                           = ''
    'nf-dev-ruby_rough'                              = 'îž'' in expression or statement.
At C:\Program Files\WindowsPowerShell\Modules\terminal-icons\0.1.0\Data\glyphs.ps1:209 char:6
+     'nf-dev-zend'                                    = '�'
+      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Unexpected token 'nf-dev-zend'                                    = '�'
    'nf-fa-500px'                                    = ''
    'nf-fa-address_book'                             = ''
    'nf-fa-address_book_o'                           = ''
    'nf-fa-address_card'                             = ''
    'nf-fa-address_card_o'                           = ''
    'nf-fa-adjust'                                   = 'ï�'' in expression or statement.
At C:\Program Files\WindowsPowerShell\Modules\terminal-icons\0.1.0\Data\glyphs.ps1:231 char:6
+     'nf-fa-angle_down'                               = 'ï‡'
+      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Unexpected token 'nf-fa-angle_down'                               = 'ï'
    'nf-fa-angle_left'                               = 'ï'
    'nf-fa-angle_right'                              = 'ï…'
    'nf-fa-angle_up'                                 = 'ï'
    'nf-fa-apple'                                    = 'ï…¹'
    'nf-fa-archive'                                  = ''
    'nf-fa-area_chart'                               = ''
    'nf-fa-arrow_circle_down'                        = 'ï«'
    'nf-fa-arrow_circle_left'                        = 'ï¨'
    'nf-fa-arrow_circle_o_down'                      = ''
    'nf-fa-arrow_circle_o_left'                      = '�'
    'nf-fa-arrow_circle_o_right'                     = ''
    'nf-fa-arrow_circle_o_up'                        = ''
    'nf-fa-arrow_circle_right'                       = 'ï©'
    'nf-fa-arrow_circle_up'                          = 'ïª'
    'nf-fa-arrow_down'                               = '�'
    'nf-fa-arrow_left'                               = '�'
    'nf-fa-arrow_right'                              = '�'
    'nf-fa-arrow_up'                                 = '�'
    'nf-fa-arrows'                                   = '�'
    'nf-fa-arrows_alt'                               = 'ï²'
    'nf-fa-arrows_h'                                 = '�'
    'nf-fa-arrows_v'                                 = '�'
    'nf-fa-asl_interpreting'                         = ''
    'nf-fa-assistive_listening_systems'              = ''
    'nf-fa-asterisk'                                 = '�'
    'nf-fa-at'                                       = ''
    'nf-fa-audio_description'                        = ''
    'nf-fa-automobile'                               = ''
    'nf-fa-backward'                                 = '�'
    'nf-fa-balance_scale'                            = ''
    'nf-fa-ban'                                      = '�'
    'nf-fa-bandcamp'                                 = 'ï‹•'
    'nf-fa-bank'                                     = ''
    'nf-fa-bar_chart'                                = 'ï'
    'nf-fa-bar_chart_o'                              = 'ï'
    'nf-fa-barcode'                                  = ''
    'nf-fa-bars'                                     = ''
    'nf-fa-bath'                                     = '�'
    'nf-fa-bathtub'                                  = '�'
    'nf-fa-battery'                                  = ''
    'nf-fa-battery_0'                                = ''
    'nf-fa-battery_1'                                = ''
    'nf-fa-battery_2'                                = ''' in expression or statement.
At C:\Program Files\WindowsPowerShell\Modules\terminal-icons\0.1.0\Data\glyphs.ps1:280 char:6
+     'nf-fa-battery_quarter'                          = ''
+      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Unexpected token 'nf-fa-battery_quarter'                          = ''
    'nf-fa-battery_three_quarters'                   = '�'
    'nf-fa-bed'                                      = ''
    'nf-fa-beer'                                     = ''
    'nf-fa-behance'                                  = ''
    'nf-fa-behance_square'                           = ''
    'nf-fa-bell'                                     = ''
    'nf-fa-bell_o'                                   = 'ï¢'' in expression or statement.
At C:\Program Files\WindowsPowerShell\Modules\terminal-icons\0.1.0\Data\glyphs.ps1:306 char:6
+     'nf-fa-braille'                                  = ''
+      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Unexpected token 'nf-fa-braille'                                  = ''
    'nf-fa-briefcase'                                = 'ï±'' in expression or statement.
At C:\Program Files\WindowsPowerShell\Modules\terminal-icons\0.1.0\Data\glyphs.ps1:312 char:59
+     'nf-fa-bullhorn'                                 = 'ï¡'
+                                                           ~~
Unexpected token '¡'
    'nf-fa-bullseye'                                 = 'ï…€'
    'nf-fa-bus'                                      = ''
    'nf-fa-buysellads'                               = '�'
    'nf-fa-cab'                                      = ''
    'nf-fa-calculator'                               = ''
    'nf-fa-calendar'                                 = '�'
    'nf-fa-calendar_check_o'                         = ''
    'nf-fa-calendar_minus_o'                         = ''
    'nf-fa-calendar_o'                               = 'ï³'
    'nf-fa-calendar_plus_o'                          = ''
    'nf-fa-calendar_times_o'                         = ''
    'nf-fa-camera'                                   = ''
    'nf-fa-camera_retro'                             = ''
    'nf-fa-car'                                      = ''
    'nf-fa-caret_down'                               = ''
    'nf-fa-caret_left'                               = ''
    'nf-fa-caret_right'                              = ''
    'nf-fa-caret_square_o_down'                      = 'ï…�'
    'nf-fa-caret_square_o_left'                      = ''
    'nf-fa-caret_square_o_right'                     = 'ï…’'
    'nf-fa-caret_square_o_up'                        = 'ï…‘'
    'nf-fa-caret_up'                                 = ''
    'nf-fa-cart_arrow_down'                          = ''
    'nf-fa-cart_plus'                                = ''
    'nf-fa-cc'                                       = ''
    'nf-fa-cc_amex'                                  = ''
    'nf-fa-cc_diners_club'                           = ''
    'nf-fa-cc_discover'                              = ''
    'nf-fa-cc_jcb'                                   = ''
    'nf-fa-cc_mastercard'                            = ''
    'nf-fa-cc_paypal'                                = ''
    'nf-fa-cc_stripe'                                = ''
    'nf-fa-cc_visa'                                  = ''
    'nf-fa-certificate'                              = 'ï‚£'
    'nf-fa-chain'                                    = '�'
    'nf-fa-chain_broken'                             = 'ï§'
    'nf-fa-check'                                    = ''
    'nf-fa-check_circle'                             = '�'
    'nf-fa-check_circle_o'                           = '�'
    'nf-fa-check_square'                             = 'ï…Š'
    'nf-fa-check_square_o'                           = '�'
    'nf-fa-chevron_circle_down'                      = 'ïº'
    'nf-fa-chevron_circle_left'                      = 'ï·'
    'nf-fa-chevron_circle_right'                     = 'ï¸'
    'nf-fa-chevron_circle_up'                        = 'ï¹'
    'nf-fa-chevron_down'                             = '�'
    'nf-fa-chevron_left'                             = 'ï�'
    'nf-fa-chevron_right'                            = 'ï�'
    'nf-fa-chevron_up'                               = '�'
    'nf-fa-child'                                    = ''
    'nf-fa-chrome'                                   = ''
    'nf-fa-circle'                                   = 'ï‘'
    'nf-fa-circle_o'                                 = 'ïŒ'
    'nf-fa-circle_o_notch'                           = ''
    'nf-fa-circle_thin'                              = ''
    'nf-fa-clipboard'                                = ''
    'nf-fa-clock_o'                                  = ''
    'nf-fa-clone'                                    = '�'
    'nf-fa-close'                                    = '�'
    'nf-fa-cloud'                                    = 'ïƒ'' in expression or statement.
At C:\Program Files\WindowsPowerShell\Modules\terminal-icons\0.1.0\Data\glyphs.ps1:382 char:59
+     'nf-fa-cogs'                                     = 'ï'
+                                                           ~~
Unexpected token ''
    'nf-fa-columns'                                  = ''
    'nf-fa-comment'                                  = '�'
    'nf-fa-comment_o'                                = ''
    'nf-fa-commenting'                               = ''
    'nf-fa-commenting_o'                             = ''
    'nf-fa-comments'                                 = 'ï'' in expression or statement.
At C:\Program Files\WindowsPowerShell\Modules\terminal-icons\0.1.0\Data\glyphs.ps1:397 char:59
+     'nf-fa-credit_card'                              = 'ï'
+                                                           ~~
Unexpected token ''
    'nf-fa-credit_card_alt'                          = ''
    'nf-fa-crop'                                     = 'ï¥'
    'nf-fa-crosshairs'                               = '�'
    'nf-fa-css3'                                     = 'ï¼'
    'nf-fa-cube'                                     = ''
    'nf-fa-cubes'                                    = ''
    'nf-fa-cut'                                      = 'ïƒ'
    'nf-fa-cutlery'                                  = ''
    'nf-fa-dashboard'                                = ''
    'nf-fa-dashcube'                                 = '�'
    'nf-fa-database'                                 = ''
    'nf-fa-deaf'                                     = ''
    'nf-fa-deafness'                                 = ''
    'nf-fa-dedent'                                   = ''
    'nf-fa-delicious'                                = ''
    'nf-fa-desktop'                                  = 'ïˆ'
    'nf-fa-deviantart'                               = ''
    'nf-fa-diamond'                                  = ''
    'nf-fa-digg'                                     = ''
    'nf-fa-dollar'                                   = 'ï…•'
    'nf-fa-dot_circle_o'                             = 'ï†'' in expression or statement.
Not all parse errors were reported.  Correct the reported errors and try again.
    + CategoryInfo          : ParserError: (:) [], ParseException
    + FullyQualifiedErrorId : UnexpectedToken

Resolve-Path : Cannot find path 'C:\github\dbatools\devblackops.psd1' because it does not exist.
At C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules\Microsoft.PowerShell.Utility\Microsoft.PowerShell.Utility.psm1:544 char:35
+         foreach($resolvedPath in (Resolve-Path @PSBoundParameters))
+                                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (C:\github\dbatools\devblackops.psd1:String) [Resolve-Path], ItemNotFoundException
    + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.ResolvePathCommand

You cannot call a method on a null-valued expression.
At C:\Program Files\WindowsPowerShell\Modules\terminal-icons\0.1.0\Terminal-Icons.psm1:41 char:5
+     $colorData.Types.Directories.WellKnown.GetEnumerator().ForEach({
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : InvokeMethodOnNull

You cannot call a method on a null-valued expression.
At C:\Program Files\WindowsPowerShell\Modules\terminal-icons\0.1.0\Terminal-Icons.psm1:52 char:5
+     $colorData.Types.Files.WellKnown.GetEnumerator().ForEach({
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : InvokeMethodOnNull

You cannot call a method on a null-valued expression.
At C:\Program Files\WindowsPowerShell\Modules\terminal-icons\0.1.0\Terminal-Icons.psm1:63 char:5
+     $colorData.Types.Files.GetEnumerator().Where({$_.Name -ne 'WellKn ...
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : InvokeMethodOnNull

Resolve-Path : Cannot find path 'C:\github\dbatools\devblackops.psd1' because it does not exist.
At C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules\Microsoft.PowerShell.Utility\Microsoft.PowerShell.Utility.psm1:544 char:35
+         foreach($resolvedPath in (Resolve-Path @PSBoundParameters))
+                                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (C:\github\dbatools\devblackops.psd1:String) [Resolve-Path], ItemNotFoundException
    + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.ResolvePathCommand

[1.64 s] C:\github\dbatools>

Possible Solution

No idea, but catch whatever I did wrong and let me know how to do it right "Please install xyz font. Any will do but we like Material Design" or something.

Steps to Reproduce (for bugs)

  1. Skim the readme, but not too deeply
  2. Install using Admin privs in Windows 10
  3. Do not install any nerd fonts because you don't know which one but want to see what happens
  4. ipmo terminal-icons as a regular user and as admin
  5. Sea of red but at admin prompt, i had a bunch of empty GCI, plus sea of red

Your Environment

  • Module version used: Current on in PS Gallery - 0.1.0

image

Name                           Value
----                           -----
PSVersion                      5.1.17763.503
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.17763.503
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

XML icon not rendering?

Expected Behavior

XML Icon should render

Current Behavior

image

I've tried DejaVuSansMono and FiraCode and get the same.

Possible Solution

Not sure. Maybe I'm doing something wrong?

Steps to Reproduce (for bugs)

install-module Terminal-Icons
Install-Font -Path .

Your Environment



PSVersionPSEditionPSCompatibleVersionsBuildVersionCLRVersionWSManStackVersionPSRemotingProtocolVersionSerializationVersion
5.1.18362.145DesktopSystem.Version[]10.0.18362.1454.0.30319.420003.02.31.1.0.1



VersionName
0.1.1Terminal-Icons

Remove use of Import-PowerShellDataFile

Expected Behavior

Users of PS4 and above can load the psd1 files.

Current Behavior

Import-PowerShellDataFile is only available in PS5 and above. Even though the module manifest specifies PS4 now, only PS5+ actually will work.

Possible Solution

Remove use of Import-PowerShellDataFile and use another method to load the psd1 files.

Context

Enable the module to run on more PS versions.

Your Environment

  • Module version used: 0.1.1
  • Operating System and PowerShell version: Windows 10 18362.145, PS 6.2.0

Add Julia Icon

Julia files ending in .jl should be marked with the glyph already set as nf-seti-julia.

Expected Behavior

If a file named *.jl is in the directory then it should be accompanied with the nf-seti-julia glyph.

Current Behavior

If a file named *.jl is in the directory then it is accompanied with the plain file glyph.

Possible Solution

Add setting to support Julia source files.

Your Environment

  • Module version used: 0.9.0
  • Operating System and PowerShell version: Windows 11 & PowerShell 7.2.1

PowerShell 7 - Required module "Configuration" is not loaded

Expected Behavior

After installing Terminal-Icons and importing the module in the $profile, Terminal-Icons should be loaded and work.

Current Behavior

The following error is thrown:

Import-Module: C:\Users\xxx\Documents\PowerShell\Microsoft.PowerShell_profile.ps1:6
Line |
   6 |  Import-Module Terminal-Icons
     |  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | The required module 'Configuration' is not loaded. Load the module or remove the module from 'RequiredModules' in the file 'C:\Program
     | Files\WindowsPowerShell\Modules\Terminal-Icons\0.1.1\Terminal-Icons.psd1'.

Steps to Reproduce (for bugs)

  1. Install PowerShell 7
  2. Install-Module Terminal-Icons -Scope CurrentUser
  3. Import-Module Terminal-Icons

Context

Not able to use Terminal-Icons

Your Environment

  • Module version used: 0.1.1
  • Windows 10 with PowerShell 7.0.0

Terminal Icon for files not showing in Windows Terminal

I have installed Terminal-Icons for both Powershell & PowershellCore in WIndows 10 for Windows Terminal. The Nerd font is installed. The Terminal-Icons module is imported in the profile. The terminal is not showing the icon next to filename.
Am I missing something?

image

Mode field on Linux

The Mode field doesn't seem to work well on Linux
Also, would it be possible to also show the user who owns the file/folder ?
image

Cohabit with PoshColor

Hello,

PoshColor seems to overwrite the output of Terminal-Icons, so filetype glyph did not appear. Is there a way to make the two modules cohabit ? I switch from one module to another whenever i have to do a Get-Service or a Get-ChildItem.

I hava also open an issue on the other mods : JustABearOz/PoshColor#6

Regards,
Nicolas

Show-TerminalIconsTheme displays mostly reparse point images on Mac/PowerShelll 7

Expected Behavior

When using Show-TerminalIconsTheme on a Windows machine, the terminal lists some example filenames and icons. I expect it to look like this on Mac using PowerShell Core as well.

Show-TerminalIconsTheme on Windows

Current Behavior

Using iTerm2 with PowerShell Core on Mac, most of the examples show as reparse points/shortcuts.

Show-TerminalIconsTheme on Mac

Both Windows and Mac in these examples are using the Fira Code Nerd Font 2.1.

Possible Solution

I'm guessing it has something to do with the differences in how DirectoryInfo and FileInfo are handled in Mac but I haven't had a chance to dive in.

Steps to Reproduce (for bugs)

  1. On both Windows and Mac install:
  • PowerShell Core
  • Fira Code Nerd Font 2.1
  • Terminal-Icons module
  1. On each respective install...
  • Import-Module Terminal-Icons
  • Show-TerminalIconsTheme

Context

I'm trying to figure out another issue I see where the XML icon seems to take up two characters, inserting a space before every XML file.

XML files have a weird space

Your Environment

  • Module version used: 0.4.0
  • Operating System and PowerShell version:
    • Mac OS Big Sur 11.2.3 / PowerShell 7.1.3 / iTerm 2
    • Windows 10 21359 (Insider Ring) / PowerShell 7.1.3 / Windows Terminal

Windows 11 : Index operation failed; the array index evaluated to null.

Index operation failed; the array index evaluated to null.
At
C:\Users\{Username}\OneDrive\Documents\WindowsPowerShell\Modules\Terminal-Icons\0.5.2\Terminal-Icons.psm1:1163
char:5
+     $userThemeData.Themes.Icon[$userIconTheme.Name] = $userIconTheme
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : NullArrayIndex

warning

Expected Behavior

No warning

Current Behavior

Warning appears.

Possible Solution

How can I disable this warning? Because when I list items with dir, it works.

Steps to Reproduce (for bugs)

  1. Import using PowerShell Profile (Microsoft.PowerShell_profile.ps1)
  2. Launch PowerShell 5 or 7
  3. Error appears: Index operation failed; the array index evaluated to null.
  4. Type 'dir', folders/items icons appear.

Context

Your Environment

  • Module version used: 0.5.2
  • Operating System and PowerShell version: Windows 11 Pro 10.0.22000

Would it possible to skip the icons and use just the colors?

I know this module is literally called Terminal-Icons but I really like the color theme, it is much better than PoshColor, and I don't want any icons.

Expected Behavior

It would be nice if it was possible to set the icon theme property to empty string or $null to disable the icons and get just the colors.

Current Behavior

I have been unable to figure out how to get rid of the icons.

Possible Solution

I have tried to create an empty icon theme but I'm getting icons anyway, but I have not spent a lot of time on this.

Your Environment

  • Module version used: 0.5.2
  • Operating System and PowerShell version: Windows 10, PowerShell 7.1.4

Can't add color theme

Receive a number of these errors trying to Add-TerminalIconsColorTheme. The theme is based on the default theme with Name and 3 color changes.

InvalidOperation: C:\source\github\Terminal-Icons\Terminal-Icons\Private\Add-Theme.ps1:63
Line |
  63 |$script:colorSequences[$item.BaseName].Types.Files[$_.Nam|                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | Cannot index into a null array.

It looks like it goes to build $script:colorSequences[$item.BaseName] but $script:colorSequences[$item.BaseName] is empty where $item.BaseName is the new color theme I'm trying to add.

Support for Python & Java Glpyhs

Current Behavior

I noticed that .py and .java files were not supported yet and no glyphs were present for their file types. Could these be added? Enhancement proposal would have been posted below, however, the glyphs don't render properly.

image

Expected Behavior

The correct glyphs should appear next to the appropriate file type

Possible Solution

Add the following glyphs to the existing theme set

  1. For Python: https://www.nerdfonts.com/cheat-sheet
  2. For Java: https://www.nerdfonts.com/cheat-sheet

No icons after installation.

Expected Behavior

Have icons and no error raised.

Current Behavior

No icons:
image
image
Windows Terminal config:
image

Possible Solution

Steps to Reproduce (for bugs)

No idea to reproduce the bug.

Context

Context is just in screenshot, install, load and nothing

Your Environment

  • Module version used: 0.1.1
  • Operating System and PowerShell version: Windows 10 2004, Powershell Core 7.0.3

Symlink and junction arrows render incorrectly

Symlink and junction arrows render incorrectly on Windows default PowerShell (5.1.19041.1320).

Expected Behavior

When printing directory contents on Windows Terminal, symlinks and junctions display name as "icon link-name arrow target-name".

Current Behavior

When printing directory contents on Windows Terminal, symlinks and junctions display name as "icon link-name ï•” target-name".

image

Possible Solution

With 0.9.0, in Terminal-Icons.psm1:312 and Terminal-Icons.psm1:326 replace:
$displayInfo['Target'] = '  ' + $FileInfo.Target
with:
$displayInfo['Target'] = ' ' + $glyphs['nf-mdi-arrow_right_thick'] + ' ' + $FileInfo.Target

Steps to Reproduce (for bugs)

  1. Start Powershell
  2. mkdir Target
  3. mklink /J Link Target
  4. ls

Context

Arrows good. These are the only instances of explicit unicode glyphs in Terminal-Icons.psm1, so getting rid of them could be nice.

Your Environment

  • Module version used: 0.9.0
  • Operating System and PowerShell version: Windows 10, Windows Terminal, PSVersion 5.1.19041.1320. This is the system default.

PSVersion 7.2.0, which is installed separately, renders the glyph correctly.

Error since updating to .NET 5.0

Getting this error hundreds of times over when importing module:

InvalidOperation: C:\Users\desig\OneDrive\Documents\PowerShell\Modules\Terminal-Icons\0.1.1\Terminal-Icons.psm1:51
Line |
51 | $script:colorSequences[$colorData.Name].Types.Files[$_.Name] …
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Cannot index into a null array.

Icons still seem to work, but this error is annoying at best.

File name not shown

Expected Behavior

The name of a file should always be displayed, even if the extension of the file could not be matched to a specific icon/pattern.

Current Behavior

It seems that files without file extension are not displayed at all. However, special files like "LICENSE" are displayed nonetheless.

image
image

Your Environment

  • Module version used: 0.3.0
  • Operating System and PowerShell version: Win10 20H2, PowerShell 7

File named "SConstruct" has blank for icon and filename

I have a file named "SConstruct" has blank for icon and filename when i'm expecting at least the file icon and the file name.

Steps to Reproduce (for bugs)

  1. I have posh-git and Terminal-Icons installed
  2. Create a file called SConstruct
  3. view the directory listing

Windows 10, PowerShell version 5.1.19041.906
Just installed Terminal-Icons module today.

image

Suggesting more icons

Expected Behavior

image

Current Behavior

These folders and files have no icons, also .img format needs different icon shown in expected behavior.
image

Possible Solution

You can check these changes at my fork https://github.com/KaranKad/Terminal-Icons/tree/newicons
If you like these changes, I am ready to submit pull request.

Context

I have replaced nf-dev-java with nf-fae-java because it scales better when zooming in.

Your Environment

  • Module version used: 0.5.2
  • Operating System and PowerShell version: Windows 10 21H1 and PowerShell 7.1.3

[Feature] - Support Deserialized.System.IO.FileInfo

Expected Behavior

Output icons and colorization after running Invoke-Command -ComputerName . -ScriptBlock { Get-ChildItem }

Current Behavior

Current behavior is empty data.

Possible Solution

Edit Format-TerminalIcons and Resolve-Icon to support Deserialized.System.IO.FileInfo

Context

I'd like to have the colorization when running Invoke-Command

Workaround

I added if ( $_.psobject.TypeNames -like 'Deserialized*' ) {$_.Name} else { Terminal-Icons\Format-TerminalIcons $_ } to my ps1xml file.

Your Environment

  • Module version used: 0.5.2
  • Operating System and PowerShell version: Windows 10; Powershell 7.2.1

OneDrive Appends Company Name To Folder Name And nf-mdi-ondrive Glyph Isn't Displayed

Expected Behavior

Would it be reasonable to allow a wildcard so one could display the glyph icon (  nf-mdi-onedrive ) for a folder named OneDrive - Business Name for instance? Or it could just be a fix for OneDrive itself.

Current Behavior

Currently the directory icon is the generic folder.

Possible Solution

Not sure how to implement.

Steps to Reproduce (for bugs)

1.OneDrive created through company. Not sure if this my employer of a OneDrive for business or the like setting.

Context

N/A

Your Environment

  • Module version used: 0.5.2
  • Operating System and PowerShell version: Windows 10 1909; Powershell Core 7.1.4

only match Extension

Default theme has extensions like .sln.dotsettings, but in script use $_.Extension which only use .dotsetting to match.

Missing support for .hbs Handlebars files

Currently there is no .hbs file support for the Handlebars templating language. https://handlebarsjs.com/

Expected Behavior

A moustache icon with an orange colouring for .hbs files.
image

Current Behavior

.hbs files have no configuration and are shown using the default icon and colour.
image

Possible Solution

The default Seti icon set in VS Code looks nice and would be ideal. The following is an example screenshot from VS Code:
image

Context

I use the Handlebars and it would be great to see .hbs files styled too.

Your Environment

  • Module version used: 0.5.2
  • Operating System and PowerShell version: Windows 10 and Powershell 7.1.4

QuickStart Guide

Thanks so much for the module! I want exactly what's in the screenshot on Twitter. Can you create QuickStart guide on how to do that? Which font you used, etc. That way we can expand into the module slowly?

How to un-install ?

How do I un-Install so I can start fresh. I deleted all the folders and .ps1 files and everything I could find associated with this.
And when I open terminal, it keeps asking for missing files in red letters.

trying to start all mover again as many things were not working.

Import Terminal-Icons Module on Ubuntu

I tried to get terminal icon running on ubuntu 20. I installed the module successfully.
Then I typed Import-Module -Name Terminal-Icons

Expected Behavior

Terminal icons module is loaded

Current Behavior

When not running under sudo, which provides no output, I get the following error message:

New-Item: /usr/local/share/powershell/Modules/Terminal-Icons/0.5.0/Terminal-Icons.psm1:186
Line |
 186 |              New-Item -Path $storagePath -ItemType Directory -Force >  …
     |              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | Access to the path '/etc/xdg/xdg-ubuntu/powershell/Community'
     | is denied.

Steps to Reproduce (for bugs)

  1. Install Ubuntu 20.04
  2. Install PowerShell 7.1.7
  3. Start pwsh
  4. Run Install-Module -Name Terminal-Icons -Repository PSGallery
  5. Run Import-Module -Name Terminal-Icons

Your Environment

  • Module version used: 0.5.0
  • Operating System and PowerShell version: Ubuntu 20.04 and PowerShell 7.1.7

Escape characters appear when the result is piped to less

Expected Behavior

All icons and colors are properly displayed

Current Behavior

gci | format-list | less
화면 캡처 2021-08-11 112744

Possible Solution

As a workaround, can be piped to more and icons are displayed rather correctly
gci | format-list | more
화면 캡처 2021-08-11 112910

Steps to Reproduce (for bugs)

  1. Get-ChildItem | Format-List | less

Context

I want to pipe everything to less

Your Environment

  • Module version used: 0.5.2
  • Operating System and PowerShell version: Windows 10 19043.1110, Powershell 7.1.3

PowerShell Redirection also outputs Terminal Icons code

When Redirecting output with Terminal-Icons enabled, the output also has Terminal-Icons and code within the output.

Expected Behavior

When Terminal-Icons is disabled, code and Icons do not appear in redirected outputs:
image

Current Behavior

While Terminal-Icons are enabled, redirected output has left over code and if the font is not applied in text editors the icon does not appear:
image

Possible Solution

I'm wondering if there is a way to disable Terminal-Icons when redirection operators are used? Or a way to parse the code out? Other than that, I have no idea how to fix this.

Steps to Reproduce (for bugs)

  1. Import-Module Terminal-Icons
  2. gci | select -First 5 >> filename.txt (Tee, ">" and Out-File also output same thing) (Export-CSV does not display Terminal-Icons which is what I am looking for when redirecting output.)
  3. ". filename.txt"

Context

I work a lot with CSVs and redirect data a lot using PowerShell. Finding a fix or workaround will make my life easier while still having a cool prompt!

Your Environment

  • Module version used:
    Latest
  • Operating System and PowerShell version:
    Windows 11 Pro and Windows 10 Pro
    PowerShell Versions:
    PowerShell 5.1.22000.282
    PowerShell 7.2.1

Same Behavior in Windows Terminal version 1.11.3471.0

Icons not displayed in windows terminal

Expected Behavior

On my local machine, I would expect to see this in the windows terminal:

image

Which is what I see if I use Windows PowerShell

Current Behavior

On the terminal, the icons are missing, as shown below:

image

Notice the icons are just squares

Steps to Reproduce (for bugs)

  1. Install-Module -Name Terminal-Icons -Repository PSGallery
  2. code $profile
  3. Add the following into the file Microsoft.PowerShell_profile.ps1:
Import-Module posh-git
Import-Module oh-my-posh
Import-Module -Name Terminal-Icons
  1. Open Windows Terminal

Context

If it is useful, this is what my terminal settings look like:

{
    "$schema": "https://aka.ms/terminal-profiles-schema",
    "defaultProfile": "{574e775e-4f2a-5b96-ac1e-a2962a402336}",
    "initialCols": 130,
    "initialRows": 30,
    "multiLinePasteWarning": false,
    "profiles": {
        "defaults": {
            "fontFace": "Courier New"
        },
        "list": [
            {
                "guid": "{574e775e-4f2a-5b96-ac1e-a2962a402336}",
                "hidden": false,
                "name": "PowerShell",
                "fontFace": "Courier New",
                "source": "Windows.Terminal.PowershellCore"
            }
        ]
    }
}

Your Environment

  • Module version used: 0.3.1
  • Operating System and PowerShell version: Windows 10 (Azure VM). PowerShell 7.1.3

Terminal-Icons is very slow on network shares

Terminal-Icons is very slow on network shares

Expected Behavior

Listing a network share with Terminal-Icons enabled or not should result in similar running times.

Current Behavior

Listing a network share with Terminal-Icons enabled results in a running time that is significantly slower than the same listing executed with Terminal-Icons disabled. As an example, listing a directory with 15 entries on a network share with 20ms latency with Terminal-Icons enabled takes two seconds to complete, in contrast with a 100 milliseconds duration for the same listing with Terminal-Icons disabled. In effect, for this particular example, Terminal-Icons is 20x slower than the default behavior.

Steps to Reproduce

  1. Elect a network share with some latency and a sufficient number of entries for running the tests;
  2. List the network share with Terminal-Icons disabled;
  3. List the network share with Terminal-Icons enabled;
  4. Compare the time it takes for the two commands to complete.

Your Environment

Terminal-Icons 0.5.2
Windows 10 20H1
Windows Powershell 5.1

Empty Prefs.xml

Script worked fine until one day I got 2 error messages when I launched my terminal: "Import-Clixml : ' . ' , hexadecimal value 0x00 is an invalid character" and "Save-Preferences : Cannot bind argument to parameter 'Preferences' because it is null"

Expected Behavior

If I'm running the command "Import-Module -Name Terminal-Icons" I should get no errors and the script should work fine.

Current Behavior

When I run the command "Import-Module -Name Terminal-Icons" I get the 2 error messages mentioned above, I'll also attach an image of them.

Screenshot 2021-11-20 083555

Possible Solution

Turns out the issue comes from the Prefs.xml file getting empty for no reason.
It may be caused by Windows 11 since my Windows 10 laptop still runs the script fine, but I'm not sure.

Steps to Reproduce (for bugs)

  1. The file Prefs.xml, located at "C:\Users<user>\AppData\Roaming\powershell\Community\Terminal-Icons", has to be empty
  2. Run the command "Import-Module -Name Terminal-Icons"

Context

I've been using this script for months and had no issues, even after I upgraded to Windows 11 recently. But one day when I opened the terminal I got these 2 errors. I received this error while I was on the script version 0.5.2, so I tried upgrading it to 0.7.0 but didn't work. Also tried to reinstall it afterwards. So I looked through the code at the lines from the error and found out it came from the variable $Prefs. So I looked how it is constructed and found the location of the Prefs.xml file. I checked that file on my Windows 10 laptop, where the script still works fine, and found the file populated. So I copied the contents of the file from my laptop to my desktop and now the script works.

Your Environment

  • Module version used: 0.5.2, 0.7.0
  • Operating System and PowerShell version: Windows 11, PS 5.1

Display targets for reparse points (junctions, links, etc.)

Display targets for reparse points (junctions, links, etc.)

Expected Behavior

It would be helpful if "reparse points" (junction, sym links on Windows, sym links on Unix)
would be display their "target" in Get-ChildItem "default" output.

PS C:\> dir C:\temp\dummy

        Directory: C:\temp\dummy


Mode                LastWriteTime         Length Name
----                -------------         ------ ----
d----        06.10.2020     15:14                  target
l----        13.01.2021     13:20                  link -> C:\temp\dummy\target

Current Behavior

PS C:\> dir C:\temp\dummy

        Directory: C:\temp\dummy


Mode                LastWriteTime         Length Name
----                -------------         ------ ----
d----        06.10.2020     15:14                  target
l----        13.01.2021     13:20                  link

While you can (subtly) see that an entry is a link, not a real directory (by the Mode "l"), you cannot easily see the target of the link,
requiring manual PS-foo like Get-ChildItem | Select-Object Mode, LastWriteTime, Length, Name, Target | Format-Table. While
that works, it does not honor the icons.

Possible Solution

In http://github.com/cklutz/Terminal-Icons I have created a fork that provides the above capability by modifying Format-TerminalIcons.ps1
slightly:

diff --git a/Terminal-Icons/Public/Format-TerminalIcons.ps1 b/Terminal-Icons/Public/Format-TerminalIcons.ps1
index 982b8b2..2de8a9d 100644
--- a/Terminal-Icons/Public/Format-TerminalIcons.ps1
+++ b/Terminal-Icons/Public/Format-TerminalIcons.ps1
@@ -35,6 +35,10 @@ function Format-TerminalIcons {
         $escape      = [char]27
         $colorReset  = "${escape}[0m"
         $displayInfo = Resolve-Icon $FileInfo
-        "$($displayInfo.Color)$($displayInfo.Icon)  $($FileInfo.Name)$colorReset"
+        $targetInfo  = ''
+        if ($FileInfo.Attributes -band [System.IO.FileAttributes]::ReparsePoint) {
+            $targetInfo = ' -> ' + $FileInfo.Target
+        }
+        "$($displayInfo.Color)$($displayInfo.Icon)  $($FileInfo.Name)$targetInfo$colorReset"
     }
 }

This issue (and a possible PR) would only address the most basic addition, like just adding the -> Target
to the output. It generally also be feasible to have a custom icon for reparsepoints. But this I have not
addressed.

Steps to Reproduce (for bugs)

See "Current Behavior"

Context

Better usability when working with links and junctions. For example, our software typically is installed as
PRODNAME-VERSION (e.g. ABC-1.3.10) and we create a link to the most current version during
installation, keeping the old ones. That results in a directory like this:

ABC-1.3.10
ABC-1.3.9
ABC-1.20
ABC-CURRENT

ABC-CURRENT is the name that the configuration and software uses. Without the above change it
is pretty cumbersome to figure out what it "points" to.

I'm sure there are other use cases as well as links are even on Windows no longer a stepchild.

Your Environment

  • Module version used: 0.2.2
  • Operating System and PowerShell version: Windows 10, PowerShell 7.1.0

add .ipynb icon

Expected Behavior

Thanks for a great module! I suggest that a custom icon for .ipynb files are adopted.

Current Behavior

image

Possible Solution

Icon: '.ipynb' = 'nf-mdi-book'
Color: '.ipynb' = '16c60c'

image

Steps to Reproduce (for bugs)

Context

It would really make it easier and more intuitive to spot the notebooks in my directories :)

Your Environment

  • Module version used:
  • Operating System and PowerShell version:

CODE_OF_CONDUCT.md returning an extra space in front of the file name

When Get-ChildItem results contain a CODE_OF_CONDUCT.md file, the file name has an extra space prepended in front of it when Terminal-Icons is imported. Tested with multiple fonts, including fonts without glyphs, all come back with a space in front of that file. Also tested multiple paths.

Expected Behavior

CODE_OF_CONDUCT.md's file name is aligned with the rest of the files.

Normal output before importing Terminal-Icons:
image

Current Behavior

ConEmu:
image

Terminal:
image

Possible Solution

Remove extra space?

Steps to Reproduce (for bugs)

  1. Change location to a path with a CODE_OF_CONDUCT.md file in it.
  2. Get-ChildItem

Your Environment

[#4] [PS 7.0.0-p3] [0:00:00.0163] [PSProfile] [dev ≡ +0 ~4 -0 !]
>> Get-Module Terminal-Icons | fl

Name              : Terminal-Icons
Path              : C:\Users\nate\Documents\PowerShell\Modules\Terminal-Icons\0.1.1\Terminal-Icons.psm1
Description       : PowerShell module to add file icons to terminal based on file extension
ModuleType        : Script
Version           : 0.1.1
PreRelease        :
NestedModules     : {}
ExportedFunctions : {Add-TerminalIconsColorTheme, Add-TerminalIconsIconTheme, Format-TerminalIcons, Get-TerminalIconsColorTheme…}
ExportedCmdlets   :
ExportedVariables :
ExportedAliases   :


[#5] [PS 7.0.0-p3] [0:00:00.0365] [PSProfile] [dev ≡ +0 ~4 -0 !]
>> $PSVersionTable

Name                           Value
----                           -----
PSVersion                      7.0.0-preview.3
PSEdition                      Core
GitCommitId                    7.0.0-preview.3
OS                             Microsoft Windows 10.0.18362
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Feature Idea: Clickable folders

When displaying names of folders and files we can easily make them clickable. Using something along the lines:

${ESC}=[char]27
Write-Host "${ESC}]8;;c:\Users${ESC}\c:\Users${ESC}]8;;${ESC}\"

We can have an option to open folder in Explorer:
image

Display targets for reparse points (junctions, sym links, etc.)

Display targets for reparse points (junctions, links, etc.)

Expected Behavior

It would be helpful if "reparse points" (junction, sym links on Windows, sym links on Unix)
would be display their "target" in Get-ChildItem "default" output.

PS C:\> dir C:\temp\dummy

        Directory: C:\temp\dummy


Mode                LastWriteTime         Length Name
----                -------------         ------ ----
d----        06.10.2020     15:14                  target
l----        13.01.2021     13:20                  link -> C:\temp\dummy\target

Current Behavior

PS C:\> dir C:\temp\dummy

        Directory: C:\temp\dummy


Mode                LastWriteTime         Length Name
----                -------------         ------ ----
d----        06.10.2020     15:14                  target
l----        13.01.2021     13:20                  link

While you can (subtly) see that an entry is a link, not a real directory (by the Mode "l"), you cannot easily see the target of the link,
requiring manual PS-foo like Get-ChildItem | Select-Object Mode, LastWriteTime, Length, Name, Target | Format-Table. While
that works, it does not honor the icons.

Possible Solution

In http://github.com/cklutz/Terminal-Icons I have created a fork that provides the above capability by modifying Format-TerminalIcons.ps1
slightly:

diff --git a/Terminal-Icons/Public/Format-TerminalIcons.ps1 b/Terminal-Icons/Public/Format-TerminalIcons.ps1
index 982b8b2..2de8a9d 100644
--- a/Terminal-Icons/Public/Format-TerminalIcons.ps1
+++ b/Terminal-Icons/Public/Format-TerminalIcons.ps1
@@ -35,6 +35,10 @@ function Format-TerminalIcons {
         $escape      = [char]27
         $colorReset  = "${escape}[0m"
         $displayInfo = Resolve-Icon $FileInfo
-        "$($displayInfo.Color)$($displayInfo.Icon)  $($FileInfo.Name)$colorReset"
+        $targetInfo  = ''
+        if ($FileInfo.Attributes -band [System.IO.FileAttributes]::ReparsePoint) {
+            $targetInfo = ' -> ' + $FileInfo.Target
+        }
+        "$($displayInfo.Color)$($displayInfo.Icon)  $($FileInfo.Name)$targetInfo$colorReset"
     }
 }

This issue (and a possible PR) would only address the most basic addition, like just adding the -> Target
to the output. It generally also be feasible to have a custom icon for reparsepoints. But this I have not
addressed.

Steps to Reproduce (for bugs)

See "Current Behavior"

Context

Better usability when working with links and junctions. For example, our software typically is installed as
PRODNAME-VERSION (e.g. ABC-1.3.10) and we create a link to the most current version during
installation, keeping the old ones. That results in a directory like this:

ABC-1.3.10
ABC-1.3.9
ABC-1.20
ABC-CURRENT

ABC-CURRENT is the name that the configuration and software uses. Without the above change it
is pretty cumbersome to figure out what it "points" to.

I'm sure there are other use cases as well as links are even on Windows no longer a stepchild.

Your Environment

  • Module version used: 0.2.2
  • Operating System and PowerShell version: Windows 10, PowerShell 7.1.0

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.