devblackops / terminal-icons Goto Github PK
View Code? Open in Web Editor NEWA PowerShell module to show file and folder icons in the terminal
License: MIT License
A PowerShell module to show file and folder icons in the terminal
License: MIT License
Imports without error and if anything required is missing, let us know.
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>
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.
ipmo terminal-icons
as a regular user and as adminName 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
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!
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.
CODE_OF_CONDUCT.md
's file name is aligned with the rest of the files.
Normal output before importing Terminal-Icons:
Remove extra space?
CODE_OF_CONDUCT.md
file in it.Get-ChildItem
[#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
How to make this to show terminal icons in tree
command in pwsh
?
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.
Windows 10, PowerShell version 5.1.19041.906
Just installed Terminal-Icons module today.
After installing Terminal-Icons and importing the module in the $profile, Terminal-Icons should be loaded and work.
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'.
Install-Module Terminal-Icons -Scope CurrentUser
Import-Module Terminal-Icons
Not able to use Terminal-Icons
Currently there is no .hbs file support for the Handlebars templating language. https://handlebarsjs.com/
A moustache icon with an orange colouring for .hbs files.
.hbs files have no configuration and are shown using the default icon and colour.
The default Seti icon set in VS Code looks nice and would be ideal. The following is an example screenshot from VS Code:
I use the Handlebars and it would be great to see .hbs files styled too.
install:
Followed all the instructions, what am I doing wrong?
As if he can't see the way to the icons.
Windows 10 Pro - 19042.985 - 20H2
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.
It shouldn't take that long.
The output of Measure-Command { Import-Module Terminal-Icons }
is 'TotalMilliseconds : 2118.1497' for example.
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.
PowerShell ends up taking too long to start, which hampers its usage.
These folders and files have no icons, also .img
format needs different icon shown in expected behavior.
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.
I have replaced nf-dev-java
with nf-fae-java
because it scales better when zooming in.
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
No warning
Warning appears.
How can I disable this warning? Because when I list items with dir
, it works.
Provide a light mode (black on white) option/theme for those who don't dabble in the dark arts.
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?
Is it possible for someone to implement a Font called "Cascadia Code PL" that microsoft created,
to have these icons work with this font ??
I dont know if its possible or it just cant, but im asking just in case. 😉
Display targets for reparse points (junctions, links, etc.)
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
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.
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.
See "Current Behavior"
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.
When Improting the Terminal-Icons Module i get the error message as seen in the screenshot.
The Module should Import without errors
The module doesn't load correctly
I already tryed reinstalling the Module multiple times.
Windows 10
Powershell Version 5.1.19041.1151
Julia files ending in .jl
should be marked with the glyph already set as nf-seti-julia
.
If a file named *.jl
is in the directory then it should be accompanied with the nf-seti-julia
glyph.
If a file named *.jl
is in the directory then it is accompanied with the plain file glyph.
Add setting to support Julia source files.
Symlink and junction arrows render incorrectly on Windows default PowerShell (5.1.19041.1320).
When printing directory contents on Windows Terminal, symlinks and junctions display name as "icon link-name arrow target-name".
When printing directory contents on Windows Terminal, symlinks and junctions display name as "icon link-name ï•” target-name".
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
mkdir Target
mklink /J Link Target
ls
Arrows good. These are the only instances of explicit unicode glyphs in Terminal-Icons.psm1, so getting rid of them could be nice.
PSVersion 7.2.0, which is installed separately, renders the glyph correctly.
Terminal-Icons is very slow on network shares
Listing a network share with Terminal-Icons enabled or not should result in similar running times.
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.
Terminal-Icons 0.5.2
Windows 10 20H1
Windows Powershell 5.1
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.
It seems that files without file extension are not displayed at all. However, special files like "LICENSE" are displayed nonetheless.
I prefer Cascadia Mono
over Cascadia Code
because I want to see the characters that need to be typed, not a pretty painting of text.
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"
If I'm running the command "Import-Module -Name Terminal-Icons" I should get no errors and the script should work fine.
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.
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.
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.
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.
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
Default theme has extensions like .sln.dotsettings
, but in script use $_.Extension
which only use .dotsetting
to match.
XML Icon should render
I've tried DejaVuSansMono and FiraCode and get the same.
Not sure. Maybe I'm doing something wrong?
install-module Terminal-Icons
Install-Font -Path .
PSVersion | PSEdition | PSCompatibleVersions | BuildVersion | CLRVersion | WSManStackVersion | PSRemotingProtocolVersion | SerializationVersion |
---|---|---|---|---|---|---|---|
5.1.18362.145 | Desktop | System.Version[] | 10.0.18362.145 | 4.0.30319.42000 | 3.0 | 2.3 | 1.1.0.1 |
Version | Name |
---|---|
0.1.1 | Terminal-Icons |
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.
Display targets for reparse points (junctions, links, etc.)
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
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.
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.
See "Current Behavior"
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.
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.
Using iTerm2 with PowerShell Core on Mac, most of the examples show as reparse points/shortcuts.
Both Windows and Mac in these examples are using the Fira Code Nerd Font 2.1.
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.
Import-Module Terminal-Icons
Show-TerminalIconsTheme
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.
On my local machine, I would expect to see this in the windows terminal:
Which is what I see if I use Windows PowerShell
On the terminal, the icons are missing, as shown below:
Notice the icons are just squares
Install-Module -Name Terminal-Icons -Repository PSGallery
code $profile
Microsoft.PowerShell_profile.ps1
:Import-Module posh-git
Import-Module oh-my-posh
Import-Module -Name Terminal-Icons
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"
}
]
}
}
0.3.1
PowerShell 7.1.3
Output icons and colorization after running Invoke-Command -ComputerName . -ScriptBlock { Get-ChildItem }
Current behavior is empty data.
Edit Format-TerminalIcons
and Resolve-Icon
to support Deserialized.System.IO.FileInfo
I'd like to have the colorization when running Invoke-Command
I added if ( $_.psobject.TypeNames -like 'Deserialized*' ) {$_.Name} else { Terminal-Icons\Format-TerminalIcons $_ }
to my ps1xml file.
0.5.2
Thanks for a great module! I suggest that a custom icon for .ipynb files are adopted.
Icon: '.ipynb' = 'nf-mdi-book'
Color: '.ipynb' = '16c60c'
It would really make it easier and more intuitive to spot the notebooks in my directories :)
The glyphs are rendered correctly in Windows Terminal.
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.
FiraCode Nerd Font
and Caskaydia Cove Nerd Font
installed, as well as Oh my Posh 3.Terminal-Icons
via Install-Module -Name Terminal-Icons -Repository PSGallery
$profile
: Import-Module -Name Terminal-Icons
0.3.0
- I've executed Install-Module -Name Terminal-Icons -Repository PSGallery
I tried to get terminal icon running on ubuntu 20. I installed the module successfully.
Then I typed Import-Module -Name Terminal-Icons
Terminal icons module is loaded
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.
pwsh
Install-Module -Name Terminal-Icons -Repository PSGallery
Import-Module -Name Terminal-Icons
Showing nf-dev-visualstudio
icon for .slnf
files.
.slnf
files are not handled and default icon is displayed
In devblackops.psd1
add line:
'.slnf' = 'nf-dev-visualstudio'
Handling and displaying proper icon for .slnf
files.
PSv3 is listed in Gallery but I just saw some .Where()
syntax which is only supported in PSv4 and above.
Users of PS4 and above can load the psd1
files.
Import-PowerShellDataFile
is only available in PS5 and above. Even though the module manifest specifies PS4 now, only PS5+ actually will work.
Remove use of Import-PowerShellDataFile
and use another method to load the psd1 files.
Enable the module to run on more PS versions.
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.
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.
All icons and colors are properly displayed
As a workaround, can be piped to more and icons are displayed rather correctly
gci | format-list | more
I want to pipe everything to less
Most of the icons render in a single character width; I expect the XML icon to also render in one character.
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:
Here's FiraCode Nerd Font:
It doesn't seem to matter about the font or the terminal, there's always that extra space.
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.
New user of the module, just noticed the odd spacing when listing a folder.
When Redirecting output with Terminal-Icons enabled, the output also has Terminal-Icons and code within the output.
When Terminal-Icons is disabled, code and Icons do not appear in redirected outputs:
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:
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.
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!
Same Behavior in Windows Terminal version 1.11.3471.0
Have icons and no error raised.
No icons:
Windows Terminal config:
No idea to reproduce the bug.
Context is just in screenshot, install, load and nothing
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.
The correct glyphs should appear next to the appropriate file type
Add the following glyphs to the existing theme set
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.
Currently the directory icon is the generic folder.
Not sure how to implement.
1.OneDrive created through company. Not sure if this my employer of a OneDrive for business or the like setting.
N/A
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.
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.
I have been unable to figure out how to get rid of the icons.
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.