fork/fish-shell

git clone https://git.julia.blue/fork/fish-shell

Johannes AltmanningerMark private functions that don't need localizationa53db7256

master
808 B16 linesraw
1# localization: skip(private)
2function __fish_complete_freedesktop_icons -d 'List installed icon names according to `https://specifications.freedesktop.org/icon-theme-spec/0.13/`'
3    # The latest `icon-theme-spec` as of 2024-08-10 is 0.13
4    # https://specifications.freedesktop.org/icon-theme-spec/latest/
5    # https://specifications.freedesktop.org/icon-theme-spec/0.13/#directory_layout
6    # 1. $HOME/.icons
7    # 2. $XDG_DATA_DIRS/icons
8    # 3. /usr/share/pixmaps
9    set -l dirs (path filter -rd -- ~/.icons $XDG_DATA_DIRS/icons /usr/share/pixmaps)
10
11    # https://specifications.freedesktop.org/icon-theme-spec/0.13/#definitions
12    # .png, .svg and .xpm are valid icon file formats
13    path filter -rf -- $dirs/**/*.{png,svg,xpm} \
14        | path basename \
15        | path change-extension ''
16end