diff --git a/config/btop/btop.conf b/config/btop/btop.conf index 9d29488b..637c9492 100644 --- a/config/btop/btop.conf +++ b/config/btop/btop.conf @@ -1,18 +1,18 @@ -#? Config file for btop v. 1.4.5 +#? Config file for btop v.1.4.6 #* Name of a btop++/bpytop/bashtop formatted ".theme" file, "Default" and "TTY" for builtin themes. #* Themes should be placed in "../share/btop/themes" relative to binary or "$HOME/.config/btop/themes" color_theme = "/home/kristofers/.config/btop/themes/rose-pine.theme" #* If the theme set background should be shown, set to False if you want terminal background transparency. -theme_background = False +theme_background = false #* Sets if 24-bit truecolor should be used, will convert 24-bit colors to 256 color (6x6x6 color cube) if false. -truecolor = True +truecolor = true #* Set to true to force tty mode regardless if a real tty has been detected or not. #* Will force 16-color mode and TTY theme, set all graph symbols to "tty" and swap out other non tty friendly symbols. -force_tty = False +force_tty = false #* Define presets for the layout of the boxes. Preset 0 is always all boxes shown with default settings. Max 9 presets. #* Format: "box_name:P:G,box_name:P:G" P=(0 or 1) for alternate positions, G=graph symbol to use for box. @@ -22,10 +22,13 @@ presets = "cpu:1:default,proc:0:default cpu:0:default,mem:0:default,net:0:defaul #* Set to True to enable "h,j,k,l,g,G" keys for directional control in lists. #* Conflicting keys for h:"help" and k:"kill" is accessible while holding shift. -vim_keys = True +vim_keys = true #* Rounded corners on boxes, is ignored if TTY mode is ON. -rounded_corners = True +rounded_corners = true + +#* Use terminal synchronized output sequences to reduce flickering on supported terminals. +terminal_sync = true #* Default symbols to use for graph creation, "braille", "block" or "tty". #* "braille" offers the highest resolution but might not be included in all fonts. @@ -53,44 +56,47 @@ graph_symbol_proc = "default" shown_boxes = "net proc cpu mem" #* Update time in milliseconds, recommended 2000 ms or above for better sample times for graphs. -update_ms = 1000 +update_ms = 500 #* Processes sorting, "pid" "program" "arguments" "threads" "user" "memory" "cpu lazy" "cpu direct", #* "cpu lazy" sorts top process over time (easier to follow), "cpu direct" updates top process directly. proc_sorting = "cpu direct" #* Reverse sorting order, True or False. -proc_reversed = False +proc_reversed = false #* Show processes as a tree. -proc_tree = False +proc_tree = false #* Use the cpu graph colors in the process list. -proc_colors = True +proc_colors = true #* Use a darkening gradient in the process list. -proc_gradient = True +proc_gradient = true #* If process cpu usage should be of the core it's running on or usage of the total available cpu power. -proc_per_core = True +proc_per_core = true #* Show process memory as bytes instead of percent. -proc_mem_bytes = True +proc_mem_bytes = true #* Show cpu graph for each process. -proc_cpu_graphs = True +proc_cpu_graphs = true #* Use /proc/[pid]/smaps for memory information in the process info box (very slow but more accurate) -proc_info_smaps = False +proc_info_smaps = false #* Show proc box on left side of screen instead of right. -proc_left = False +proc_left = false #* (Linux) Filter processes tied to the Linux kernel(similar behavior to htop). -proc_filter_kernel = False +proc_filter_kernel = false #* In tree-view, always accumulate child process resources in the parent process. -proc_aggregate = False +proc_aggregate = false + +#* Should cpu and memory usage display be preserved for dead processes when paused. +keep_dead_proc_usage = false #* Sets the CPU stat shown in upper half of the CPU graph, "total" is always available. #* Select from a list of detected attributes from the options menu. @@ -104,28 +110,28 @@ cpu_graph_lower = "total" show_gpu_info = "Auto" #* Toggles if the lower CPU graph should be inverted. -cpu_invert_lower = True +cpu_invert_lower = true #* Set to True to completely disable the lower CPU graph. -cpu_single_graph = False +cpu_single_graph = false #* Show cpu box at bottom of screen instead of top. -cpu_bottom = False +cpu_bottom = false #* Shows the system uptime in the CPU box. -show_uptime = True +show_uptime = true #* Shows the CPU package current power consumption in watts. Requires running `make setcap` or `make setuid` or running with sudo. -show_cpu_watts = True +show_cpu_watts = true #* Show cpu temperature. -check_temp = True +check_temp = true #* Which sensor to use for cpu temperature, use options menu to select from list of available sensors. cpu_sensor = "Auto" #* Show temperatures for cpu cores also if check_temp is True and sensors has been found. -show_coretemp = True +show_coretemp = true #* Set a custom mapping between core and coretemp, can be needed on certain cpus to get correct temperature for correct core. #* Use lm-sensors or similar to see which cores are reporting temperatures on your machine. @@ -137,17 +143,20 @@ cpu_core_map = "" temp_scale = "celsius" #* Use base 10 for bits/bytes sizes, KB = 1000 instead of KiB = 1024. -base_10_sizes = False +base_10_sizes = false #* Show CPU frequency. -show_cpu_freq = True +show_cpu_freq = true + +#* How to calculate CPU frequency, available values: "first", "range", "lowest", "highest" and "average". +freq_mode = "first" #* Draw a clock at top of screen, formatting according to strftime, empty string to disable. #* Special formatting: /host = hostname | /user = username | /uptime = system uptime clock_format = "%X" #* Update main ui in background when menus are showing, set this to false if the menus is flickering too much for comfort. -background_update = True +background_update = true #* Custom cpu model name, empty string to disable. custom_cpu_name = "" @@ -157,43 +166,43 @@ custom_cpu_name = "" disks_filter = "exclude=/boot /var/cache/pacman/pkg /var/log" #* Show graphs instead of meters for memory values. -mem_graphs = True +mem_graphs = true #* Show mem box below net box instead of above. -mem_below_net = False +mem_below_net = false #* Count ZFS ARC in cached and available memory. -zfs_arc_cached = True +zfs_arc_cached = true #* If swap memory should be shown in memory box. -show_swap = True +show_swap = true #* Show swap as a disk, ignores show_swap value above, inserts itself after first disk. -swap_disk = False +swap_disk = false #* If mem box should be split to also show disks info. -show_disks = True +show_disks = false #* Filter out non physical disks. Set this to False to include network disks, RAM disks and similar. -only_physical = True +only_physical = true #* Read disks list from /etc/fstab. This also disables only_physical. -use_fstab = True +use_fstab = true #* Setting this to True will hide all datasets, and only show ZFS pools. (IO stats will be calculated per-pool) -zfs_hide_datasets = False +zfs_hide_datasets = false #* Set to true to show available disk space for privileged users. -disk_free_priv = False +disk_free_priv = false #* Toggles if io activity % (disk busy time) should be shown in regular disk usage view. -show_io_stat = True +show_io_stat = true #* Toggles io mode for disks, showing big graphs for disk read/write speeds. -io_mode = False +io_mode = false #* Set to True to show combined read/write io graphs in io mode. -io_graph_combined = True +io_graph_combined = true #* Set the top speed for the io graphs in MiB/s (100 by default), use format "mountpoint:speed" separate disks with whitespace " ". #* Example: "/mnt/media:100 /:20 /boot:1". @@ -205,10 +214,10 @@ net_download = 100 net_upload = 100 #* Use network graphs auto rescaling mode, ignores any values set above and rescales down to 10 Kibibytes at the lowest. -net_auto = True +net_auto = true #* Sync the auto scaling for download and upload to whichever currently has the highest scale. -net_sync = False +net_sync = false #* Starts with the Network Interface specified here. net_iface = "" @@ -217,26 +226,32 @@ net_iface = "" base_10_bitrate = "Auto" #* Show battery stats in top right if battery is present. -show_battery = True +show_battery = true #* Which battery to use if multiple are present. "Auto" for auto detection. selected_battery = "Auto" #* Show power stats of battery next to charge indicator. -show_battery_watts = True +show_battery_watts = true -#* Set loglevel for "~/.config/btop/btop.log" levels are: "ERROR" "WARNING" "INFO" "DEBUG". +#* Set loglevel for "~/.local/state/btop.log" levels are: "ERROR" "WARNING" "INFO" "DEBUG". #* The level set includes all lower levels, i.e. "DEBUG" will show all logging info. log_level = "WARNING" +#* Automatically save current settings to config file on exit. +save_config_on_exit = true + #* Measure PCIe throughput on NVIDIA cards, may impact performance on certain cards. -nvml_measure_pcie_speeds = True +nvml_measure_pcie_speeds = true #* Measure PCIe throughput on AMD cards, may impact performance on certain cards. -rsmi_measure_pcie_speeds = True +rsmi_measure_pcie_speeds = true #* Horizontally mirror the GPU graph. -gpu_mirror_graph = True +gpu_mirror_graph = true + +#* Set which GPU vendors to show. Available values are "nvidia amd intel" +shown_gpus = "nvidia amd intel" #* Custom gpu0 model name, empty string to disable. custom_gpu_name0 = "" diff --git a/config/niri/config-desktop.kdl b/config/niri/config-desktop.kdl index 5fdc74d2..99311f1b 100644 --- a/config/niri/config-desktop.kdl +++ b/config/niri/config-desktop.kdl @@ -4,19 +4,19 @@ // https://github.com/YaLTeR/niri/wiki/Configuration:-Introduction workspace "browser" { - open-on-output "DP-1" + open-on-output "DP-2" } workspace "terminal" { - open-on-output "DP-1" + open-on-output "DP-2" } workspace "chat" { - open-on-output "HDMI-A-1" + open-on-output "DP-1" } workspace "music" { - open-on-output "HDMI-A-1" + open-on-output "DP-1" } environment { @@ -81,7 +81,7 @@ cursor { // Find more information on the wiki: // https://github.com/YaLTeR/niri/wiki/Configuration:-Outputs // Remember to uncomment the node by removing "/-"! -output "DP-1" { +output "DP-2" { // Uncomment this line to disable this output. // off @@ -91,7 +91,7 @@ output "DP-1" { // for the resolution. // If the mode is omitted altogether or is invalid, niri will pick one automatically. // Run `niri msg outputs` while inside a niri instance to list all outputs and their modes. - mode "1920x1080@74.973" + mode "2560x1440@180.002" // You can use integer or fractional scale, for example use 1.5 for 150% scale. scale 1 @@ -111,20 +111,21 @@ output "DP-1" { // automatically. position x=0 y=0 - variable-refresh-rate on-demand=false - focus-at-startup + variable-refresh-rate on-demand=true background-color "#000" backdrop-color "#000" } -output "HDMI-A-1" { - // off - mode "1920x1080@60.000" +output "DP-1" { + mode "1920x1080@74.973" scale 1 + transform "normal" - position x=-1920 y=0 + + position x=-1920 y=180 variable-refresh-rate on-demand=false + focus-at-startup background-color "#000" backdrop-color "#000" } @@ -467,8 +468,8 @@ binds { // Example volume keys mappings for PipeWire & WirePlumber. // The allow-when-locked=true property makes them work even when the session is locked. - XF86AudioRaiseVolume allow-when-locked=true { spawn-sh "wpctl set-volume $(get-spotify-id) 0.01+"; } - XF86AudioLowerVolume allow-when-locked=true { spawn-sh "wpctl set-volume $(get-spotify-id) 0.01-"; } + XF86AudioRaiseVolume allow-when-locked=true { spawn-sh "wpctl set-volume $(get-spotify-id) 0.02+"; } + XF86AudioLowerVolume allow-when-locked=true { spawn-sh "wpctl set-volume $(get-spotify-id) 0.02-"; } XF86AudioMute allow-when-locked=true { spawn "sp" "play"; } XF86AudioMicMute allow-when-locked=true { spawn "wpctl" "set-mute" "@DEFAULT_AUDIO_SOURCE@" "toggle"; } Page_Down allow-when-locked=true {spawn "sp" "next"; } diff --git a/config/shell/env b/config/shell/env index a7636452..640a78f9 100644 --- a/config/shell/env +++ b/config/shell/env @@ -19,6 +19,7 @@ export BUN_INSTALL="$XDG_DATA_HOME/bun" export PATH="$PATH:${$(find ~/.local/bin -type d -printf %p:)%%:}" export PATH="$PATH:~/.spicetify" export PATH="$PATH:${$(find ~/.local/share/bun/bin -type d -printf %p:)%%:}" +export PATH="$PATH:$HOME/.lmstudio/bin" export PATH="$JAVA_HOME/bin:$PATH" export PATH="$BUN_INSTALL/bin:$PATH" @@ -96,6 +97,10 @@ export ZDOTDIR="$XDG_CONFIG_HOME/zsh" # export _JAVA_OPTIONS="-Djava.util.prefs.userRoot=${XDG_CONFIG_HOME}/java - Djavafx.cachedir=${XDG_CACHE_HOME}/openjfx" # export _JAVA_OPTIONS=-Djava.util.prefs.userRoot="$XDG_CONFIG_HOME/java" export JAVA_HOME="/usr/lib/jvm/java-21-openjdk" +export WAKATIME_HOME="$XDG_CONFIG_HOME/wakatime" +export PSQL_HISTORY="$XDG_DATA_HOME/psql_history" +export STACK_ROOT="$XDG_DATA_HOME/stack" +export STACK_XDG=1 # Other program settings export AWT_TOOLKIT="MToolkit wmname LG3D" # May have to install wmname diff --git a/config/yazi/flavors/rose-pine-dawn.yazi/flavor.toml b/config/yazi/flavors/rose-pine-dawn.yazi/flavor.toml index cf641114..852ac4c1 100644 --- a/config/yazi/flavors/rose-pine-dawn.yazi/flavor.toml +++ b/config/yazi/flavors/rose-pine-dawn.yazi/flavor.toml @@ -1,14 +1,18 @@ # vim:fileencoding=utf-8:foldmethod=marker +# : App {{{ + +[app] +overall = { bg = "#faf4ed" } + +# : }}} + + # : Manager {{{ [mgr] cwd = { fg = "#56949f" } -# Hovered -hovered = { reversed = true } -preview_hovered = { underline = true } - # Find find_keyword = { fg = "#ea9d34", bold = true, italic = true, underline = true } find_position = { fg = "#907aa9", bg = "reset", bold = true, italic = true } @@ -17,9 +21,9 @@ find_position = { fg = "#907aa9", bg = "reset", bold = true, italic = true } symlink_target = { italic = true } # Marker -marker_copied = { fg = "#286983", bg = "#286983" } -marker_cut = { fg = "#b4637a", bg = "#b4637a" } -marker_marked = { fg = "#d7827e", bg = "#d7827e" } +marker_copied = { fg = "#286983", bg = "#286983" } +marker_cut = { fg = "#b4637a", bg = "#b4637a" } +marker_marked = { fg = "#d7827e", bg = "#d7827e" } marker_selected = { fg = "#ea9d34", bg = "#ea9d34" } # Count @@ -67,6 +71,17 @@ unset_alt = { fg = "#faf4ed", bg = "#575279", bold = true } # : }}} +# : Indicator of hovered file {{{ + +[indicator] +parent = { reversed = true } +current = { reversed = true } +preview = { underline = true } +padding = { open = "", close = "" } + +# : }}} + + # : Status bar {{{ [status] @@ -137,6 +152,10 @@ title_info = { fg = "#286983" } title_warn = { fg = "#ea9d34" } title_error = { fg = "#b4637a" } +# Icons +icon_info = "" +icon_warn = "" +icon_error = "" # : }}} @@ -146,7 +165,7 @@ title_error = { fg = "#b4637a" } [pick] border = { fg = "#286983" } active = { fg = "#907aa9", bold = true } -inactive = { fg = "#797593"} +inactive = { fg = "#797593" } # : }}} @@ -156,7 +175,7 @@ inactive = { fg = "#797593"} [input] border = { fg = "#286983" } title = { bold = true } -value = { fg = "#575279"} +value = { fg = "#575279" } selected = { reversed = true } # : }}} @@ -169,6 +188,10 @@ border = { fg = "#286983" } active = { bg = "#575279", fg = "#faf4ed", bold = true } inactive = { fg = "#797593" } +# Icons +icon_file = "" +icon_folder = "" +icon_command = "" # : }}} @@ -177,7 +200,7 @@ inactive = { fg = "#797593" } [tasks] border = { fg = "#286983" } -title = { bold = true} +title = { bold = true } hovered = { fg = "#907aa9", bold = true, reversed = true } # : }}} @@ -188,7 +211,7 @@ hovered = { fg = "#907aa9", bold = true, reversed = true } [help] on = { fg = "#56949f" } run = { fg = "#907aa9" } -desc = { fg = "#ea9d34"} +desc = { fg = "#ea9d34" } hovered = { reversed = true, bold = true } footer = { fg = "#faf4ed", bg = "#575279" } @@ -199,32 +222,32 @@ footer = { fg = "#faf4ed", bg = "#575279" } [filetype] rules = [ - # Images - { mime = "image/*", fg = "#907aa9" }, + # Images + { mime = "image/*", fg = "#907aa9" }, - # Media - { mime = "{audio,video}/*", fg = "#ea9d34" }, + # Media + { mime = "{audio,video}/*", fg = "#ea9d34" }, - # Archives - { mime = "application/{zip,rar,7z*,tar,gzip,xz,zstd,bzip*,lzma,compress,archive,cpio,arj,xar,ms-cab*}", fg = "#b4637a" }, + # Archives + { mime = "application/{zip,rar,7z*,tar,gzip,xz,zstd,bzip*,lzma,compress,archive,cpio,arj,xar,ms-cab*}", fg = "#b4637a" }, - # Documents - { mime = "application/{pdf,doc,rtf}", fg = "#d7827e" }, + # Documents + { mime = "application/{pdf,doc,rtf}", fg = "#d7827e" }, - # Empty files - # { mime = "inode/empty", fg = "#b4637a" }, + # Empty files + # { mime = "inode/empty", fg = "#b4637a" }, - # Special files - { name = "*", is = "orphan", fg = "#faf4ed", bg = "#b4637a" }, - { name = "*", is = "exec" , fg = "#56949f" }, + # Special files + { url = "*", is = "orphan", fg = "#faf4ed", bg = "#b4637a" }, + { url = "*", is = "exec", fg = "#56949f" }, - # Dummy files - { name = "*", is = "dummy", fg = "#faf4ed", bg = "#b4637a" }, - { name = "*/", is = "dummy", fg = "#faf4ed", bg = "#b4637a" }, + # Dummy files + { url = "*", is = "dummy", fg = "#faf4ed", bg = "#b4637a" }, + { url = "*/", is = "dummy", fg = "#faf4ed", bg = "#b4637a" }, - # Fallback - { name = "*", fg = "#575279" }, - { name = "*/", fg = "#286983" } + # Fallback + { url = "*", fg = "#575279" }, + { url = "*/", fg = "#286983" } ] -# : }}} \ No newline at end of file +# : }}} diff --git a/config/yazi/flavors/rose-pine-moon.yazi/flavor.toml b/config/yazi/flavors/rose-pine-moon.yazi/flavor.toml index 905ae6fd..67fb8818 100644 --- a/config/yazi/flavors/rose-pine-moon.yazi/flavor.toml +++ b/config/yazi/flavors/rose-pine-moon.yazi/flavor.toml @@ -1,14 +1,18 @@ # vim:fileencoding=utf-8:foldmethod=marker +# : App {{{ + +[app] +overall = { bg = "#232136" } + +# : }}} + + # : Manager {{{ [mgr] cwd = { fg = "#9ccfd8" } -# Hovered -hovered = { reversed = true } -preview_hovered = { underline = true } - # Find find_keyword = { fg = "#f6c177", bold = true, italic = true, underline = true } find_position = { fg = "#c4a7e7", bg = "reset", bold = true, italic = true } @@ -17,9 +21,9 @@ find_position = { fg = "#c4a7e7", bg = "reset", bold = true, italic = true } symlink_target = { italic = true } # Marker -marker_copied = { fg = "#3e8fb0", bg = "#3e8fb0" } -marker_cut = { fg = "#eb6f92", bg = "#eb6f92" } -marker_marked = { fg = "#ea9a97", bg = "#ea9a97" } +marker_copied = { fg = "#3e8fb0", bg = "#3e8fb0" } +marker_cut = { fg = "#eb6f92", bg = "#eb6f92" } +marker_marked = { fg = "#ea9a97", bg = "#ea9a97" } marker_selected = { fg = "#f6c177", bg = "#f6c177" } # Count @@ -67,6 +71,17 @@ unset_alt = { fg = "#232136", bg = "#e0def4", bold = true } # : }}} +# : Indicator of hovered file {{{ + +[indicator] +parent = { reversed = true } +current = { reversed = true } +preview = { underline = true } +padding = { open = "", close = "" } + +# : }}} + + # : Status bar {{{ [status] @@ -137,6 +152,10 @@ title_info = { fg = "#3e8fb0" } title_warn = { fg = "#f6c177" } title_error = { fg = "#eb6f92" } +# Icons +icon_info = "" +icon_warn = "" +icon_error = "" # : }}} @@ -146,7 +165,7 @@ title_error = { fg = "#eb6f92" } [pick] border = { fg = "#3e8fb0" } active = { fg = "#c4a7e7", bold = true } -inactive = { fg = "#908caa"} +inactive = { fg = "#908caa" } # : }}} @@ -156,7 +175,7 @@ inactive = { fg = "#908caa"} [input] border = { fg = "#3e8fb0" } title = { bold = true } -value = { fg = "#e0def4"} +value = { fg = "#e0def4" } selected = { reversed = true } # : }}} @@ -169,6 +188,10 @@ border = { fg = "#3e8fb0" } active = { bg = "#e0def4", fg = "#232136", bold = true } inactive = { fg = "#908caa" } +# Icons +icon_file = "" +icon_folder = "" +icon_command = "" # : }}} @@ -177,7 +200,7 @@ inactive = { fg = "#908caa" } [tasks] border = { fg = "#3e8fb0" } -title = { bold = true} +title = { bold = true } hovered = { fg = "#c4a7e7", bold = true, reversed = true } # : }}} @@ -188,7 +211,7 @@ hovered = { fg = "#c4a7e7", bold = true, reversed = true } [help] on = { fg = "#9ccfd8" } run = { fg = "#c4a7e7" } -desc = { fg = "#f6c177"} +desc = { fg = "#f6c177" } hovered = { reversed = true, bold = true } footer = { fg = "#232136", bg = "#e0def4" } @@ -199,32 +222,32 @@ footer = { fg = "#232136", bg = "#e0def4" } [filetype] rules = [ - # Images - { mime = "image/*", fg = "#c4a7e7" }, + # Images + { mime = "image/*", fg = "#c4a7e7" }, - # Media - { mime = "{audio,video}/*", fg = "#f6c177" }, + # Media + { mime = "{audio,video}/*", fg = "#f6c177" }, - # Archives - { mime = "application/{zip,rar,7z*,tar,gzip,xz,zstd,bzip*,lzma,compress,archive,cpio,arj,xar,ms-cab*}", fg = "#eb6f92" }, + # Archives + { mime = "application/{zip,rar,7z*,tar,gzip,xz,zstd,bzip*,lzma,compress,archive,cpio,arj,xar,ms-cab*}", fg = "#eb6f92" }, - # Documents - { mime = "application/{pdf,doc,rtf}", fg = "#ea9a97" }, + # Documents + { mime = "application/{pdf,doc,rtf}", fg = "#ea9a97" }, - # Empty files - # { mime = "inode/empty", fg = "#eb6f92" }, + # Empty files + # { mime = "inode/empty", fg = "#eb6f92" }, - # Special files - { name = "*", is = "orphan", fg = "#232136", bg = "#eb6f92" }, - { name = "*", is = "exec" , fg = "#9ccfd8" }, + # Special files + { url = "*", is = "orphan", fg = "#232136", bg = "#eb6f92" }, + { url = "*", is = "exec", fg = "#9ccfd8" }, - # Dummy files - { name = "*", is = "dummy", fg = "#232136", bg = "#eb6f92" }, - { name = "*/", is = "dummy", fg = "#232136", bg = "#eb6f92" }, + # Dummy files + { url = "*", is = "dummy", fg = "#232136", bg = "#eb6f92" }, + { url = "*/", is = "dummy", fg = "#232136", bg = "#eb6f92" }, - # Fallback - { name = "*", fg = "#e0def4" }, - { name = "*/", fg = "#3e8fb0" } + # Fallback + { url = "*", fg = "#e0def4" }, + { url = "*/", fg = "#3e8fb0" } ] -# : }}} \ No newline at end of file +# : }}} diff --git a/config/yazi/package.toml b/config/yazi/package.toml index 6e62088e..9e5a3cb0 100644 --- a/config/yazi/package.toml +++ b/config/yazi/package.toml @@ -10,58 +10,58 @@ hash = "e02a788e5b8ae0fb47fd0193dda589cc" [[plugin.deps]] use = "hankertrix/augment-command" -rev = "120406f" -hash = "e83ccc99739cd500fb1b1014dc45824a" +rev = "7c12bdf" +hash = "f7e6d377e4efee567ec6d1c2355f2ca3" [[plugin.deps]] use = "kirasok/torrent-preview" rev = "f465282" -hash = "b89b46a15035a51d010a254858ba9741" +hash = "d849ad596b8a77902e62a42403aeba40" [[plugin.deps]] use = "ndtoan96/ouch" -rev = "0742fff" -hash = "2bd799b42b8e42b8ef100310be71f8d1" +rev = "594b8a2" +hash = "c9e628fc0312d198db22ae2fa74883b" [[plugin.deps]] use = "pirafrank/what-size" -rev = "d896656" -hash = "62251f94eb67648d42cdfcfb8be0fad2" +rev = "179ebf6" +hash = "57056b9728006881d580ccabe8154a9c" [[plugin.deps]] use = "yazi-rs/plugins:git" -rev = "8f1d971" -hash = "63b6c222bf2103b3023389dde5e2ecfe" +rev = "e07bf41" +hash = "270915fa8282a19908449530ff66f7e2" [[plugin.deps]] use = "yazi-rs/plugins:chmod" -rev = "8f1d971" -hash = "8ad3e90b079190b4905f24a44f4ca06b" +rev = "e07bf41" +hash = "8da0b15a97b5dfd13941d1ecc617ac7c" [[plugin.deps]] use = "yazi-rs/plugins:full-border" -rev = "8f1d971" +rev = "e07bf41" hash = "3996fc74044bc44144b323686f887e1" [[plugin.deps]] use = "yazi-rs/plugins:mount" -rev = "8f1d971" -hash = "4fccaaf10c36dc2466e2438a386ff017" +rev = "e07bf41" +hash = "563e4068979d1466d3dfc2e70a296947" [[plugin.deps]] use = "yazi-rs/plugins:smart-filter" -rev = "8f1d971" -hash = "bcda8eeb3f4013bae156aecabfc745e8" +rev = "e07bf41" +hash = "407d19bc4fb46eff5fa8ff8337644847" [[plugin.deps]] use = "yazi-rs/plugins:diff" -rev = "8f1d971" -hash = "82376c3381ae915fd799d40f4dd4c6cd" +rev = "e07bf41" +hash = "2f08b8249b57737e7257298a3b2a2edc" [[plugin.deps]] use = "AnirudhG07/rich-preview" -rev = "831234e" -hash = "ed3363e256e210593f0f8e4cec3e36a9" +rev = "573b275" +hash = "c3e2871c9ef244fd181f203791f9b0d2" [[plugin.deps]] use = "macydnah/office" @@ -70,30 +70,30 @@ hash = "5805affd3ae8adcb3c72b6997d21c0a6" [[plugin.deps]] use = "boydaihungst/mediainfo" -rev = "7543154" -hash = "212fe977a845f44da073a397e0170e60" +rev = "dc61636" +hash = "2fa34959353b6f1a1c33659f50e098fd" [[plugin.deps]] use = "iynaix/time-travel" -rev = "7e0179e" -hash = "69967963fba96295a07b68354fc91ea9" +rev = "aaec6e2" +hash = "3d52b2b88c91a4ece2f7ed68ff39bb7b" [[plugin.deps]] use = "imsi32/yatline" -rev = "88bd1c5" -hash = "981acbe9b758b1af3a8154c932bb936d" - -[[flavor.deps]] -use = "Mintass/rose-pine" -rev = "8343340" -hash = "e2336631865c0f90276dcbc553d532fc" +rev = "c5d4b48" +hash = "e6e98d12b1648d1894c2b560d85eeaa7" [[flavor.deps]] use = "Mintass/rose-pine-moon" -rev = "aa2d937" -hash = "97cd4819252cb1a9d0f55daa14e481e" +rev = "94385fe" +hash = "edbe0dfb5db8ff37281dba62adc7e750" [[flavor.deps]] use = "Mintass/rose-pine-dawn" -rev = "5c6d353" -hash = "d9d9463d5d43ced18e18986d05439ace" +rev = "d82f54f" +hash = "15ae5f83d3770b9ffc276af77f642e2b" + +[[flavor.deps]] +use = "Mintass/rose-pine" +rev = "d91f8f2" +hash = "87da3630653b6d272e43658418599188" diff --git a/config/yazi/plugins/augment-command.yazi/README.md b/config/yazi/plugins/augment-command.yazi/README.md index 98b0a25d..7932a107 100644 --- a/config/yazi/plugins/augment-command.yazi/README.md +++ b/config/yazi/plugins/augment-command.yazi/README.md @@ -47,7 +47,7 @@ plugin. ## Requirements -- [Yazi][yazi-link] v25.5.31+ +- [Yazi][yazi-link] v25.12.29+ - [`7z` or `7zz` command][7z-link] - [`file` command][file-command-link] @@ -191,7 +191,6 @@ then it will operate on the selected items. [this section above][augment-section]. Videos: - - When `prompt` is set to `true`: [open-prompt-video] @@ -258,7 +257,6 @@ then it will operate on the selected items. [this section above][augment-section]. Videos: - - When `must_have_hovered_item` is `true`: [extract-must-have-hovered-item-video] @@ -304,27 +302,19 @@ then it will operate on the selected items. [opener] extract = [ - { run = 'ya pub augmented-extract --list "$@"', desc = "Extract here", for = "unix" }, - { run = 'ya pub augmented-extract --list %*', desc = "Extract here", for = "windows" }, + { run = "ya pub augmented-extract --list %s", desc = "Extract here" }, ] ``` - If that exceeds your editor's line length limit, - another way to do it is: + Alternatively, another way to do it is: ```toml # ~/.config/yazi/yazi.toml for Linux and macOS # %AppData%\yazi\config\yazi.toml for Windows [[opener.extract]] - run = 'ya pub augmented-extract --list "$@"' + run = "ya pub augmented-extract --list %s" desc = "Extract here" - for = "unix" - - [[opener.extract]] - run = 'ya pub augmented-extract --list %*' - desc = "Extract here" - for = "windows" ``` - The `extract` command supports recursively extracting archives, @@ -467,7 +457,6 @@ then it will operate on the selected items. [this section above][augment-section]. Videos: - - When `must_have_hovered_item` is `true`: [rename-must-have-hovered-item-video] @@ -490,7 +479,6 @@ then it will operate on the selected items. [this section above][augment-section]. Videos: - - When `must_have_hovered_item` is `true`: [remove-must-have-hovered-item-video] @@ -513,7 +501,6 @@ then it will operate on the selected items. [this section above][augment-section]. Videos: - - When `must_have_hovered_item` is `true`: [copy-must-have-hovered-item-video] @@ -604,7 +591,6 @@ then it will operate on the selected items. use the default `shell` command provided by Yazi. Videos: - - When `must_have_hovered_item` is `true`: [shell-must-have-hovered-item-video] @@ -623,8 +609,8 @@ then it will operate on the selected items. - To use this command, the syntax is exactly the same as the default `shell` command provided by Yazi. You just provide - the command you want and provide any Yazi shell variable, - which is documented [here][yazi-shell-variables]. + the command you want and provide any Yazi shell variable that + **provides the file path**, which is [documented here][yazi-shell-variables]. The plugin will automatically replace the shell variable you give with the file paths for the item group before executing the command. @@ -650,7 +636,7 @@ then it will operate on the selected items. [[mgr.prepend_keymap]] on = "i" - run = "plugin augment-command -- shell '$PAGER $@' --block --exit-if-dir" + run = "plugin augment-command -- shell '$PAGER %s' --block --exit-if-dir" desc = "Open the pager" ``` @@ -667,7 +653,7 @@ then it will operate on the selected items. [[mgr.prepend_keymap]] on = "o" - run = "plugin augment-command -- shell '$EDITOR $@' --block --exit-if-dir" + run = "plugin augment-command -- shell '$EDITOR %s' --block --exit-if-dir" desc = "Open the editor" ``` @@ -692,18 +678,10 @@ the shell command arguments, so here are a few ways to do it: # %AppData%\yazi\config\keymap.toml on Windows [[mgr.prepend_keymap]] on = "i" - run = "plugin augment-command -- shell --block 'bat -p --pager less $@'" + run = "plugin augment-command -- shell --block 'bat -p --pager less %s'" desc = "Open with bat" ``` - Even though the `$@` argument above is considered - a shell variable in Linux and macOS, - the plugin automatically replaces it with the full path - of the items in the item group, - so it does not need to be quoted with - double quotes `"`, as it is expanded by the plugin, - and not meant to be expanded by the shell. - 2. If the arguments to the `shell` command have special shell variables on Linux and macOS, like `$SHELL`, or special shell characters like `>`, `|`, or spaces, @@ -765,16 +743,12 @@ the shell command arguments, so here are a few ways to do it: on = "" run = '''plugin augment-command -- shell -- - paths=$(for p in $@; do echo "$p"; done | paste -s -d,) + paths=$(for p in %s; do echo "$p"; done | paste -s -d,) thunderbird -compose "attachment='$paths'" ''' desc = "Email files using Mozilla Thunderbird" ``` - Once again, the `$@` variable above does not need to be quoted - in double quotes `"` as it is expanded by the plugin - instead of the shell. - If the above few methods to avoid using backslashes within your shell command to escape the quotes are still insufficient for your use case, @@ -1043,7 +1017,6 @@ in your `keymap.toml` file. [this section above][augment-section]. Videos: - - When `must_have_hovered_item` is `true`: [archive-must-have-hovered-item-video] @@ -1149,7 +1122,6 @@ in your `keymap.toml` file. [this section above][augment-section]. Videos: - - When `must_have_hovered_item` is `true`: [editor-must-have-hovered-item-video] @@ -1181,7 +1153,6 @@ in your `keymap.toml` file. causing a flash and causing Yazi to send a notification. Videos: - - When `must_have_hovered_item` is `true`: [pager-must-have-hovered-item-video] diff --git a/config/yazi/plugins/augment-command.yazi/main.lua b/config/yazi/plugins/augment-command.yazi/main.lua index e6bd729f..0dba7a6b 100644 --- a/config/yazi/plugins/augment-command.yazi/main.lua +++ b/config/yazi/plugins/augment-command.yazi/main.lua @@ -1,4 +1,4 @@ ---- @since 25.5.31 +--- @since 25.12.29 -- Plugin to make some Yazi commands smarter -- Written in Lua 5.4 @@ -24,29 +24,50 @@ -- The type for the archiver list items command ---@alias Archiver.ListItemsCommand fun( --- self: Archiver, ----): output: CommandOutput|nil, error: Error|nil +---): output: Output?, error: Error? -- The type for the archiver get items function ---@alias Archiver.GetItems fun( --- self: Archiver, ----): files: string[], directories: string[], error: string|nil +---): files: string[], dirs: string[], result: Archiver.Result -- The type for the archiver extract function ---@alias Archiver.Extract fun( --- self: Archiver, ---- has_only_one_file: boolean|nil, +--- has_only_one_file: boolean?, ---): Archiver.Result -- The type for the archiver archive function ---@alias Archiver.Archive fun( --- self: Archiver, --- item_paths: string[], ---- password: string|nil, ---- encrypt_headers: boolean|nil, +--- password: string?, +--- encrypt_headers: boolean?, ---): Archiver.Result -- The type for the archiver command function ----@alias Archiver.Command fun(): output: CommandOutput|nil, error: Error|nil +---@alias Archiver.Command fun(): output: Output?, error: Error? + +-- The type for the Yazi input options +---@alias YaziInputOptions { +--- title: string, +--- value: string?, +--- obscure: boolean?, +--- pos: AsPos, +--- realtime: boolean?, +--- debounce: number?, +---} + +-- The type for the Yazi notification options +---@alias YaziNotificationOptions { +--- title: string, +--- content: string, +--- timeout: number, +--- level: "info"|"warn"|"error"|nil, +---} + +-- The type for the Yazi confirm options +---@alias YaziConfirmOptions { pos: AsPos, title: AsLine, body: AsText } -- The type of the function to get the password options ---@alias GetPasswordOptions fun(is_confirm_password: boolean): YaziInputOptions @@ -93,13 +114,13 @@ -- The type for the archiver function result ---@class (exact) Archiver.Result ---@field successful boolean Whether the archiver function was successful ----@field output string|nil The output of the archiver function ----@field cancelled boolean|nil boolean Whether the archiver was cancelled ----@field error string|nil The error message ----@field archive_path string|nil The path to the archive ----@field destination_path string|nil The path to the destination ----@field extracted_items_path string|nil The path to the extracted items ----@field archiver_name string|nil The name of the archiver +---@field output string? The output of the archiver function +---@field cancelled boolean? boolean Whether the archiver was cancelled +---@field error string? The error message +---@field archive_path string? The path to the archive +---@field destination_path string? The path to the destination +---@field extracted_items_path string? The path to the extracted items +---@field archiver_name string? The name of the archiver -- The module table ---@class AugmentCommandPlugin @@ -168,7 +189,7 @@ local INPUT_AND_CONFIRM_OPTIONS = { "title", "origin", "offset", - "content", + "body", } -- The default configuration for the plugin @@ -221,7 +242,7 @@ local DEFAULT_NOTIFICATION_OPTIONS = { -- The values are just dummy values -- so that I don't have to maintain two -- different types for the same thing. ----@type tab.Preference +---@type tab__Pref local TAB_PREFERENCE_KEYS = { sort_by = "alphabetical", sort_sensitive = false, @@ -300,7 +321,7 @@ local BASE_ARCHIVER_ERROR = table.concat({ -- The base archiver that all archivers inherit from ---@class Archiver ---@field name string The name of the archiver ----@field command string|nil The shell command for the archiver +---@field command string? The shell command for the archiver ---@field commands string[] The possible archiver commands --- --- Whether the archiver supports preserving file permissions @@ -334,7 +355,12 @@ end -- The method to get the archive items ---@type Archiver.GetItems -function Archiver:get_items() return {}, {}, BASE_ARCHIVER_ERROR end +function Archiver:get_items() + return {}, {}, { + successful = false, + error = BASE_ARCHIVER_ERROR, + } +end -- The method to extract the archive ---@type Archiver.Extract @@ -424,7 +450,7 @@ local get_mime_type_without_prefix_template_pattern = -- The pattern to get the shell variables in a command ---@type string -local shell_variable_pattern = "[%$%%][%*@0]" +local shell_variable_pattern = "%%[hs]%d?" -- The pattern to match the bat command ---@type string @@ -446,8 +472,8 @@ local bat_command_pattern = "%f[%a]bat%f[%A]" -- Pass true as the first parameter to get the function -- to merge the tables recursively. ---@param deep_or_target table|boolean|nil Recursively merge or not ----@param target table The target table to merge ----@param ... table[] The tables to merge +---@param target table? The target table to merge +---@param ... table[]? The tables to merge ---@return table merged_table The merged table local function merge_tables(deep_or_target, target, ...) -- @@ -489,6 +515,9 @@ local function merge_tables(deep_or_target, target, ...) args = { target, ... } end + -- The target table will not be nil after the checks above + ---@cast target_table table + -- Initialise the index variable local index = #target_table + 1 @@ -549,7 +578,7 @@ end -- Function to split a string into a list ---@param given_string string The string to split ----@param separator string|nil The character to split the string by +---@param separator string? The character to split the string by ---@return string[] splitted_strings The list of strings split by the character local function string_split(given_string, separator) -- @@ -705,7 +734,7 @@ end -- Function to show a warning ---@param warning_message any The warning message ----@param options YaziNotificationOptions|nil Options for the notification +---@param options YaziNotificationOptions? Options for the notification ---@return nil local function show_warning(warning_message, options) return ya.notify( @@ -718,7 +747,7 @@ end -- Function to show an error ---@param error_message any The error message ----@param options YaziNotificationOptions|nil Options for the notification +---@param options YaziNotificationOptions? Options for the notification ---@return nil local function show_error(error_message, options) return ya.notify( @@ -737,7 +766,7 @@ local function throw_error(error_message, ...) end -- Function to get the theme from an async function ----@type fun(): Th The theme object +---@type fun(): th The theme object local get_theme = ya.sync(function(state) return state.theme end) -- Function to get the component option string @@ -752,13 +781,13 @@ end ---@param component BuiltInComponents|PluginComponents The name of the component ---@param defaults { --- prompts: string|string[], -- The default prompts ---- content: string|ui.Line|ui.Text|nil, -- The default contents ---- origin: string|nil, -- The default origin ---- offset: Position|nil, -- The default offset +--- body: string|ui.Line|ui.Text|nil, -- The default body +--- origin: string?, -- The default origin +--- offset: ui.Pos?, -- The default offset ---} ----@param is_plugin_options boolean|nil Whether the options are plugin specific ----@param is_confirm boolean|nil Whether the component is the confirm component ----@param title_index integer|nil The index to get the title +---@param is_plugin_options boolean? Whether the options are plugin specific +---@param is_confirm boolean? Whether the component is the confirm component +---@param title_index integer? The index to get the title ---@return YaziInputOptions|YaziConfirmOptions options The resolved options local function get_user_input_or_confirm_options( component, @@ -808,7 +837,7 @@ local function get_user_input_or_confirm_options( end -- Unpack the options - local title_option, origin_option, offset_option, content_option = + local title_option, origin_option, offset_option, body_option = table.unpack(option_list) -- Get the value of all the options @@ -818,7 +847,7 @@ local function get_user_input_or_confirm_options( or defaults.origin or default_options[1] local offset = theme_config[offset_option or ""] or {} - local content = theme_config[content_option or ""] or defaults.content + local body = theme_config[body_option or ""] or defaults.body -- Get the title local title = type(raw_title) == "string" and raw_title @@ -837,16 +866,16 @@ local function get_user_input_or_confirm_options( -- Return the options return { title = title, - [is_confirm and "pos" or "position"] = position, - content = content, + pos = position, + body = body, } end -- Function to get a password from the user ---@param get_password_options GetPasswordOptions Get password options function ----@param want_confirmation boolean|nil Whether to get a confirmation password ----@return string|nil password The password or nil if the user cancelled ----@return InputEvent|nil event The event for the input function +---@param want_confirmation boolean? Whether to get a confirmation password +---@return string? password The password or nil if the user cancelled +---@return number? event The event for the input function local function get_password(get_password_options, want_confirmation) -- @@ -920,40 +949,38 @@ local function show_overwrite_prompt(file_path_to_overwrite) ConfigurableComponents.BuiltIn.Overwrite, { prompts = "Overwrite file?", - content = ui.Line("Will overwrite the following file:"), + body = ui.Line("Will overwrite the following file:"), }, false, true ) - -- Get the type of the overwrite content - local overwrite_content_type = type(overwrite_confirm_options.content) + -- Get the type of the overwrite body + ---@cast overwrite_confirm_options YaziConfirmOptions + local overwrite_body_type = type(overwrite_confirm_options.body) - -- Initialise the first line of the content + -- Initialise the first line of the body local first_line = nil - -- If the content section is a string - if - overwrite_content_type == "string" - or overwrite_content_type == "table" - then + -- If the body section is a string + if overwrite_body_type == "string" or overwrite_body_type == "table" then -- -- Wrap the string in a line and align it to the center. - first_line = ui.Line(overwrite_confirm_options.content) + first_line = ui.Line(overwrite_confirm_options.body) :align(ui.Align.CENTER) - -- Otherwise, just set the first line to the content given + -- Otherwise, just set the first line to the body given else - first_line = overwrite_confirm_options.content + first_line = overwrite_confirm_options.body end - -- Create the content for the overwrite prompt + -- Create the body for the overwrite prompt ---@cast first_line ui.Line|ui.Span - overwrite_confirm_options.content = ui.Text({ + overwrite_confirm_options.body = ui.Text({ first_line, ui.Line(string.rep("─", overwrite_confirm_options.pos.w - 2)) - :style(ui.Style(th.confirm.border)) + :style(th.confirm.border) :align(ui.Align.LEFT), ui.Line(tostring(file_path_to_overwrite)):align(ui.Align.LEFT), }):wrap(ui.Wrap.TRIM) @@ -967,7 +994,7 @@ local function show_overwrite_prompt(file_path_to_overwrite) end -- Function to merge the given configuration table with the default one ----@param config UserConfiguration|nil The configuration table to merge +---@param config UserConfiguration? The configuration table to merge ---@return UserConfiguration merged_config The merged configuration table local function merge_configuration(config) -- @@ -1069,7 +1096,7 @@ end -- Function to initialise the configuration ---@type fun( ---- user_config: UserConfiguration|nil, -- The configuration object +--- user_config: UserConfiguration?, -- The configuration object ---): Configuration The initialised configuration object local initialise_config = ya.sync(function(state, user_config) -- @@ -1090,7 +1117,7 @@ local initialise_config = ya.sync(function(state, user_config) end) -- Function to initialise the theme configuration ----@type fun(): Th +---@type fun(): th local initialise_theme = ya.sync(function(state) -- @@ -1130,9 +1157,9 @@ end) -- Function to try if a shell command exists ---@param shell_command string The shell command to check ----@param args string[]|nil The arguments to the shell command +---@param args string[]? The arguments to the shell command ---@return boolean shell_command_exists Whether the shell command exists ----@return CommandOutput|nil output The output of the shell command +---@return Output? output The output of the shell command local function async_shell_command_exists(shell_command, args) -- @@ -1194,9 +1221,9 @@ local subscribe_to_augmented_extract_event = ya.sync(function(_) end) -- Function to initialise the plugin ----@param opts UserConfiguration|nil The options given to the plugin +---@param opts UserConfiguration? The options given to the plugin ---@return Configuration config The initialised configuration object ----@return Th theme The saved theme object +---@return th theme The saved theme object local function initialise_plugin(opts) -- @@ -1246,7 +1273,7 @@ local function standardise_mime_type(mime_type) end -- Function to check if a given mime type is an archive ----@param mime_type string|nil The mime type of the file +---@param mime_type string? The mime type of the file ---@return boolean is_archive Whether the mime type is an archive local function is_archive_mime_type(mime_type) -- @@ -1266,7 +1293,7 @@ end -- Function to check if a given file extension -- is an archive file extension ----@param file_extension string|nil The file extension of the file +---@param file_extension string? The file extension of the file ---@return boolean is_archive Whether the file extension is an archive local function is_archive_file_extension(file_extension) -- @@ -1335,8 +1362,8 @@ end -- Function to get a temporary directory url -- for the given file path ---@param path string The path to the item to create a temporary directory ----@param destination_given boolean|nil Whether the destination was given ----@return Url|nil url The url of the temporary directory +---@param destination_given boolean? Whether the destination was given +---@return Url? url The url of the temporary directory local function get_temporary_directory_url(path, destination_given) -- @@ -1377,8 +1404,8 @@ local get_current_directory = ya.sync( -- Function to get the path of the hovered item ---@type fun( ---- quote: boolean|nil, -- Whether to escape the characters in the path ----): string|nil The path of the hovered item +--- quote: boolean?, -- Whether to escape the characters in the path +---): string? The path of the hovered item local get_path_of_hovered_item = ya.sync(function(_, quote) -- @@ -1425,8 +1452,8 @@ end) -- Function to get the paths of the selected items ---@type fun( ---- quote: boolean|nil, -- Whether to escape the characters in the path ----): string[]|nil The list of paths of the selected items +--- quote: boolean?, -- Whether to escape the characters in the path +---): string[]? The list of paths of the selected items local get_paths_of_selected_items = ya.sync(function(_, quote) -- @@ -1463,7 +1490,7 @@ end) local get_number_of_tabs = ya.sync(function() return #cx.tabs end) -- Function to get the tab preferences ----@type fun(): tab.Preference +---@type fun(): tab__Pref local get_tab_preferences = ya.sync(function(_) -- @@ -1488,7 +1515,7 @@ end) -- ItemGroup.Selected for the selected items, -- and ItemGroup.Prompt to tell the calling function -- to prompt the user. ----@type fun(): ItemGroup|nil The desired item group +---@type fun(): ItemGroup? The desired item group local get_item_group_from_state = ya.sync(function(state) -- @@ -1539,7 +1566,7 @@ local get_item_group_from_state = ya.sync(function(state) end) -- Function to prompt the user for their desired item group ----@return ItemGroup|nil item_group The item group selected by the user +---@return ItemGroup? item_group The item group selected by the user local function prompt_for_desired_item_group() -- @@ -1547,7 +1574,7 @@ local function prompt_for_desired_item_group() local config = get_config() -- Get the default item group - ---@type ItemGroup|nil + ---@type ItemGroup? local default_item_group = config.default_item_group_for_prompt -- Get the input options, which the (h/s) options @@ -1598,7 +1625,7 @@ local function prompt_for_desired_item_group() end -- Function to get the item group ----@return ItemGroup|nil item_group The desired item group +---@return ItemGroup? item_group The desired item group local function get_item_group() -- @@ -1619,7 +1646,7 @@ end -- Function to get all the items in the given directory ---@param directory_path string The path to the directory ---@param get_hidden_items boolean Whether to get hidden items ----@param directories_only boolean|nil Whether to only get directories +---@param directories_only boolean? Whether to only get directories ---@return string[] directory_items The list of urls to the directory items local function get_directory_items( directory_path, @@ -1716,8 +1743,8 @@ end -- The function to create a new instance of the archiver ---@param archive_path string The path to the archive ---@param config Configuration The configuration object ----@param destination_path string|nil The path to extract to ----@return Archiver|nil instance An instance of the archiver if available +---@param destination_path string? The path to extract to +---@return Archiver? instance An instance of the archiver if available function Archiver:new(archive_path, config, destination_path) -- @@ -1774,7 +1801,7 @@ end -- Function to retry the archiver ---@private ---@param archiver_function Archiver.Command Archiver command to retry ----@param clean_up_wanted boolean|nil Whether to clean up the destination path +---@param clean_up_wanted boolean? Whether to clean up the destination path ---@return Archiver.Result result Result of the archiver function function SevenZip:retry_archiver(archiver_function, clean_up_wanted) -- @@ -1898,7 +1925,7 @@ function SevenZip:retry_archiver(archiver_function, clean_up_wanted) -- Set the width of the component to the input width ---@cast password_input_options YaziInputOptions - password_input_options.position.w = input_width + password_input_options.pos.w = input_width -- Return the password input options return password_input_options @@ -1992,15 +2019,11 @@ function SevenZip:get_items() -- Get the output local output = archiver_result.output - -- Get the error - local error = archiver_result.error - -- If the archiver command was not successful, -- or the output was nil, - -- then return nil the error message, - -- and nil as the correct password + -- then return the result if not archiver_result.successful or not output then - return files, directories, error + return files, directories, archiver_result end -- Otherwise, split the output at the newline character @@ -2042,16 +2065,15 @@ function SevenZip:get_items() ::continue:: end - -- Return the list of files, the list of directories, - -- the error message, and the password - return files, directories, error + -- Return the list of files, the list of directories and the result + return files, directories, archiver_result end -- Function to extract an archive using the command ----@param extract_files_only boolean|nil Extract the files only or not ----@param extract_behaviour ExtractBehaviour|nil The extraction behaviour ----@return CommandOutput|nil output The output of the command ----@return Error|nil error The error if any +---@param extract_files_only boolean? Extract the files only or not +---@param extract_behaviour ExtractBehaviour? The extraction behaviour +---@return Output? output The output of the command +---@return Error? error The error if any function SevenZip:extract_command(extract_files_only, extract_behaviour) -- @@ -2128,10 +2150,10 @@ end -- Function to call the command to add items to an archive ---@param item_paths string[] The path to the items being added to the archive ----@param password string|nil The password to encrypt the archive with ----@param encrypt_headers boolean|nil Whether to encrypt the archive headers ----@return CommandOutput|nil output The output of the command ----@return Error|nil error The error if any +---@param password string? The password to encrypt the archive with +---@param encrypt_headers boolean? Whether to encrypt the archive headers +---@return Output? output The output of the command +---@return Error? error The error if any function SevenZip:archive_command(item_paths, password, encrypt_headers) -- @@ -2241,8 +2263,15 @@ function Tar:get_items() ---@type string[] local directories = {} - -- If there is no output, return the empty lists and the error - if not output then return files, directories, tostring(error) end + -- If there is no output, return the empty lists and the result + if not output then + return files, + directories, + { + successful = false, + error = tostring(error), + } + end -- Otherwise, split the output into lines and iterate over it for _, line in ipairs(string_split(output.stdout, "\n")) do @@ -2268,11 +2297,16 @@ function Tar:get_items() end -- Return the list of files and directories and the error - return files, directories, output.stderr + return files, + directories, + { + successful = true, + error = output.stderr, + } end -- Function to extract an archive using the command ----@param extract_behaviour ExtractBehaviour|nil The extract behaviour to use +---@param extract_behaviour ExtractBehaviour? The extract behaviour to use function Tar:extract_command(extract_behaviour) -- @@ -2437,8 +2471,8 @@ end ---@param archive_path string The path to the archive file ---@param command SupportedCommands The command the archiver is used for ---@param config Configuration The configuration for the plugin ----@param destination_path string|nil The path to the destination directory ----@return Archiver|nil archiver The archiver for the file type +---@param destination_path string? The path to the destination directory +---@return Archiver? archiver The archiver for the file type ---@return Archiver.Result result The results of getting the archiver local function get_archiver(archive_path, command, config, destination_path) -- @@ -2536,7 +2570,7 @@ local function move_extracted_items(archive_url, destination_url) -- The function to clean up the destination directory -- and return the archiver result in the event of an error ---@param error string The error message to return - ---@param empty_dir_only boolean|nil Whether to remove the empty dir only + ---@param empty_dir_only boolean? Whether to remove the empty dir only ---@return Archiver.Result local function fail(error, empty_dir_only) -- @@ -2675,7 +2709,7 @@ end ---@param archive_path string The path to the archive ---@param args Arguments The arguments passed to the plugin ---@param config Configuration The configuration object ----@param destination_path string|nil The destination path to extract to +---@param destination_path string? The destination path to extract to ---@return Archiver.Result extraction_result The extraction results local function recursively_extract_archive( archive_path, @@ -2739,21 +2773,13 @@ local function recursively_extract_archive( -- Get the list of archive files and directories, -- the error message and the password - local archive_files, archive_directories, error = archiver:get_items() + local archive_files, archive_directories, archiver_result = + archiver:get_items() - -- If there are no are no archive files and directories + -- If there are no are no archive files and directories, + -- return the extraction result if #archive_files == 0 and #archive_directories == 0 then - -- - - -- The extraction result - ---@type Archiver.Result - local extraction_result = { - successful = false, - error = error or "Archive is empty", - } - - -- Return the extraction result - return add_additional_info(extraction_result) + return add_additional_info(archiver_result) end -- Get if the archive has only one file @@ -3274,7 +3300,7 @@ end -- Function to enter or open the created file ---@param item_url Url The url of the item to create ----@param is_directory boolean|nil Whether the item to create is a directory +---@param is_directory boolean? Whether the item to create is a directory ---@param args Arguments The arguments passed to the plugin ---@param config Configuration The configuration object ---@return nil @@ -3890,18 +3916,18 @@ local function handle_quit(args, config) local quit_confirm_options = get_user_input_or_confirm_options(ConfigurableComponents.Plugin.Quit, { prompts = "Quit?", - content = ui.Text({ + body = ui.Text({ "There are multiple tabs open.", "Are you sure you want to quit?", }):wrap(ui.Wrap.TRIM), }, true, true) - -- Get the type of the quit content - local quit_content_type = type(quit_confirm_options.content) + -- Get the type of the quit body + local quit_body_type = type(quit_confirm_options.body) - -- If the type of the quit content is a string or a list of strings - if quit_content_type == "string" or quit_content_type == "table" then - quit_confirm_options.content = ui.Text(quit_confirm_options.content) + -- If the type of the quit body is a string or a list of strings + if quit_body_type == "string" or quit_body_type == "table" then + quit_confirm_options.body = ui.Text(quit_confirm_options.body) :wrap(ui.Wrap.TRIM) end @@ -4641,7 +4667,7 @@ local function handle_editor(args, config) if not editor then return end -- Initialise the shell command - local shell_command = string.format(editor .. " $@") + local shell_command = editor .. " %s" -- Get the cha object of the hovered file local hovered_item_cha = fs.cha( @@ -4653,7 +4679,7 @@ local function handle_editor(args, config) -- and sudo edit is supported, -- set the shell command to "sudo -e" if config.sudo_edit_supported and hovered_item_cha.uid == 0 then - shell_command = "sudo -e $@" + shell_command = "sudo -e %s" end -- Call the handle shell function @@ -4683,7 +4709,7 @@ local function handle_pager(args, config) -- with the pager command handle_shell( merge_tables({ - pager .. " $@", + pager .. " %s", block = true, exit_if_dir = true, }, args), @@ -4725,7 +4751,7 @@ local function run_command_func(command, args, config) } -- Get the function for the command - ---@type CommandFunction|nil + ---@type CommandFunction? local command_func = command_table[command] -- If the function isn't found, notify the user and exit the function @@ -4738,7 +4764,7 @@ local function run_command_func(command, args, config) end -- The setup function to setup the plugin ----@param opts UserConfiguration|nil The options given to the plugin +---@param opts UserConfiguration? The options given to the plugin ---@return nil function M:setup(opts) -- diff --git a/config/yazi/plugins/chmod.yazi/main.lua b/config/yazi/plugins/chmod.yazi/main.lua index a50a8645..a4dde679 100644 --- a/config/yazi/plugins/chmod.yazi/main.lua +++ b/config/yazi/plugins/chmod.yazi/main.lua @@ -1,4 +1,4 @@ ---- @since 25.5.31 +--- @since 25.12.29 local selected_or_hovered = ya.sync(function() local tab, paths = cx.active, {} @@ -11,6 +11,15 @@ local selected_or_hovered = ya.sync(function() return paths end) +local function fail(s, ...) + ya.notify { + title = "Chmod", + content = string.format(s, ...), + level = "error", + timeout = 5, + } +end + return { entry = function() ya.emit("escape", { visual = true }) @@ -23,20 +32,16 @@ return { local value, event = ya.input { title = "Chmod:", pos = { "top-center", y = 3, w = 40 }, - position = { "top-center", y = 3, w = 40 }, -- TODO: remove } if event ~= 1 then return end - local status, err = Command("chmod"):arg(value):arg(urls):spawn():wait() - if not status or not status.success then - ya.notify { - title = "Chmod", - content = string.format("Chmod on selected files failed, error: %s", status and status.code or err), - level = "error", - timeout = 5, - } + local output, err = Command("chmod"):arg(value):arg(urls):stderr(Command.PIPED):output() + if not output then + fail("Failed to run chmod: %s", err) + elseif not output.status.success then + fail("Chmod failed with stderr:\n%s", output.stderr:gsub("^chmod:%s*", "")) end end, } diff --git a/config/yazi/plugins/diff.yazi/main.lua b/config/yazi/plugins/diff.yazi/main.lua index 21dde6de..a8407673 100644 --- a/config/yazi/plugins/diff.yazi/main.lua +++ b/config/yazi/plugins/diff.yazi/main.lua @@ -1,4 +1,4 @@ ---- @since 25.2.7 +--- @since 26.1.22 local function info(content) return ya.notify { @@ -8,20 +8,20 @@ local function info(content) } end -local selected_url = ya.sync(function() +local selected_path = ya.sync(function() for _, u in pairs(cx.active.selected) do - return u + return u.cache or u end end) -local hovered_url = ya.sync(function() +local hovered_path = ya.sync(function() local h = cx.active.current.hovered - return h and h.url + return h and h.path end) return { entry = function() - local a, b = selected_url(), hovered_url() + local a, b = selected_path(), hovered_path() if not a then return info("No file selected") elseif not b then diff --git a/config/yazi/plugins/git.yazi/README.md b/config/yazi/plugins/git.yazi/README.md index 96a87a86..c014b381 100644 --- a/config/yazi/plugins/git.yazi/README.md +++ b/config/yazi/plugins/git.yazi/README.md @@ -15,36 +15,41 @@ ya pkg add yazi-rs/plugins:git Add the following to your `~/.config/yazi/init.lua`: ```lua -require("git"):setup() +require("git"):setup { + -- Order of status signs showing in the linemode + order = 1500, +} ``` And register it as fetchers in your `~/.config/yazi/yazi.toml`: ```toml [[plugin.prepend_fetchers]] -id = "git" -name = "*" -run = "git" +id = "git" +url = "*" +run = "git" [[plugin.prepend_fetchers]] -id = "git" -name = "*/" -run = "git" +id = "git" +url = "*/" +run = "git" ``` ## Advanced -> [!NOTE] +> [!NOTE] > The following configuration must be put before `require("git"):setup()` You can customize the [Style](https://yazi-rs.github.io/docs/plugins/layout#style) of the status sign with: -- `th.git.modified` -- `th.git.added` -- `th.git.untracked` -- `th.git.ignored` -- `th.git.deleted` -- `th.git.updated` +- `th.git.unknown` - status cannot/not yet determined +- `th.git.modified` - modified file +- `th.git.added` - added file +- `th.git.untracked` - untracked file +- `th.git.ignored` - ignored file +- `th.git.deleted` - deleted file +- `th.git.updated` - updated file +- `th.git.clean` - clean file For example: @@ -57,20 +62,24 @@ th.git.deleted = ui.Style():fg("red"):bold() You can also customize the text of the status sign with: -- `th.git.modified_sign` -- `th.git.added_sign` -- `th.git.untracked_sign` -- `th.git.ignored_sign` -- `th.git.deleted_sign` -- `th.git.updated_sign` +- `th.git.unknown_sign` - status cannot/not yet determined +- `th.git.modified_sign` - modified file +- `th.git.added_sign` - added file +- `th.git.untracked_sign` - untracked file +- `th.git.ignored_sign` - ignored file +- `th.git.deleted_sign` - deleted file +- `th.git.updated_sign` - updated file +- `th.git.clean_sign` - clean file For example: ```lua -- ~/.config/yazi/init.lua th.git = th.git or {} +th.git.unknown_sign = " " th.git.modified_sign = "M" th.git.deleted_sign = "D" +th.git.clean_sign = "✔" ``` ## License diff --git a/config/yazi/plugins/git.yazi/main.lua b/config/yazi/plugins/git.yazi/main.lua index e6b3a365..993be7e8 100644 --- a/config/yazi/plugins/git.yazi/main.lua +++ b/config/yazi/plugins/git.yazi/main.lua @@ -1,4 +1,4 @@ ---- @since 25.5.31 +--- @since 25.12.29 local WINDOWS = ya.target_family() == "windows" @@ -7,14 +7,15 @@ local WINDOWS = ya.target_family() == "windows" -- see `bubble_up` ---@enum CODES local CODES = { - excluded = 100, -- ignored directory + unknown = 100, -- status cannot/not yet determined + excluded = 99, -- ignored directory ignored = 6, -- ignored file untracked = 5, modified = 4, added = 3, deleted = 2, updated = 1, - unknown = 0, + clean = 0, } local PATTERNS = { @@ -79,7 +80,7 @@ local function bubble_up(changed) local url = Url(path).parent while url and url ~= empty do local s = tostring(url) - new[s] = (new[s] or CODES.unknown) > code and new[s] or code + new[s] = (new[s] or CODES.clean) > code and new[s] or code url = url.parent end end @@ -116,7 +117,7 @@ local add = ya.sync(function(st, cwd, repo, changed) st.dirs[cwd] = repo st.repos[repo] = st.repos[repo] or {} for path, code in pairs(changed) do - if code == CODES.unknown then + if code == CODES.clean then st.repos[repo][path] = nil elseif code == CODES.excluded then -- Mark the directory with a special value `excluded` so that it can be distinguished during UI rendering @@ -125,12 +126,7 @@ local add = ya.sync(function(st, cwd, repo, changed) st.repos[repo][path] = code end end - -- TODO: remove this - if ui.render then - ui.render() - else - ya.render() - end + ui.render() end) ---@param cwd string @@ -142,12 +138,7 @@ local remove = ya.sync(function(st, cwd) return end - -- TODO: remove this - if ui.render then - ui.render() - else - ya.render() - end + ui.render() st.dirs[cwd] = nil if not st.repos[repo] then return @@ -172,31 +163,39 @@ local function setup(st, opts) local t = th.git or {} local styles = { - [CODES.ignored] = t.ignored and ui.Style(t.ignored) or ui.Style():fg("darkgray"), - [CODES.untracked] = t.untracked and ui.Style(t.untracked) or ui.Style():fg("magenta"), - [CODES.modified] = t.modified and ui.Style(t.modified) or ui.Style():fg("yellow"), - [CODES.added] = t.added and ui.Style(t.added) or ui.Style():fg("green"), - [CODES.deleted] = t.deleted and ui.Style(t.deleted) or ui.Style():fg("red"), - [CODES.updated] = t.updated and ui.Style(t.updated) or ui.Style():fg("yellow"), + [CODES.unknown] = t.unknown or ui.Style(), + [CODES.ignored] = t.ignored or ui.Style():fg("darkgray"), + [CODES.untracked] = t.untracked or ui.Style():fg("magenta"), + [CODES.modified] = t.modified or ui.Style():fg("yellow"), + [CODES.added] = t.added or ui.Style():fg("green"), + [CODES.deleted] = t.deleted or ui.Style():fg("red"), + [CODES.updated] = t.updated or ui.Style():fg("yellow"), + [CODES.clean] = t.clean or ui.Style(), } local signs = { - [CODES.ignored] = t.ignored_sign or "", - [CODES.untracked] = t.untracked_sign or "?", - [CODES.modified] = t.modified_sign or "", - [CODES.added] = t.added_sign or "", - [CODES.deleted] = t.deleted_sign or "", - [CODES.updated] = t.updated_sign or "", + [CODES.unknown] = t.unknown_sign or "", + [CODES.ignored] = t.ignored_sign or " ", + [CODES.untracked] = t.untracked_sign or "? ", + [CODES.modified] = t.modified_sign or " ", + [CODES.added] = t.added_sign or " ", + [CODES.deleted] = t.deleted_sign or " ", + [CODES.updated] = t.updated_sign or " ", + [CODES.clean] = t.clean_sign or "", } Linemode:children_add(function(self) - local url = self._file.url - local repo = st.dirs[tostring(url.base)] - local code - if repo then - code = repo == CODES.excluded and CODES.ignored or st.repos[repo][tostring(url):sub(#repo + 2)] + if not self._file.in_current then + return "" end - if not code or signs[code] == "" then + local url = self._file.url + local repo = st.dirs[tostring(url.base or url.parent)] + local code = CODES.unknown + if repo then + code = repo == CODES.excluded and CODES.ignored or st.repos[repo][tostring(url):sub(#repo + 2)] or CODES.clean + end + + if signs[code] == "" then return "" elseif self._file.is_hovered then return ui.Line { " ", signs[code] } @@ -208,7 +207,7 @@ end ---@type UnstableFetcher local function fetch(_, job) - local cwd = job.files[1].url.base + local cwd = job.files[1].url.base or job.files[1].url.parent local repo = root(cwd) if not repo then remove(tostring(cwd)) @@ -246,11 +245,11 @@ local function fetch(_, job) end ya.dict_merge(changed, propagate_down(excluded, cwd, Url(repo))) - -- Reset the status of any files that don't appear in the output of `git status` to `unknown`, + -- Reset the status of any files that don't appear in the output of `git status` to `clean`, -- so that cleaning up outdated statuses from `st.repos` for _, path in ipairs(paths) do local s = path:sub(#repo + 2) - changed[s] = changed[s] or CODES.unknown + changed[s] = changed[s] or CODES.clean end add(tostring(cwd), repo, changed) diff --git a/config/yazi/plugins/git.yazi/types.lua b/config/yazi/plugins/git.yazi/types.lua new file mode 100644 index 00000000..99368495 --- /dev/null +++ b/config/yazi/plugins/git.yazi/types.lua @@ -0,0 +1,12 @@ +---@class State +---@field dirs table Mapping between a directory and its corresponding repository +---@field repos table Mapping between a repository and the status of each of its files + +---@class Options +---@field order number The order in which the status is displayed +---@field renamed boolean Whether to include renamed files in the status (or treat them as modified) + +-- TODO: move this to `types.yazi` once it's get stable +---@alias UnstableFetcher fun(self: unknown, job: { files: File[] }): boolean, Error? + +---@alias Changes table diff --git a/config/yazi/plugins/mediainfo.yazi/README.md b/config/yazi/plugins/mediainfo.yazi/README.md index 9498095b..7ad6dc9e 100644 --- a/config/yazi/plugins/mediainfo.yazi/README.md +++ b/config/yazi/plugins/mediainfo.yazi/README.md @@ -40,7 +40,6 @@ using `ffmpeg` if available and media metadata using `mediainfo`. ## Installation - Install mediainfo CLI: - - [https://mediaarea.net/en/MediaInfo/Download](https://mediaarea.net/en/MediaInfo/Download) - Run this command in terminal to check if it's installed correctly: @@ -52,7 +51,6 @@ using `ffmpeg` if available and media metadata using `mediainfo`. - Install ImageMagick (for linux, you can use your distro package manager to install): https://imagemagick.org/script/download.php - - Install this plugin: ```bash @@ -74,7 +72,7 @@ Create `.../yazi/yazi.toml` and add: > [!IMPORTANT] > -> For yazi nightly replace `name` with `url` +> For yazi (>=v25.12.29) replace `name` with `url` ```toml [plugin] @@ -120,3 +118,18 @@ title = { fg = "green" } # Example: `Format: FLAC` with blue color in preview images above tbl_col = { fg = "blue" } ``` + +## (Optional) Keymaps to hide metadata and to preview images in full screen + +> [!IMPORTANT] +> Use any key you want, but make sure there is no conflicts with [default Keybindings](https://github.com/sxyazi/yazi/blob/main/yazi-config/preset/keymap-default.toml). + +Since Yazi prioritizes the first matching key, `prepend_keymap` takes precedence over defaults. +Or you can use `keymap` to replace all other keys + +```toml +[mgr] + prepend_keymap = [ + { on = "", run = "plugin mediainfo -- toggle-metadata", desc = "Toggle media preview metadata" }, + ] +``` diff --git a/config/yazi/plugins/mediainfo.yazi/main.lua b/config/yazi/plugins/mediainfo.yazi/main.lua index 66eb8c9e..cde53cab 100644 --- a/config/yazi/plugins/mediainfo.yazi/main.lua +++ b/config/yazi/plugins/mediainfo.yazi/main.lua @@ -10,6 +10,16 @@ local skip_labels = { ["MD5 of the unencoded content"] = true, } +local ENTRY_ACTION = { + toggle_metadata = "toggle-metadata", +} + +local STATE_KEY = { + units = "units", + hide_metadata = "hide_metadata", + prev_metadata_area = "prev_metadata_area", +} + local magick_image_mimes = { avif = true, hei = true, @@ -18,8 +28,10 @@ local magick_image_mimes = { ["heif-sequence"] = true, ["heic-sequence"] = true, jxl = true, + tiff = true, xml = true, ["svg+xml"] = true, + ["canon-cr2"] = true, } local seekable_mimes = { @@ -76,7 +88,9 @@ local function image_layer_count(job) if layer_count then return layer_count end - local output, err = Command("identify"):arg({ tostring(job.file.url) }):output() + local output, err = Command("identify") + :arg({ tostring(job.file.path or job.file.cache or job.file.url.path or job.file.url) }) + :output() if err then return 0 end @@ -110,73 +124,85 @@ function M:peek(job) return end ya.sleep(math.max(0, rt.preview.image_delay / 1000 + start - os.clock())) - local cache_mediainfo_path = tostring(cache_img_url_no_skip) .. suffix - local output = read_mediainfo_cached_file(cache_mediainfo_path) - + local hide_metadata = get_state(STATE_KEY.hide_metadata) + local mediainfo_height = 0 local lines = {} local limit = job.area.h local last_line = 0 local is_wrap = rt.preview.wrap == "yes" - - if output then - local max_width = math.max(1, job.area.w) - if output:match("^Error:") then - job.args.force_reload_mediainfo = true - preload_status, preload_err = self:preload(job) - if not preload_status or preload_err then - return - end - output = read_mediainfo_cached_file(cache_mediainfo_path) - end - - for str in output:gsub("\n+$", ""):gmatch("[^\n]*") do - local label, value = str:match("(.*[^ ]) +: (.*)") - local line - if label then - if not skip_labels[label] then - line = ui.Line({ - ui.Span(label .. ": "):style(ui.Style():fg("reset"):bold()), - ui.Span(value):style(th.spot.tbl_col or ui.Style():fg("blue")), - }) + if not hide_metadata then + local cache_mediainfo_path = tostring(cache_img_url_no_skip) .. suffix + local output = read_mediainfo_cached_file(cache_mediainfo_path) + if output then + local max_width = math.max(1, job.area.w) + if output:match("^Error:") then + job.args.force_reload_mediainfo = true + preload_status, preload_err = self:preload(job) + if not preload_status or preload_err then + return end - elseif str ~= "General" then - line = ui.Line({ ui.Span(str):style(th.spot.title or ui.Style():fg("green")) }) + output = read_mediainfo_cached_file(cache_mediainfo_path) end - if line then - local line_height = math.max(1, is_wrap and math.ceil(ui.width(line) / max_width) or 1) - if (last_line + line_height) > job.skip then - table.insert(lines, line) + for str in output:gsub("\n+$", ""):gmatch("[^\n]*") do + local label, value = str:match("(.*[^ ]) +: (.*)") + local line + if label then + if not skip_labels[label] then + line = ui.Line({ + ui.Span(label .. ": "):style(ui.Style():fg("reset"):bold()), + ui.Span(value):style(th.spot.tbl_col or ui.Style():fg("blue")), + }) + end + elseif str ~= "General" then + line = ui.Line({ ui.Span(str):style(th.spot.title or ui.Style():fg("green")) }) end - if (last_line + line_height) >= job.skip + limit then - last_line = job.skip + limit - break + + if line then + local line_height = math.max(1, is_wrap and math.ceil(ui.width(line) / max_width) or 1) + if (last_line + line_height) > job.skip then + table.insert(lines, line) + end + if (last_line + line_height) >= job.skip + limit then + last_line = job.skip + limit + break + end + last_line = last_line + line_height end - last_line = last_line + line_height end end + mediainfo_height = math.min(limit, last_line) end - local mediainfo_height = math.min(limit, last_line) if - (job.skip > 0 and #lines == 0) + (job.skip > 0 and #lines == 0 and not hide_metadata) and ( not is_seekable or (is_video and job.skip >= 90) or ( (job.mime == "image/adobe.photoshop" or job.mime == "application/postscript") and image_layer_count(job) - < (1 + math.floor(math.max(0, get_state("units") and (job.skip / get_state("units")) or 0))) + < (1 + math.floor( + math.max(0, get_state(STATE_KEY.units) and (job.skip / get_state(STATE_KEY.units)) or 0) + )) ) ) then - ya.emit( - "peek", - { math.max(0, job.skip - (get_state("units") or limit)), only_if = job.file.url, upper_bound = true } - ) + ya.emit("peek", { + math.max(0, job.skip - (get_state(STATE_KEY.units) or limit)), + only_if = job.file.url, + upper_bound = true, + }) return end force_render() + -- NOTE: Hacky way to prevent image overlap with old metadata area + if hide_metadata and get_state(STATE_KEY.prev_metadata_area) then + ya.preview_widget(job, { + ui.Clear(ui.Rect(get_state(STATE_KEY.prev_metadata_area))), + }) + ya.sleep(0.1) + end local rendered_img_rect = cache_img_url and fs.cha(cache_img_url) and ya.image_show( @@ -189,7 +215,6 @@ function M:peek(job) }) ) or nil - local image_height = rendered_img_rect and rendered_img_rect.h or 0 -- NOTE: Workaround case audio has no cover image. Prevent regenerate preview image @@ -220,12 +245,19 @@ function M:peek(job) })) :wrap(is_wrap and ui.Wrap.YES or ui.Wrap.NO), }) + -- NOTE: Hacky way to prevent image overlap with old metadata area + set_state(STATE_KEY.prev_metadata_area, not hide_metadata and { + x = job.area.x, + y = job.area.y + image_height, + w = job.area.w, + h = job.area.h - image_height, + } or nil) end function M:seek(job) local h = cx.active.current.hovered if h and h.url == job.file.url then - set_state("units", job.units) + set_state(STATE_KEY.units, job.units) ya.emit("peek", { math.max(0, cx.active.preview.skip + job.units), only_if = job.file.url, @@ -242,7 +274,7 @@ function M:preload(job) cache_img_url = seekable_mimes[job.mime] and ya.file_cache(job) or cache_img_url local cache_img_url_cha = cache_img_url and fs.cha(cache_img_url) local err_msg = "" - local is_valid_utf8_path = is_valid_utf8(tostring(job.file.url)) + local is_valid_utf8_path = is_valid_utf8(tostring(job.file.path or job.file.cache or job.file.url)) -- video mimetype if job.mime then if string.find(job.mime, "^video/") then @@ -261,15 +293,11 @@ function M:preload(job) "error", "-threads", 1, - "-hwaccel", - "auto", - "-skip_frame", - "nokey", "-an", "-sn", "-dn", "-i", - tostring(job.file.url), + tostring(job.file.path or job.file.cache or job.file.url.path or job.file.url), "-vframes", 1, "-q:v", @@ -283,13 +311,17 @@ function M:preload(job) }):output() -- NOTE: Some audio types doesn't have cover image -> error "" if - (audio_preload_output and audio_preload_output.stderr ~= nil and audio_preload_output.stderr ~= "") - or audio_preload_err + ( + audio_preload_output + and audio_preload_output.stderr ~= nil + and audio_preload_output.stderr ~= "" + and not audio_preload_output.stderr:find("Output file does not contain any stream") + ) or audio_preload_err then err_msg = err_msg .. string.format("Failed to start `%s`, Do you have `%s` installed?\n", "ffmpeg", "ffmpeg") else - cache_img_url_cha = fs.cha(cache_img_url) + cache_img_url_cha, _ = fs.cha(cache_img_url) if not cache_img_url_cha then -- NOTE: Workaround case audio has no cover image. Prevent regenerate preview image audio_preload_output, audio_preload_err = require("magick") @@ -317,18 +349,18 @@ function M:preload(job) -- image elseif string.find(job.mime, "^image/") or job.mime == "application/postscript" then local svg_plugin_ok, svg_plugin = pcall(require, "svg") - local _, magick_plugin = pcall(require, "magick") + local magick_plugin_ok, magick_plugin = pcall(require, "magick") local mime = job.mime:match(".*/(.*)$") local image_plugin = magick_image_mimes[mime] - and ((mime == "svg+xml" and svg_plugin_ok) and svg_plugin or magick_plugin) + and ((mime == "svg+xml" and svg_plugin_ok) and svg_plugin or (magick_plugin_ok and magick_plugin)) or require("image") local cache_img_status, image_preload_err -- psd, ai, eps if mime == "adobe.photoshop" or job.mime == "application/postscript" then local layer_index = 0 - local units = get_state("units") + local units = get_state(STATE_KEY.units) if units ~= nil then local max_layer = image_layer_count(job) layer_index = math.floor(math.max(0, job.skip / units)) @@ -346,7 +378,10 @@ function M:preload(job) :arg({ "-background", "none", - tostring(job.file.url) .. "[" .. tostring(layer_index) .. "]", + tostring(job.file.path or job.file.cache or job.file.url.path or job.file.url) + .. "[" + .. tostring(layer_index) + .. "]", "-auto-orient", "-strip", "-resize", @@ -371,7 +406,7 @@ function M:preload(job) :arg({ "-background", "none", - tostring(job.file.url), + tostring(job.file.path or job.file.cache or job.file.url.path or job.file.url), "-auto-orient", "-strip", "-flatten", @@ -403,15 +438,20 @@ function M:preload(job) local cmd = "mediainfo" local output, err if is_valid_utf8_path then - output, err = Command(cmd):arg({ tostring(job.file.url) }):output() + output, err = Command(cmd) + :arg({ tostring(job.file.path or job.file.cache or job.file.url.path or job.file.url) }) + :output() else cmd = "cd " - .. path_quote(job.file.url.parent) + .. path_quote(job.file.path or job.file.cache or (job.file.url.path or job.file.url).parent) .. " && " .. cmd .. " " - .. path_quote(tostring(job.file.url.name)) - output, err = Command(SHELL):arg({ "-c", cmd }):arg({ tostring(job.file.url) }):output() + .. path_quote(tostring(job.file.path or job.file.cache or job.file.url.name)) + output, err = Command(SHELL) + :arg({ "-c", cmd }) + :arg({ tostring(job.file.path or job.file.cache or (job.file.url.path or job.file.url)) }) + :output() end if err then err_msg = err_msg .. string.format("Failed to start `%s`, Do you have `%s` installed?\n", cmd, cmd) @@ -422,4 +462,15 @@ function M:preload(job) ) end +function M:entry(job) + local action = job.args[1] + + if action == ENTRY_ACTION.toggle_metadata then + set_state(STATE_KEY.hide_metadata, not get_state(STATE_KEY.hide_metadata)) + ya.emit("peek", { + force = true, + }) + end +end + return M diff --git a/config/yazi/plugins/mount.yazi/main.lua b/config/yazi/plugins/mount.yazi/main.lua index b3204170..2aef4145 100644 --- a/config/yazi/plugins/mount.yazi/main.lua +++ b/config/yazi/plugins/mount.yazi/main.lua @@ -1,4 +1,4 @@ ---- @since 25.5.31 +--- @since 25.12.29 local toggle_ui = ya.sync(function(self) if self.children then @@ -7,12 +7,7 @@ local toggle_ui = ya.sync(function(self) else self.children = Modal:children_add(self, 10) end - -- TODO: remove this - if ui.render then - ui.render() - else - ya.render() - end + ui.render() end) local subscribe = ya.sync(function(self) @@ -23,12 +18,7 @@ end) local update_partitions = ya.sync(function(self, partitions) self.partitions = partitions self.cursor = math.max(0, math.min(self.cursor or 0, #self.partitions - 1)) - -- TODO: remove this - if ui.render then - ui.render() - else - ya.render() - end + ui.render() end) local active_partition = ya.sync(function(self) return self.partitions[self.cursor + 1] end) @@ -39,12 +29,7 @@ local update_cursor = ya.sync(function(self, cursor) else self.cursor = ya.clamp(0, self.cursor + cursor, #self.partitions - 1) end - -- TODO: remove this - if ui.render then - ui.render() - else - ya.render() - end + ui.render() end) local M = { @@ -272,24 +257,33 @@ function M.operate(type) return -- TODO: mount/unmount main disk end - local output, err + local cmd if ya.target_os() == "macos" then - output, err = Command("diskutil"):arg({ type, active.src }):output() + cmd = Command("diskutil"):arg { type, active.src } end if ya.target_os() == "linux" then if type == "eject" and active.src:match("^/dev/sr%d+") then Command("udisksctl"):arg({ "unmount", "-b", active.src }):status() - output, err = Command("eject"):arg({ "--traytoggle", active.src }):output() + cmd = Command("eject"):arg { "--traytoggle", active.src } elseif type == "eject" then Command("udisksctl"):arg({ "unmount", "-b", active.src }):status() - output, err = Command("udisksctl"):arg({ "power-off", "-b", active.src }):output() + cmd = Command("udisksctl"):arg { "power-off", "-b", active.src } else - output, err = Command("udisksctl"):arg({ type, "-b", active.src }):output() + cmd = Command("udisksctl"):arg { type, "-b", active.src } end end + if not cmd then + return M.fail("mount.yazi is not currently supported on your platform") + end + + local output, err = cmd:output() if not output then - M.fail("Failed to %s `%s`: %s", type, active.src, err) + if cmd.program then + M.fail("Failed to spawn `%s`: %s", cmd.program, err) + else + M.fail("Failed to spawn `udisksctl`: %s", err) -- TODO: remove + end elseif not output.status.success then M.fail("Failed to %s `%s`: %s", type, active.src, output.stderr) end diff --git a/config/yazi/plugins/ouch.yazi/README.md b/config/yazi/plugins/ouch.yazi/README.md index 571cefb0..d8c2b88e 100644 --- a/config/yazi/plugins/ouch.yazi/README.md +++ b/config/yazi/plugins/ouch.yazi/README.md @@ -35,29 +35,38 @@ Make sure you have [ouch](https://github.com/ouch-org/ouch) installed and in you For archive preview, add this to your `yazi.toml`: ```toml -[plugin] -prepend_previewers = [ - # Archive previewer - { mime = "application/*zip", run = "ouch" }, - { mime = "application/x-tar", run = "ouch" }, - { mime = "application/x-bzip2", run = "ouch" }, - { mime = "application/x-7z-compressed", run = "ouch" }, - { mime = "application/x-rar", run = "ouch" }, - { mime = "application/vnd.rar", run = "ouch" }, - { mime = "application/x-xz", run = "ouch" }, - { mime = "application/xz", run = "ouch" }, - { mime = "application/x-zstd", run = "ouch" }, - { mime = "application/zstd", run = "ouch" }, - { mime = "application/java-archive", run = "ouch" }, -] +[[plugin.prepend_previewers]] +mime = "application/{*zip,tar,bzip2,7z*,rar,xz,zstd,java-archive}" +run = "ouch" ``` Now go to an archive on Yazi, you should see the archive's content in the preview pane. You can use `J` and `K` to roll up and down the preview. -If you want to change the icon or the style of text, you can modify the `peek` function in `init.lua` file (all of them are stored in the `lines` variable). +#### Customization + +Previews can be customized by adding extra arguments in the `run` string: + +```toml +[plugin] +prepend_previewers = [ + # Change the top-level archive icon + { ..., run = "ouch --archive-icon='🗄️ '" }, + # Or remove it by setting it to '' + { ..., run = "ouch --archive-icon=''" }, + + # Enable file icons + { ..., run = "ouch --show-file-icons" }, + + # Disable tree view + { ..., run = "ouch --list-view" }, + + # These can be combined + { ..., run = "ouch --archive-icon='🗄️ ' --show-file-icons --list-view" }, +] +``` ### Compression -For compession, add this to your `keymap.toml`: +For compression, add this to your `keymap.toml`: ```toml [[mgr.prepend_keymap]] diff --git a/config/yazi/plugins/ouch.yazi/main.lua b/config/yazi/plugins/ouch.yazi/main.lua index 4b6a7395..ef93c870 100644 --- a/config/yazi/plugins/ouch.yazi/main.lua +++ b/config/yazi/plugins/ouch.yazi/main.lua @@ -1,15 +1,50 @@ local M = {} +-- Extract the tree prefix (if any) from a line +local function get_tree_prefix(line) + local _, prefix_len = line:find("─ ", 1, true) + if prefix_len then + return line:sub(1, prefix_len) + else + return "" + end +end + +-- Add a filetype icon to a line +local function line_with_icon(line) + line = line:gsub("[\r\n]+$", "") -- Trailing newlines mess with filetype detection + + local tree_prefix = get_tree_prefix(line) + local url = line:sub(#tree_prefix + 1) + local icon = File({ + url = Url(url), + cha = Cha { + mode = tonumber(url:sub(-1) == "/" and "40700" or "100644", 8), + kind = url:sub(-1) == "/" and 1 or 0, -- For Yazi <25.9.x compatibility + } + }):icon() + + if icon then + line = ui.Line { tree_prefix, ui.Span(icon.text .. " "):style(icon.style), url } + end + + return line +end + function M:peek(job) - local child = Command("ouch") - :arg({ "l", "-t", "-y", tostring(job.file.url) }) + local cmd = Command("ouch"):arg("l") + if not job.args.list_view then + cmd:arg("-t") + end + cmd:arg({ "-y", tostring(job.file.url) }) :stdout(Command.PIPED) :stderr(Command.PIPED) - :spawn() + + local child = cmd:spawn() local limit = job.area.h + local archive_icon = job.args.archive_icon or "\u{1f4c1} " local file_name = string.match(tostring(job.file.url), ".*[/\\](.*)") - local lines = string.format("\u{1f4c1} %s\n", file_name) - local num_lines = 1 + local lines = { string.format(" %s%s", archive_icon, file_name) } local num_skip = 0 repeat local line, event = child:read_line() @@ -21,19 +56,29 @@ function M:peek(job) if line:find('Archive', 1, true) ~= 1 and line:find('[INFO]', 1, true) ~= 1 then if num_skip >= job.skip then - lines = lines .. line - num_lines = num_lines + 1 + if job.args.show_file_icons then + if line:find ('[ERROR]', 1, true) == 1 then + -- On error, disable file icons for the rest of the output + job.args.show_file_icons = false + elseif line:find ('[WARNING]', 1, true) ~= 1 then + -- Show icons for non-warning lines only + line = line_with_icon(line) + end + end + + line = ui.Line { " ", line } -- One space padding + table.insert(lines, line) else num_skip = num_skip + 1 end end - until num_lines >= limit + until #lines >= limit child:start_kill() - if job.skip > 0 and num_lines < limit then + if job.skip > 0 and #lines < limit then ya.emit( "peek", - { tostring(math.max(0, job.skip - (limit - num_lines))), only_if = tostring(job.file.url), upper_bound = "" } + { tostring(math.max(0, job.skip - (limit - #lines))), only_if = tostring(job.file.url), upper_bound = "" } ) else ya.preview_widget(job, { ui.Text(lines):area(job.area) }) @@ -125,7 +170,6 @@ function M:entry(job) local output_name, name_event = ya.input({ title = "Create archive:", value = default_name .. "." .. default_fmt, - position = { "top-center", y = 3, w = 40 }, pos = { "top-center", y = 3, w = 40 }, }) if name_event ~= 1 then @@ -136,7 +180,6 @@ function M:entry(job) if file_exists(output_name) then local confirm, confirm_event = ya.input({ title = "Overwrite " .. output_name .. "? (y/N)", - position = { "top-center", y = 3, w = 40 }, pos = { "top-center", y = 3, w = 40 }, }) if not (confirm_event == 1 and confirm:lower() == "y") then diff --git a/config/yazi/plugins/rich-preview.yazi/README.md b/config/yazi/plugins/rich-preview.yazi/README.md index 2daf95a0..4557fc1a 100644 --- a/config/yazi/plugins/rich-preview.yazi/README.md +++ b/config/yazi/plugins/rich-preview.yazi/README.md @@ -40,12 +40,12 @@ Add the below to your `yazi.toml` file to allow the respective file to previewed [plugin] prepend_previewers = [ - { name = "*.csv", run = "rich-preview"}, # for csv files - { name = "*.md", run = "rich-preview" }, # for markdown (.md) files - { name = "*.rst", run = "rich-preview"}, # for restructured text (.rst) files - { name = "*.ipynb", run = "rich-preview"}, # for jupyter notebooks (.ipynb) - { name = "*.json", run = "rich-preview"}, # for json (.json) files -# { name = "*.lang_type", run = "rich-preview"} # for particular language files eg. .py, .go., .lua, etc. + { url = "*.csv", run = "rich-preview"}, # for csv files + { url = "*.md", run = "rich-preview" }, # for markdown (.md) files + { url = "*.rst", run = "rich-preview"}, # for restructured text (.rst) files + { url = "*.ipynb", run = "rich-preview"}, # for jupyter notebooks (.ipynb) + { url = "*.json", run = "rich-preview"}, # for json (.json) files +# { url = "*.lang_type", run = "rich-preview"} # for particular language files eg. .py, .go., .lua, etc. ] ``` @@ -78,7 +78,7 @@ To use `rich` with piper, you can add this in your `yazi.toml` file: ```toml [[plugin.prepend_previewers]] -name = "*.md" +url = "*.md" run = 'piper -- rich -j --left --panel=rounded --guides --line-numbers --force-terminal "$1"' ``` diff --git a/config/yazi/plugins/smart-filter.yazi/main.lua b/config/yazi/plugins/smart-filter.yazi/main.lua index 146e265c..2d1c3cde 100644 --- a/config/yazi/plugins/smart-filter.yazi/main.lua +++ b/config/yazi/plugins/smart-filter.yazi/main.lua @@ -1,4 +1,4 @@ ---- @since 25.5.31 +--- @since 25.12.29 local hovered = ya.sync(function() local h = cx.active.current.hovered @@ -17,7 +17,6 @@ local function prompt() return ya.input { title = "Smart filter:", pos = { "center", w = 50 }, - position = { "center", w = 50 }, -- TODO: remove realtime = true, debounce = 0.1, } diff --git a/config/yazi/plugins/time-travel.yazi/README.md b/config/yazi/plugins/time-travel.yazi/README.md index 37a519ef..e5fc7c40 100644 --- a/config/yazi/plugins/time-travel.yazi/README.md +++ b/config/yazi/plugins/time-travel.yazi/README.md @@ -8,11 +8,11 @@ https://github.com/user-attachments/assets/6d2fc9e7-f86e-4444-aab6-4e11e51e8b34 ## Installation ```sh -ya pack -a iynaix/time-travel +ya pkg add iynaix/time-travel ``` > [!NOTE] -> The minimum required yazi version is 25.2.7. +> The minimum required yazi version is 25.12.29. ## Usage @@ -21,17 +21,17 @@ Add keymaps similar to the following to your `~/.config/yazi/keymap.toml`: ```toml [[manager.prepend_keymap]] on = ["z", "h"] -run = "plugin time-travel --args=prev" +run = "plugin time-travel prev" desc = "Go to previous snapshot" [[manager.prepend_keymap]] on = ["z", "l"] -run = "plugin time-travel --args=next" +run = "plugin time-travel next" desc = "Go to next snapshot" [[manager.prepend_keymap]] on = ["z", "e"] -run = "plugin time-travel --args=exit" +run = "plugin time-travel exit" desc = "Exit browsing snapshots" ``` diff --git a/config/yazi/plugins/time-travel.yazi/main.lua b/config/yazi/plugins/time-travel.yazi/main.lua index f19c261e..a2c1b479 100644 --- a/config/yazi/plugins/time-travel.yazi/main.lua +++ b/config/yazi/plugins/time-travel.yazi/main.lua @@ -23,7 +23,7 @@ end --- Verify if `sudo` is already authenticated --- @return boolean local function sudo_already() - local status = Command("sudo"):args({ "--validate", "--non-interactive" }):status() + local status = Command("sudo"):arg({ "--validate", "--non-interactive" }):status() assert(status, "Failed to run `sudo --validate --non-interactive`") return status.success end @@ -36,12 +36,12 @@ end --- nil: no error --- 1: sudo failed local function run_with_sudo(program, args) - local cmd = Command("sudo"):args({ program, table.unpack(args) }):stdout(Command.PIPED):stderr(Command.PIPED) + local cmd = Command("sudo"):arg({ program, table.unpack(args) }):stdout(Command.PIPED):stderr(Command.PIPED) if sudo_already() then return cmd:output() end - local permit = ya.hide() + local permit = ui.hide() print(string.format("Sudo password required to run: `%s %s`", program, table.concat(args, " "))) local output = cmd:output() permit:drop() @@ -67,7 +67,7 @@ end ---@param cwd string ---@return string|nil local get_filesystem_type = function(cwd) - local stat, _ = Command("stat"):args({ "-f", "-c", "%T", cwd }):output() + local stat, _ = Command("stat"):arg({ "-f", "-c", "%T", cwd }):output() if not stat.status.success then return nil end @@ -77,7 +77,7 @@ end ---@param cwd string ---@return string|nil local zfs_dataset = function(cwd) - local df, _ = Command("df"):args({ "--output=source", cwd }):output() + local df, _ = Command("df"):arg({ "--output=source", cwd }):output() local dataset = nil for line in df.stdout:gmatch("[^\r\n]+") do -- dataset is last line in output @@ -89,7 +89,7 @@ end ---@param dataset string ---@return string|nil local zfs_mountpoint = function(dataset) - local zfs, _ = Command("zfs"):args({ "get", "-H", "-o", "value", "mountpoint", dataset }):output() + local zfs, _ = Command("zfs"):arg({ "get", "-H", "-o", "value", "mountpoint", dataset }):output() -- not a dataset! if not zfs.status.success then @@ -157,7 +157,7 @@ end ---@return Snapshot[] local zfs_snapshots = function(dataset, mountpoint, relative) -- -S is for reverse order - local zfs_snapshots, _ = Command("zfs"):args({ "list", "-H", "-t", "snapshot", "-o", "name", "-S", "creation", + local zfs_snapshots, _ = Command("zfs"):arg({ "list", "-H", "-t", "snapshot", "-o", "name", "-S", "creation", dataset }) :output() @@ -183,7 +183,7 @@ end ---@param cwd string ---@return string|nil local function btrfs_mountpoint(cwd) - local cmd, _ = Command("findmnt"):args({ "-no", "TARGET", "-T", cwd }):output() + local cmd, _ = Command("findmnt"):arg({ "-no", "TARGET", "-T", cwd }):output() if not cmd.status.success then return nil end @@ -329,7 +329,7 @@ return { end if action == "exit" then - ya.manager_emit("cd", { latest_path }) + ya.emit("cd", { latest_path }) return end @@ -343,7 +343,7 @@ return { local find_and_goto_snapshot = function(start_idx, end_idx, step) if start_idx == 0 then -- going from newest snapshot to current state - return ya.manager_emit("cd", { latest_path }) + return ya.emit("cd", { latest_path }) elseif start_idx < 0 then return notify_warn("No earlier snapshots found.") elseif start_idx > #snapshots then @@ -353,7 +353,7 @@ return { for i = start_idx, end_idx, step do local snapshot_dir = snapshots[i].path if io.open(snapshot_dir, "r") then - return ya.manager_emit("cd", { snapshot_dir }) + return ya.emit("cd", { snapshot_dir }) end end diff --git a/config/yazi/plugins/torrent-preview.yazi/init.lua b/config/yazi/plugins/torrent-preview.yazi/init.lua new file mode 100644 index 00000000..7dad02d1 --- /dev/null +++ b/config/yazi/plugins/torrent-preview.yazi/init.lua @@ -0,0 +1,43 @@ +local M = {} + +function M:peek(job) + local child = Command("transmission-show") + :arg(tostring(job.file.url)) + :stdout(Command.PIPED) + :stderr(Command.PIPED) + :spawn() + + if not child then + return require("code"):peek(job) + end + + local limit = job.area.h + local i, lines = 0, "" + repeat + local next, event = child:read_line() + if event == 1 then + return require("code"):peek(job) + elseif event ~= 0 then + break + end + + i = i + 1 + if i > job.skip then + lines = lines .. next + end + until i >= job.skip + limit + + child:start_kill() + if job.skip > 0 and i < job.skip + limit then + ya.manager_emit("peek", { math.max(0, i - limit), only_if = job.file.url, upper_bound = true }) + else + lines = lines:gsub("\t", string.rep(" ", rt.preview.tab_size)) + ya.preview_widget(job, { ui.Text.parse(lines):area(job.area) }) + end +end + +function M:seek(job) + require("code"):seek(job) +end + +return M diff --git a/config/yazi/plugins/what-size.yazi/README.md b/config/yazi/plugins/what-size.yazi/README.md index 99d318bb..3883140f 100644 --- a/config/yazi/plugins/what-size.yazi/README.md +++ b/config/yazi/plugins/what-size.yazi/README.md @@ -14,31 +14,46 @@ what-size supports Yazi on Linux, macOS, and Windows. ### Yazi -- yazi `25.5.28` and onwards since commit `c5c939b` ([link](https://github.com/pirafrank/what-size.yazi/commit/c5c939bb37ec1d132c942cf5724d4e847acc2977)) -- yazi `25.x`-`25.4.8` since commit `fce1778` ([link](https://github.com/pirafrank/what-size.yazi/commit/fce1778d911621dc57796cdfdf11dcda3c2e28de)) -- yazi `0.4.x` since commit `2780de5` ([link](https://github.com/pirafrank/what-size.yazi/commit/2780de5aeef1ed16d1973dd6e0cd4d630c900d56)) -- yazi `0.3.x` up to commit `f08f7f2` ([link](https://github.com/pirafrank/what-size.yazi/commit/f08f7f2d5c94958ac4cb66c51a7c24b4319c6c93)) +In an effort to make things easy, I keep `compatibility/yazi-x.y.z` branches with each pointing to the most up-to-date commit compatible with yazi release `x.y.z`. Full table below. + +|Yazi releases|what-size branch name| +|---|---| +|*[latest stable](https://github.com/sxyazi/yazi/releases/latest)*|`main`| +|`25.5.28`|`compatibility/yazi-25.5.28`| +|`25.x`-`25.4.8`|`compatibility/yazi-25.4.8`| +|`0.4.x`|`compatibility/yazi-0.4.x`| +|`0.3.x`|`compatibility/yazi-0.3.x`| + +Please notice that `nightly` releses may work but are not explicitly supported. ## Requirements +### Before Yazi's version 25.5.28 + +- Use this commit: [Old version](https://github.com/pirafrank/what-size.yazi/commit/d8966568f2a80394bf1f9a1ace6708ddd4cc8154) - `du` on Linux and macOS - PowerShell on Windows +### On Yazi's version 25.5.28 or newer + +- No requirement + ## Installation ```sh ya pkg add pirafrank/what-size ``` -or +or (**DEPRECATED** - use only for yazi `25.4.8` and older): -**DEPRECATED** ```sh ya pack -a 'pirafrank/what-size' ``` ## Usage +### Keymap + Add this to your `~/.config/yazi/keymap.toml`: ```toml @@ -54,18 +69,30 @@ If you want to copy the result to clipboard, you can add `--clipboard` or `-c` a [[mgr.prepend_keymap]] on = [ ".", "s" ] run = "plugin what-size -- '--clipboard'" -desc = "Calc size of selection or cwd" +desc = "Calc size of sel/cwd + paste to clipboard" ``` ```toml [[mgr.prepend_keymap]] on = [ ".", "s" ] run = "plugin what-size -- '-c'" -desc = "Calc size of selection or cwd" +desc = "Calc size of sel/cwd + paste to clipboard" ``` Change to whatever keybinding you like. +### User interface (optional) + +If you want to place the size value exactly where you want, modify the priority value. Also changing two strings `LEFT` and `RIGHT` will add them to the left and right side of the value. Remember to add to and change these lines inside your `init.lua` file if you want to customize, or the plugin will use this configuration by default: + +```lua +require("what-size"):setup({ + priority = 400, + LEFT = "", + RIGHT = " ", +}) +``` + ## Feedback If you have any feedback, suggestions, or ideas please let me know by opening an issue. @@ -82,6 +109,16 @@ YAZI_LOG=debug yazi Logs will be saved to `~.local/state/yazi/yazi.log` file. +### Plugin definition + +The repo already has a `.luarc.json` file. You only need to run the following to add the `types` plugin dependency: + +```sh +ya pkg add yazi-rs/plugins:types +``` + +as per the [docs](https://github.com/yazi-rs/plugins/tree/main/types.yazi). + ## Contributing Contributions are welcome. Please fork the repository and submit a PR. diff --git a/config/yazi/plugins/what-size.yazi/main.lua b/config/yazi/plugins/what-size.yazi/main.lua index 5b2b9fb4..00b9109b 100644 --- a/config/yazi/plugins/what-size.yazi/main.lua +++ b/config/yazi/plugins/what-size.yazi/main.lua @@ -1,102 +1,238 @@ +--- @since 25.5.28 +-- This plugin is now only supporting Yazi's version 25.5.28 or newer +-- since commit https://github.com/sxyazi/yazi/pull/2695 --- function to get paths of selected elements or current directory --- if no elements are selected -local get_paths = ya.sync(function() - local paths = {} - -- get selected files - for _, u in pairs(cx.active.selected) do - paths[#paths + 1] = tostring(u) - end - -- if no files are selected, get current directory - if #paths == 0 then - if cx.active.current.cwd then - paths[1] = tostring(cx.active.current.cwd) - else - ya.err("what-size would return nil paths") +-- TODO: Asynchronous calculating and dynamic displaying in statusline, +-- perhaps by using this: +-- https://yazi-rs.github.io/docs/plugins/utils/#ps.sub +-- and by using ui.render() method +-- See also: +-- https://github.com/sxyazi/yazi/pull/1903 +-- https://yazi-rs.github.io/docs/dds/#kinds +-- https://github.com/sxyazi/yazi/pull/2210 +-- https://github.com/imsi32/yatline.yazi +-- TODO: Add options to choose displaying in popup box or in statusline +-- TODO: Add spotter and previewer widget to support simpler displaying +-- TODO: Remove note [1] and [2] after add them to the setup +-- configuration + +-- Get selected paths {{{1 +local get_selected_paths = ya.sync(function(state) + local result = {} + if cx and cx.active and cx.active.selected then + for _, url in pairs(cx.active.selected) do + result[#result + 1] = url + end end - end - return paths + return result end) - --- Function to get total size from output --- Unix use `du`, Windows use PowerShell +-- }}}1 +-- Get current working directory in sync context {{{1 +local get_cwd = ya.sync(function(state) + if cx and cx.active and cx.active.current and cx.active.current.cwd then + return cx.active.current.cwd + end + return nil +end) +-- }}}1 +-- Function to get paths of selected files or current directory {{{1 +--- @param selected table Table of selected urls +--- @return paths table Table of selected urls +local function get_paths(selected) + -- If no files are selected, get current directory + if #selected == 0 then + local paths = {} + -- Try fs.cwd() first (async, optimized for slow devices) + local cwd, err = fs.cwd() + if cwd then + paths[1] = cwd + else + -- Fallback to cx.active.current.cwd (via sync block) + local sync_cwd = get_cwd() + if sync_cwd then + paths[1] = sync_cwd + else + ya.notify { + title = "What size", + content = "Cannot get current working directory: " .. (err or "unknown error"), + timeout = 5, + level = "error", + } + end + end + return paths + else + -- This variable is a table of urls already + return selected + end +end +-- }}}1 +-- Function to get total size using Yazi's fs.calc_size API {{{1 +-- See: https://github.com/sxyazi/yazi/pull/2695 +-- See: https://github.com/sxyazi/yazi/blob/main/yazi-plugin/preset/plugins/folder.lua local function get_total_size(items) - local is_windows = package.config:sub(1,1) == '\\' - - if is_windows then local total = 0 - for _, path in ipairs(items) do - path = path:gsub('"', '\\"') - local ps_cmd = string.format( - [[powershell -Command "& { $p = '%s'; if (Test-Path $p) { if ((Get-ChildItem -Path $p -Recurse -Force -ErrorAction SilentlyContinue | Measure-Object Length -Sum).Sum) { (Get-ChildItem -Path $p -Recurse -Force -ErrorAction SilentlyContinue | Measure-Object Length -Sum).Sum } else { (Get-Item $p).Length } } }"]], - path - ) - local pipe = io.popen(ps_cmd) - local result = pipe:read("*a") - -- Debug - -- ya.notify { - -- title = "Debug Output", - -- content = result, - -- timeout = 5, - -- } - pipe:close() - local num = tonumber(result) - if num then total = total + num end + for _, url in ipairs(items) do + local it = fs.calc_size(url) + while true do + local next = it:recv() + if next then + total = total + next + else + break + end + end end return total - else - local arg = ya.target_os() == "macos" and "-scA" or "-scb" - -- pass args as string - local cmd = Command("du"):arg(arg) - for _, path in ipairs(items) do - cmd = cmd:arg(path) - end - local output, err = cmd:output() - - if not output then - ya.err("Failed to run du: " .. err) - end - local lines = {} - for line in output.stdout:gmatch("[^\n]+") do - lines[#lines + 1] = line - end - local last_line = lines[#lines] - local size = tonumber(last_line:match("^(%d+)")) - return ya.target_os() == "macos" and size * 512 or size - end end - --- Function to format file size +-- }}}1 +-- Function to format files/folders size {{{1 local function format_size(size) - local units = { "B", "KB", "MB", "GB", "TB" } - local unit_index = 1 - while size > 1024 and unit_index < #units do - size = size / 1024 - unit_index = unit_index + 1 - end - return string.format("%.2f %s", size, units[unit_index]) -end - -return { - -- as per doc: https://yazi-rs.github.io/docs/plugins/overview#functional-plugin - entry = function(_, job) - -- defaults not to use clipboard, use it only if required by the user - local clipboard = job.args.clipboard == true or job.args[1] == "--clipboard" or job.args[1] == "-c" - local items = get_paths() - - local total_size = get_total_size(items) - local formatted_size = format_size(total_size) - - local notification_content = "Total size: " .. formatted_size - if clipboard then - ya.clipboard(formatted_size) - notification_content = notification_content .. "\nCopied to clipboard." + local units = { "B", "KB", "MB", "GB", "TB" } + local unit_index = 1 + while size > 1024 and unit_index < #units do + size = size / 1024 + unit_index = unit_index + 1 end + return string.format("%.2f %s", size, units[unit_index]) +end +-- }}}1 +-- Generic setter for any state field {{{1 +local set_state = ya.sync(function(state, field, value) + state[field] = value +end) +-- }}}1 +-- Generic getter for any state field {{{1 +local get_state = ya.sync(function(state, field) + return state[field] or nil +end) +-- }}}1 +-- Get selecting state {{{1 +local get_selected = ya.sync(function() + return (not cx.active.mode.is_visual) and (#cx.active.selected ~= 0) +end) +-- }}}1 +-- Set separators {{{1 +local set_separator = ya.sync(function(state, table) + if table and table.LEFT and table.RIGHT then + state.LEFT = table.LEFT + state.RIGHT = table.RIGHT + else + state.LEFT = " " + state.RIGHT = " " + end +end) +-- }}}1 +-- Get separators {{{1 +local get_separator = ya.sync(function(state) + return {state.LEFT, state.RIGHT} +end) +-- }}}1 +-- Redraw statusline {{{1 +local redraw_statusline = ya.sync(function(state) + ui.render() +end) +-- }}}1 +-- Set ui line in statusline for size, clean up when no selection exists {{{1 +-- @return of get_state("renewed_state") number or nil Returning -1 +-- means never show the size - suitable for setup function; +-- returning 0 means the size will be shown after triggering the +-- calculation, but without unselect the selections, or it will be +-- hidden after nothing is selected; returning 1 means hidden when +-- nothing is selected as said. +local set_ui_line = function(state) + local sep_left, sep_right = table.unpack(get_separator()) - ya.notify { - title = "What size", - content = notification_content, - timeout = 4, - } - end, -} \ No newline at end of file + if get_state("renewed_state") == -1 then + return "" + else + if not get_selected() then + if not get_state("is_held") then + set_state("renewed_state", 1) + return "" + end + -- NOTE [1]: Set this line if DON'T want to clear the value + -- in the statusline when move the cursor, after calculating + -- with NO selection(s). Or just return "" + return ui.Span(sep_left .. get_state("size") .. sep_right) + end + if get_state("renewed_state") == 0 then + return ui.Span(sep_left .. get_state("size") .. sep_right) + else + -- NOTE [2]: Set this line if want to clear the value in the + -- statusline when move the cursor, after calculating WITH + -- selection: return ui.Span(sep_left .. get_state("size") .. sep_right) + -- or just remove after the unselection like below + return "" + end + end +end +-- }}}1 + +--- @since 25.12.29 +return { + entry = function(self, job) + local clipboard = job.args.clipboard or job.args[1] == '-c' + + local selected = get_selected_paths() + local prepend_msg + -- Keep showing the size after CWD calculation (no selections) + if #selected == 0 then + set_state("is_held", true) + prepend_msg = "Current Dir: " + else + set_state("is_held", false) + prepend_msg = "Selected: " + end + + local items = get_paths(selected) + if not items or #items == 0 then + ya.notify { + title = "What size", + content = "Failed to get paths", + timeout = 5, + } + return + end + + local total_size = get_total_size(items) + if not total_size then + ya.notify { + title = "What size", + content = "Failed to calculate size", + timeout = 5, + } + return + end + + local formatted_size = format_size(total_size) + + local notification_content = prepend_msg .. formatted_size + if clipboard then + ya.clipboard(formatted_size) + notification_content = notification_content .. "\nCopied to clipboard." + end + ya.notify { + title = "What size", + content = notification_content, + timeout = 4, + } + + set_state("size", formatted_size) + set_state("renewed_state", 0) + redraw_statusline() + end, + + setup = function(state, opts) + opts = opts or {} + local priority = opts.priority or 400 + set_separator(opts) + set_state("renewed_state", -1) + + if Status and type(Status.children_add) == "function" then + Status:children_add(set_ui_line, priority, Status.RIGHT) + else + ya.err("Failed to initialize status bar: Status or children_add not available") + end + end, +} diff --git a/config/yazi/plugins/yatline.yazi/README.md b/config/yazi/plugins/yatline.yazi/README.md index 6e381349..1ee9c1eb 100644 --- a/config/yazi/plugins/yatline.yazi/README.md +++ b/config/yazi/plugins/yatline.yazi/README.md @@ -1,4 +1,5 @@ # yatline.yazi + The first Yazi plugin for customizing both header-line and status-line. ![yatline](https://github.com/user-attachments/assets/61013ec8-7fd9-42df-a9f4-f254663871fe) @@ -7,13 +8,16 @@ The first Yazi plugin for customizing both header-line and status-line. > Check out [wiki](https://github.com/imsi32/yatline.yazi/wiki) for installation steps, configuration and further information. ## Features + - Lualine-like Design - Flexible - Simple - Automatic Configuration +- Support for Yazi Plugins - Themes (See: [yatline-themes](https://github.com/imsi32/yatline-themes)) - Add-ons (See: [yatline-addons](https://github.com/imsi32/yatline-addons)) ## Credits + - [Lualine](https://github.com/nvim-lualine/lualine.nvim) - [Yazi](https://github.com/sxyazi/yazi) diff --git a/config/yazi/plugins/yatline.yazi/main.lua b/config/yazi/plugins/yatline.yazi/main.lua index a4e5d1a3..eda7213b 100644 --- a/config/yazi/plugins/yatline.yazi/main.lua +++ b/config/yazi/plugins/yatline.yazi/main.lua @@ -1,4 +1,4 @@ ---- @since 25.5.31 +--- @since 25.12.29 --- @diagnostic disable: undefined-global, undefined-field --- @alias Mode Mode Comes from Yazi. --- @alias Rect Rect Comes from Yazi. @@ -6,87 +6,177 @@ --- @alias Line Line Comes from Yazi. --- @alias Span Span Comes from Yazi. --- @alias Color Color Comes from Yazi. ---- @alias Config Config The config used for setup. ---- @alias Coloreds Coloreds The array returned by colorizer in {{string, Color}, {string, Color} ... } format ---- @alias Side # [ LEFT ... RIGHT ] ---- | `enums.LEFT` # The left side of either the header-line or status-line. [ LEFT ... ] ---- | `enums.RIGHT` # The right side of either the header-line or status-line. [ ... RIGHT] ---- @alias SeparatorType ---- | `enums.OUTER` # Separators on the outer side of sections. [ c o | c o | c o ... ] or [ ... o c | o c | o c ] ---- | `enums.INNER` # Separators on the inner side of sections. [ c i c | c i c | c i c ... ] or [ ... c i c | c i c | c i c ] ---- @alias ComponentType ---- | `enums.A` # Components on the first section. [ A | | ... ] or [ ... | | A ] ---- | `enums.B` # Components on the second section. [ | B | ... ] or [ ... | B | ] ---- | `enums.C` # Components on the third section. [ | | C ... ] or [ ... C | | ] --==================-- -- Type Declaration -- --==================-- +--- @enum Side +local Side = { + LEFT = 0, -- The left side of either the header-line or status-line. [ LEFT ... ] + RIGHT = 1, -- The right side of either the header-line or status-line. [ ... RIGHT] +} + +--- @enum SeparatorType +local SeparatorType = { + OUTER = 0, -- Separators on the outer side of sections. [ c o | c o | c o ... ] or [ ... o c | o c | o c ] + INNER = 1, -- Separators on the inner side of sections. [ c i c | c i c | c i c ... ] or [ ... c i c | c i c | c i c ] +} + +--- @enum ComponentType +local ComponentType = { + A = 0, -- Components on the first section. [ A | | ... ] or [ ... | | A ] + B = 1, -- Components on the second section. [ | B | ... ] or [ ... | B | ] + C = 2, -- Components on the third section. [ | | C ... ] or [ ... C | | ] +} + +--- @alias Colored [string, Color] Stores text and its foreground color. +--- @alias Coloreds Colored[] The array of Coloreds. + +--- @generic T +--- @alias T T Type of the component. + +--- @class Yatline +--- @field config YatlineConfig Configuration of Yatline. +--- @field string? {} Table that stores string components. +--- @field line? {} Table that stores Line components. +--- @field coloreds? {} Table that stores Coloreds components. Yatline = {} -local Side = { LEFT = 0, RIGHT = 1 } -local SeparatorType = { OUTER = 0, INNER = 1 } -local ComponentType = { A = 0, B = 1, C = 2 } +--- @class (exact) ComponentConfig +--- @field type string Defines the type of the component (T). +--- @field custom? boolean Toggles the usage of a function defined or name field. +--- @field name string | T Either defined function name or variable of defined type T. +--- @field params? {} Contains the parameters that can be used by the function called. ---=========================-- --- Variable Initialization -- ---=========================-- +--- @class (exact) SideConfig +--- @field section_a ComponentConfig[] Array of configuration of components in the first section. +--- @field section_b ComponentConfig[] Array of configuration of components in the second section. +--- @field section_c ComponentConfig[] Array of configuration of components in the third section. -local section_separator_open -local section_separator_close +--- @class (exact) LineConfig +--- @field left SideConfig Configuration of the left side of the line. +--- @field right SideConfig Configuration of the right side of the line. -local inverse_separator_open -local inverse_separator_close +--- @class (exact) YatlineConfig +--- @field section_separator {open: string, close: string} Separators that are between sections. +--- @field part_separator {open: string, close: string} Separators that are between components. +--- @field inverse_separator {open: string, close: string} Separators that are used when foreground color of separator is reset. +--- @field padding {inner: integer, outer: integer} Number of space padding surronding the component. +--- @field style_a {bg: Color, fg: Color, bg_mode: {normal: Color, select: Color, un_set: Color}} Style of the first section. +--- @field style_b {bg: Color, fg: Color} Style of the second section. +--- @field style_c {bg: Color, fg: Color} Style of the third section. +--- @field permissions_t_fg Color Foreground color of the type of permission. +--- @field permissions_r_fg Color Foreground color of the read permission. +--- @field permissions_w_fg Color Foreground color of the write permission. +--- @field permissions_x_fg Color Foreground color of the execute permission. +--- @field permissions_s_fg Color Foreground color of the separators between permission. +--- @field tab_width integer Maximum tab width of the tabs component. +--- @field selected {icon: string, fg: Color} Configuration for the count of files that selected. +--- @field copied {icon: string, fg: Color} Configuration for the count of files that copied. +--- @field cut {icon: string, fg: Color} Configuration for the count of files that cut. +--- @field files {icon: string, fg: Color} Configuration for the count of files in the active tab. +--- @field filtereds {icon: string, fg: Color} Configuration for the count of files in the active tab that are filtered. +--- @field total {icon: string, fg: Color} Configuration for the count of progress tasks that finished. +--- @field success {icon: string, fg: Color} Configuration for the count of progress tasks that successed. +--- @field failed {icon: string, fg: Color} Configuration for the count of progress tasks that failed. +--- @field show_background boolean Toggle the visibility of the background where no component exists. +--- @field display_header_line boolean Toggle the visibility of the header-line. +--- @field display_status_line boolean Toggle the visibility of the status-line. +--- @field component_positions string[] Arrange positions of the Yazi sections. +--- @field header_line LineConfig Configuration of header-line components. +--- @field status_line LineConfig Configuration of status-line components. +Yatline.config = { + section_separator = { open = "", close = "" }, + part_separator = { open = "", close = "" }, + inverse_separator = { open = "", close = "" }, -local part_separator_open -local part_separator_close + padding = { inner = 1, outer = 1 }, -local separator_style = { bg = nil, fg = nil } + style_a = { + bg = "white", + fg = "black", + bg_mode = { + normal = "white", + select = "brightyellow", + un_set = "brightred", + }, + }, + style_b = { bg = "brightblack", fg = "brightwhite" }, + style_c = { bg = "black", fg = "brightwhite" }, -local style_a -local style_b -local style_c + permissions_t_fg = "green", + permissions_r_fg = "yellow", + permissions_w_fg = "red", + permissions_x_fg = "cyan", + permissions_s_fg = "white", -local style_a_normal_bg -local style_a_select_bg -local style_a_un_set_bg + tab_width = 20, -local permissions_t_fg -local permissions_r_fg -local permissions_w_fg -local permissions_x_fg -local permissions_s_fg + selected = { icon = "󰻭", fg = "yellow" }, + copied = { icon = "", fg = "green" }, + cut = { icon = "", fg = "red" }, -local tab_width + files = { icon = "", fg = "blue" }, + filtereds = { icon = "", fg = "magenta" }, -local selected_icon -local copied_icon -local cut_icon -local files_icon -local filtereds_icon + total = { icon = "󰮍", fg = "yellow" }, + success = { icon = "", fg = "green" }, + failed = { icon = "", fg = "red" }, -local selected_fg -local copied_fg -local cut_fg -local files_fg -local filtereds_fg + show_background = true, -local task_total_icon -local task_succ_icon -local task_fail_icon -local task_found_icon -local task_processed_icon + display_header_line = true, + display_status_line = true, -local task_total_fg -local task_succ_fg -local task_fail_fg -local task_found_fg -local task_processed_fg + component_positions = { "header", "tab", "status" }, -local show_background + header_line = { + left = { + section_a = { + { type = "line", name = "tabs" }, + }, + section_b = {}, + section_c = {}, + }, + right = { + section_a = { + { type = "string", name = "date", params = { "%A, %d %B %Y" } }, + }, + section_b = { + { type = "string", name = "date", params = { "%X" } }, + }, + section_c = {}, + }, + }, -local section_order = { "section_a", "section_b", "section_c" } + status_line = { + left = { + section_a = { + { type = "string", name = "tab_mode" }, + }, + section_b = { + { type = "string", name = "hovered_size" }, + }, + section_c = { + { type = "string", name = "hovered_path" }, + { type = "coloreds", name = "count" }, + }, + }, + right = { + section_a = { + { type = "string", name = "cursor_position" }, + }, + section_b = { + { type = "string", name = "cursor_percentage" }, + }, + section_c = { + { type = "string", name = "hovered_file_extension", params = { true } }, + { type = "coloreds", name = "permissions" }, + }, + }, + }, +} --=================-- -- Component Setup -- @@ -97,45 +187,133 @@ local section_order = { "section_a", "section_b", "section_c" } --- @see cx.active.mode To get the active tab's mode. local function set_mode_style(mode) if mode.is_select then - style_a.bg = style_a_select_bg + Yatline.config.style_a.bg = Yatline.config.style_a.bg_mode.select elseif mode.is_unset then - style_a.bg = style_a_un_set_bg + Yatline.config.style_a.bg = Yatline.config.style_a.bg_mode.un_set else - style_a.bg = style_a_normal_bg + Yatline.config.style_a.bg = Yatline.config.style_a.bg_mode.normal end end +--- Helper function to apply style table to a component +--- @param component Span The component to style +--- @param style table The style table with fg and/or bg fields +local function apply_style_table(component, style) + if not style then + return component + end + -- Apply manually + if style.fg then + component:fg(style.fg) + end + if style.bg then + component:bg(style.bg) + end + if style.bold then + component:bold() + end + if style.dim then + component:dim() + end + if style.italic then + component:italic() + end + if style.underline then + component:underline() + end + if style.blink then + component:blink() + end + if style.blink_rapid then + component:blink_rapid() + end + if style.reverse then + component:reverse() + end + if style.hidden then + component:hidden() + end + if style.crossed then + component:crossed() + end + + return component +end + +--- Helper function to apply style table to a component +--- @param component Span The component to style +--- @param style table The style table with fg and/or bg fields +local function apply_style_table(component, style) + if not style then + return component + end + -- Apply manually + if style.fg then component:fg(style.fg) end + if style.bg then component:bg(style.bg) end + if style.bold then component:bold() end + if style.dim then component:dim() end + if style.italic then component:italic() end + if style.underline then component:underline() end + if style.blink then component:blink() end + if style.blink_rapid then component:blink_rapid() end + if style.reverse then component:reverse() end + if style.hidden then component:hidden() end + if style.crossed then component:crossed() end + return component +end + --- Sets the style of the component according to the its type. --- @param component Span Component that will be styled. --- @param component_type ComponentType Which section component will be in [ a | b | c ]. --- @see Style To see how to style, in Yazi's documentation. local function set_component_style(component, component_type) if component_type == ComponentType.A then - component:style(style_a):bold() + apply_style_table(component, Yatline.config.style_a):bold() elseif component_type == ComponentType.B then - component:style(style_b) + apply_style_table(component, Yatline.config.style_b) else - component:style(style_c) + apply_style_table(component, Yatline.config.style_c) + end +end + +--- Surronds component with paddings. +--- @param component string | Span | Line Component that will be connected to paddings. +--- @param component_type ComponentType Which section component will be in [ a | b | c ]. +--- @param in_side Side Left or right side of the either header-line or status-line. +--- @return Line line A Line which is a component that has padding. +local function connect_padding(component, component_type, in_side) + local inner = ui.Span(string.rep(" ", Yatline.config.padding.inner)) + local outer = ui.Span(string.rep(" ", Yatline.config.padding.outer)) + + set_mode_style(cx.active.mode) + set_component_style(inner, component_type) + set_component_style(outer, component_type) + + if in_side == Side.LEFT then + return ui.Line({ outer, component, inner }) + else + return ui.Line({ inner, component, outer }) end end --- Connects component to a separator. --- @param component Span Component that will be connected to separator. ---- @param side Side Left or right side of the either header-line or status-line. +--- @param in_side Side Left or right side of the either header-line or status-line. --- @param separator_type SeparatorType Where will there be a separator in the section. ---- @return Line line A Line which has component and separator. -local function connect_separator(component, side, separator_type) +--- @param separator_style {bg: string?, fg: string?} Holds the style of the separator. +--- @return Line line A Line which may have either both component and separator, or component. +local function connect_separator(component, in_side, separator_type, separator_style) local open, close if separator_type == SeparatorType.OUTER and not (separator_style.bg == "reset" and separator_style.fg == "reset") then - open = ui.Span(section_separator_open) - close = ui.Span(section_separator_close) + open = ui.Span(Yatline.config.section_separator.open) + close = ui.Span(Yatline.config.section_separator.close) if separator_style.fg == "reset" then - if separator_style.bg ~= "reset" and separator_style.bg ~= nil then - open = ui.Span(inverse_separator_open) - close = ui.Span(inverse_separator_close) + if separator_style.bg ~= "" then + open = ui.Span(Yatline.config.inverse_separator.open) + close = ui.Span(Yatline.config.inverse_separator.close) separator_style.fg, separator_style.bg = separator_style.bg, separator_style.fg else @@ -143,14 +321,14 @@ local function connect_separator(component, side, separator_type) end end else - open = ui.Span(part_separator_open) - close = ui.Span(part_separator_close) + open = ui.Span(Yatline.config.part_separator.open) + close = ui.Span(Yatline.config.part_separator.close) end - open:style(separator_style) - close:style(separator_style) + apply_style_table(open, separator_style) + apply_style_table(close, separator_style) - if side == Side.LEFT then + if in_side == Side.LEFT then return ui.Line({ component, close }) else return ui.Line({ open, component }) @@ -324,41 +502,34 @@ Yatline.string.has_separator = true --- @see set_mode_style To know how mode style selected. --- @see set_component_style To know how component style applied. function Yatline.string.create(string, component_type) - local span = ui.Span(" " .. string .. " ") + local span = ui.Span(string) set_mode_style(cx.active.mode) set_component_style(span, component_type) return ui.Line({ span }) end ---- Configuration for getting hovered file's name ---- @class HoveredNameConfig ---- @field trimed? boolean Whether to trim the filename if it's too long (default: false) ---- @field max_length? integer Maximum length of the filename (default: 24) ---- @field trim_length? integer Length of each end when trimming (default: 10) ---- @field show_symlink? boolean Whether to show symlink target (default: false) --- Gets the hovered file's name of the current active tab. ---- @param config? HoveredNameConfig Configuration for getting hovered file's name +--- @param trimmed? boolean Whether to trim the filename if it's too long (default: false) +--- @param max_length? integer Maximum length of the filename (default: 24) +--- @param trim_length? integer Length of each end when trimming (default: 10) +--- @param show_symlink? boolean Whether to show symlink target (default: false) --- @return string name Current active tab's hovered file's name -function Yatline.string.get:hovered_name(config) +function Yatline.string.get:hovered_name(trimmed, max_length, trim_length, show_symlink) + trimmed = trimmed or false + max_length = max_length or 24 + trim_length = trim_length or 10 + show_symlink = show_symlink or false + local hovered = cx.active.current.hovered if not hovered then return "" end - if not config then - return hovered.name - end - - local trimed = config.trimed or false - local max_length = config.max_length or 24 - local trim_length = config.trim_length or 10 - local show_symlink = config.show_symlink or false - local link_delimiter = " -> " local linked = (show_symlink and hovered.link_to ~= nil) and (link_delimiter .. tostring(hovered.link_to)) or "" - if trimed then + if trimmed then local trimmed_name = trim_filename(hovered.name, max_length, trim_length) local trimmed_linked = #linked ~= 0 and link_delimiter .. trim_filename( @@ -373,29 +544,22 @@ function Yatline.string.get:hovered_name(config) end end ---- Configuration for getting hovered file's path ---- @class HoveredPathConfig ---- @field trimed? boolean Whether to trim the file path if it's too long (default: false) ---- @field max_length? integer Maximum length of the file path (default: 24) ---- @field trim_length? integer Length of each end when trimming (default: 10) --- Gets the hovered file's path of the current active tab. ---- @param config? HoveredPathConfig Configuration for getting hovered file's path +--- @param trimmed? boolean Whether to trim the file path if it's too long (default: false) +--- @param max_length? integer Maximum length of the file path (default: 24) +--- @param trim_length? integer Length of each end when trimming (default: 10) --- @return string path Current active tab's hovered file's path. -function Yatline.string.get:hovered_path(config) +function Yatline.string.get:hovered_path(trimmed, max_length, trim_length) + trimmed = trimmed or false + max_length = max_length or 24 + trim_length = trim_length or 10 + local hovered = cx.active.current.hovered if not hovered then return "" end - if not config then - return ya.readable_path(tostring(hovered.url)) - end - - local trimed = config.trimed or false - local max_length = config.max_length or 24 - local trim_length = config.trim_length or 10 - - if trimed then + if trimmed then return trim_filename(ya.readable_path(tostring(hovered.url)), max_length, trim_length) else return ya.readable_path(tostring(hovered.url)) @@ -471,44 +635,90 @@ function Yatline.string.get:hovered_file_extension(show_icon) end end ---- Configuration for getting curent active tab's path ---- @class TabPathConfig ---- @field trimed? boolean Whether to trim the current active tab's path if it's too long (default: false) ---- @field max_length? integer Maximum length of the current active tab's path (default: 24) ---- @field trim_length? integer Length of each end when trimming (default: 10) --- Gets the path of the current active tab. ---- @param config? TabPathConfig Configuration for getting current active tab's path +--- @param trimmed? boolean Whether to trim the current active tab's path if it's too long (default: false) +--- @param max_length? integer Maximum length of the current active tab's path (default: 24) +--- @param trim_length? integer Length of each end when trimming (default: 10) --- @return string path Current active tab's path. -function Yatline.string.get:tab_path(config) +function Yatline.string.get:tab_path(trimmed, max_length, trim_length) + trimmed = trimmed or false + max_length = max_length or 24 + trim_length = trim_length or 10 + local cwd = cx.active.current.cwd local filter = cx.active.current.files.filter + local finder = cx.active.finder - local search = cwd.is_search and string.format(" (search: %s", cwd.frag) or "" + local t = {} + if cwd.is_search then + t[#t + 1] = string.format("search: %s", cwd.domain) + end + if filter then + t[#t + 1] = string.format("filter: %s", filter) + end + if finder then + t[#t + 1] = string.format("find: %s", finder) + end local suffix - if not filter then - suffix = search == "" and search or search .. ")" - elseif search == "" then - suffix = string.format(" (filter: %s)", tostring(filter)) + if #t ~= 0 then + suffix = " (" .. table.concat(t, ", ") .. ")" else - suffix = string.format("%s, filter: %s)", search, tostring(filter)) + suffix = "" end - if not config then - return ya.readable_path(tostring(cwd)) .. suffix - end - - local trimed = config.trimed or false - local max_length = config.max_length or 24 - local trim_length = config.trim_length or 10 - - if trimed then + if trimmed then return trim_filename(ya.readable_path(tostring(cwd)), max_length, trim_length) .. suffix else return ya.readable_path(tostring(cwd)) .. suffix end end +--- Gets the filtered query. +--- @param key? string Key value that indicates filtered query (default: "filter:") +--- @return string query Filtered query. +function Yatline.string.get:filter_query(key) + key = key or "filter:" + + local filter = cx.active.current.files.filter + + if filter then + return string.format("%s %s", key, tostring(filter)) + else + return "" + end +end + +--- Gets the searched query. +--- @param key? string Key value that indicates searched query (default: "search:") +--- @return string query Searched query. +function Yatline.string.get:search_query(key) + key = key or "search:" + + local cwd = cx.active.current.cwd + + if cwd.is_search then + return string.format("%s %s", key, cwd.domain) + else + return "" + end +end + +--- Gets the finded query. +--- @param key? string Key value that indicates finded query (default: "find:") +--- @return string query Finded query. +function Yatline.string.get:finder_query(key) + key = key or "find:" + + local finder = cx.active.finder + + if finder then + return string.format("%s %s", key, tostring(finder)) + else + return "" + end +end + --- Gets the mode of active tab. --- @return string mode Active tab's mode. function Yatline.string.get:tab_mode() @@ -533,7 +743,7 @@ function Yatline.string.get:cursor_position() local length = #cx.active.current.files if length ~= 0 then - return string.format(" %2d/%-2d", cursor + 1, length) + return string.format("%d/%d", cursor + 1, length) else return "0" end @@ -550,11 +760,11 @@ function Yatline.string.get:cursor_percentage() end if percentage == 0 then - return " Top " + return "Top" elseif percentage == 100 then - return " Bot " + return "Bot" else - return string.format("%3d%% ", percentage) + return string.format("%d%%", percentage) end end @@ -583,12 +793,15 @@ function Yatline.line.create(line, component_type) end --- Creates and returns line component for tabs. ---- @param side Side Left or right side of the either header-line or status-line. +--- @param side? string Left or right side of the either header-line or status-line. --- @return Line line Customized Line which contains tabs. --- @see set_mode_style To know how mode style selected. --- @see set_component_style To know how component style applied. +--- @see connect_padding To know how components have paddings. --- @see connect_separator To know how component and separator connected. function Yatline.line.get:tabs(side) + side = side or "left" + local tabs = #cx.tabs local lines = {} @@ -600,92 +813,104 @@ function Yatline.line.get:tabs(side) end for i = 1, tabs do - local text = i - if tab_width > 2 then - text = ya.truncate(text .. " " .. cx.tabs[i].name, { max = tab_width }) + local text = tostring(i) + if Yatline.config.tab_width > 2 then + text = ui.truncate(text .. " " .. cx.tabs[i].name, { max = Yatline.config.tab_width }) end - separator_style = { bg = nil, fg = nil } + local separator_style = { bg = nil, fg = nil } if i == cx.tabs.idx then - local span = ui.Span(" " .. text .. " ") + local tab = connect_padding(text, ComponentType.A, in_side) set_mode_style(cx.tabs[i].mode) - set_component_style(span, ComponentType.A) + set_component_style(tab, ComponentType.A) - if style_a.bg ~= "reset" or show_background then - separator_style.fg = style_a.bg - if show_background then - separator_style.bg = style_c.bg + if Yatline.config.style_a.bg ~= "reset" or Yatline.config.show_background then + separator_style.fg = Yatline.config.style_a.bg + if Yatline.config.show_background then + separator_style.bg = Yatline.config.style_c.bg end - lines[#lines + 1] = connect_separator(span, in_side, SeparatorType.OUTER) + lines[#lines + 1] = connect_separator(tab, in_side, SeparatorType.OUTER, separator_style) else - separator_style.fg = style_a.fg + separator_style.fg = Yatline.config.style_a.fg - lines[#lines + 1] = connect_separator(span, in_side, SeparatorType.INNER) + lines[#lines + 1] = connect_separator(tab, in_side, SeparatorType.INNER, separator_style) end else - local span = ui.Span(" " .. text .. " ") - if show_background then - set_component_style(span, ComponentType.C) + local tab = ui.Span(text) + local inner = ui.Span(string.rep(" ", Yatline.config.padding.inner)) + local outer = ui.Span(string.rep(" ", Yatline.config.padding.outer)) + + if Yatline.config.show_background then + set_component_style(inner, ComponentType.C) + set_component_style(outer, ComponentType.C) + set_component_style(tab, ComponentType.C) else - span:style({ fg = style_c.fg }) + apply_style_table(tab, { fg = Yatline.config.style_c.fg }) + end + + if in_side == Side.LEFT then + tab = ui.Line({ outer, tab, inner }) + else + tab = ui.Line({ inner, tab, outer }) end if i == cx.tabs.idx - 1 then set_mode_style(cx.tabs[i + 1].mode) local open, close - if style_a.bg ~= "reset" or (show_background and style_c.bg ~= "reset") then - if not show_background or (show_background and style_c.bg == "reset") then - separator_style.fg = style_a.bg - if show_background then - separator_style.bg = style_c.bg + if + Yatline.config.style_a.bg ~= "reset" + or (Yatline.config.show_background and Yatline.config.style_c.bg ~= "reset") + then + if + not Yatline.config.show_background + or (Yatline.config.show_background and Yatline.config.style_c.bg == "reset") + then + separator_style.fg = Yatline.config.style_a.bg + if Yatline.config.show_background then + separator_style.bg = Yatline.config.style_c.bg end - open = ui.Span(inverse_separator_open) - close = ui.Span(inverse_separator_close) + open = ui.Span(Yatline.config.inverse_separator.open) + close = ui.Span(Yatline.config.inverse_separator.close) else - separator_style.bg = style_a.bg - if show_background then - separator_style.fg = style_c.bg + separator_style.bg = Yatline.config.style_a.bg + if Yatline.config.show_background then + separator_style.fg = Yatline.config.style_c.bg end - open = ui.Span(section_separator_open) - close = ui.Span(section_separator_close) + open = ui.Span(Yatline.config.section_separator.open) + close = ui.Span(Yatline.config.section_separator.close) end else - separator_style.fg = style_c.fg + separator_style.fg = Yatline.config.style_c.fg - open = ui.Span(part_separator_open) - close = ui.Span(part_separator_close) + open = ui.Span(Yatline.config.part_separator.open) + close = ui.Span(Yatline.config.part_separator.close) end - open:style(separator_style) - close:style(separator_style) + apply_style_table(open, separator_style) + apply_style_table(close, separator_style) if in_side == Side.LEFT then - lines[#lines + 1] = ui.Line({ span, close }) + lines[#lines + 1] = ui.Line({ tab, close }) else - lines[#lines + 1] = ui.Line({ open, span }) + lines[#lines + 1] = ui.Line({ open, tab }) end else - separator_style.fg = style_c.fg - if show_background then - separator_style.bg = style_c.bg + separator_style.fg = Yatline.config.style_c.fg + if Yatline.config.show_background then + separator_style.bg = Yatline.config.style_c.bg end - lines[#lines + 1] = connect_separator(span, in_side, SeparatorType.INNER) + lines[#lines + 1] = connect_separator(tab, in_side, SeparatorType.INNER, separator_style) end end end if in_side == Side.RIGHT then - local lines_in_right = {} - for i = #lines, 1, -1 do - lines_in_right[#lines_in_right + 1] = lines[i] - end - - return ui.Line(lines_in_right) + return ui.Line(reverse_order(lines)) else return ui.Line(lines) end @@ -723,7 +948,7 @@ end --- Gets the hovered file's permissions of the current active tab. --- Unix-like systems only. ---- @return Coloreds coloreds Current active tab's hovered file's permissions +--- @return Coloreds? coloreds Current active tab's hovered file's permissions function Yatline.coloreds.get:permissions() local hovered = cx.active.current.hovered @@ -732,111 +957,147 @@ function Yatline.coloreds.get:permissions() if perm then local coloreds = {} - coloreds[1] = { " ", "black" } for i = 1, #perm do local c = perm:sub(i, i) - local fg = permissions_t_fg + local fg = Yatline.config.permissions_t_fg if c == "-" then - fg = permissions_s_fg + fg = Yatline.config.permissions_s_fg elseif c == "r" then - fg = permissions_r_fg + fg = Yatline.config.permissions_r_fg elseif c == "w" then - fg = permissions_w_fg + fg = Yatline.config.permissions_w_fg elseif c == "x" or c == "s" or c == "S" or c == "t" or c == "T" then - fg = permissions_x_fg + fg = Yatline.config.permissions_x_fg end - coloreds[i + 1] = { c, fg } + table.insert(coloreds, { c, fg }) end - coloreds[#perm + 2] = { " ", "black" } - return coloreds else - return "" + return nil end else - return "" + return nil end end --- Gets the number of selected and yanked files and also number of files or filtered files of the active tab. --- @param filter? boolean Whether or not number of files (or filtered files) will be shown. ---- @return Coloreds coloreds Active tab's number of selected and yanked files and also number of files or filtered files -function Yatline.coloreds.get:count(filter) +--- @param zero_check? boolean Whether or not counts will be shown if count is zero. +--- @return Coloreds? coloreds Active tab's number of selected and yanked files and also number of files or filtered files +function Yatline.coloreds.get:count(filter, zero_check) + filter = filter or false + zero_check = zero_check or false + local num_yanked = #cx.yanked local num_selected = #cx.active.selected local num_files = #cx.active.current.files - local yanked_fg, yanked_icon - if cx.yanked.is_cut then - yanked_fg = cut_fg - yanked_icon = cut_icon - else - yanked_fg = copied_fg - yanked_icon = copied_icon - end + local coloreds = {} - local files_count_fg, files_count_icon - if cx.active.current.files.filter or cx.active.current.cwd.is_search then - files_count_icon = filtereds_icon - files_count_fg = filtereds_fg - else - files_count_icon = files_icon - files_count_fg = files_fg - end - - local coloreds if filter then - coloreds = { - { string.format(" %s %d ", files_count_icon, num_files), files_count_fg }, - { string.format(" %s %d ", selected_icon, num_selected), selected_fg }, - { string.format(" %s %d ", yanked_icon, num_yanked), yanked_fg }, - } - else - coloreds = { - { string.format(" %s %d ", selected_icon, num_selected), selected_fg }, - { string.format(" %s %d ", yanked_icon, num_yanked), yanked_fg }, - } + local files_count_fg, files_count_icon + if cx.active.current.files.filter or cx.active.current.cwd.is_search then + files_count_fg = Yatline.config.filtereds.fg + files_count_icon = Yatline.config.filtereds.icon + else + files_count_fg = Yatline.config.files.fg + files_count_icon = Yatline.config.files.icon + end + + if (zero_check and num_files > 0) or not zero_check then + table.insert(coloreds, { string.format("%s %d", files_count_icon, num_files), files_count_fg }) + end end - return coloreds + if (zero_check and num_selected > 0) or not zero_check then + if #coloreds > 0 then + table.insert(coloreds, { " ", Yatline.config.selected.fg }) + end + + table.insert( + coloreds, + { string.format("%s %d", Yatline.config.selected.icon, num_selected), Yatline.config.selected.fg } + ) + end + + if (zero_check and num_yanked > 0) or not zero_check then + local yanked_fg, yanked_icon + if cx.yanked.is_cut then + yanked_fg = Yatline.config.cut.fg + yanked_icon = Yatline.config.cut.icon + else + yanked_fg = Yatline.config.copied.fg + yanked_icon = Yatline.config.copied.icon + end + + if #coloreds > 0 then + table.insert(coloreds, { " ", yanked_fg }) + end + + table.insert(coloreds, { string.format("%s %d", yanked_icon, num_yanked), yanked_fg }) + end + + if #coloreds > 0 then + return coloreds + else + return nil + end end --- Gets the number of task states. ---- @return Coloreds coloreds Number of task states. -function Yatline.coloreds.get:task_states() - local tasks = cx.tasks.progress +--- @param zero_check? boolean Whether or not counts will be shown if count is zero. +--- @return Coloreds? coloreds Number of task states. +function Yatline.coloreds.get:task_states(zero_check) + zero_check = zero_check or false - local coloreds = { - { string.format(" %s %d ", task_total_icon, tasks.total), task_total_fg }, - { string.format(" %s %d ", task_succ_icon, tasks.succ), task_succ_fg }, - { string.format(" %s %d ", task_fail_icon, tasks.fail), task_fail_fg }, - } + local summary = cx.tasks.summary + local coloreds = {} - return coloreds -end + if (zero_check and summary.total > 0) or not zero_check then + table.insert( + coloreds, + { string.format("%s %d", Yatline.config.total.icon, summary.total), Yatline.config.total.fg } + ) + end ---- Gets the number of task workloads. ---- @return Coloreds coloreds Number of task workloads. -function Yatline.coloreds.get:task_workload() - local tasks = cx.tasks.progress + if (zero_check and summary.success > 0) or not zero_check then + if #coloreds > 0 then + table.insert(coloreds, { " ", Yatline.config.success.fg }) + end - local coloreds = { - { string.format(" %s %d ", task_found_icon, tasks.found), task_found_fg }, - { string.format(" %s %d ", task_processed_icon, tasks.processed), task_processed_fg }, - } + table.insert( + coloreds, + { string.format("%s %d", Yatline.config.success.icon, summary.success), Yatline.config.success.fg } + ) + end - return coloreds + if (zero_check and summary.failed > 0) or not zero_check then + if #coloreds > 0 then + table.insert(coloreds, { " ", Yatline.config.failed.fg }) + end + + table.insert( + coloreds, + { string.format("%s %d", Yatline.config.failed.icon, summary.failed), Yatline.config.failed.fg } + ) + end + + if #coloreds > 0 then + return coloreds + else + return nil + end end --- Gets colored which contains string based component's string and desired foreground color. --- @param component_name string String based component's name. --- @param fg Color Desired foreground color. --- @param params? table Array of parameters of string based component. It is optional. ---- @return Coloreds coloreds Array of solely array of string based component's string and desired foreground color. +--- @return Coloreds? coloreds Array of solely array of string based component's string and desired foreground color. function Yatline.coloreds.get:string_based_component(component_name, fg, params) local getter = Yatline.string.get[component_name] @@ -849,13 +1110,11 @@ function Yatline.coloreds.get:string_based_component(component_name, fg, params) end if output ~= nil and output ~= "" then - return { { " " .. output .. " ", fg } } - else - return "" + return { { output, fg } } end - else - return "" end + + return nil end --===============-- @@ -864,12 +1123,13 @@ end --- Configure separators if it is need to be added to the components. --- Connects them with each component. ---- @param section_components table Array of components in one of the sections. +--- @param section_components [Line, boolean][] Array of components in one of the sections. --- @param component_type ComponentType Which section component will be in [ a | b | c ]. --- @param in_side Side Left or right side of the either header-line or status-line. --- @param num_section_b_components integer Number of components in section-b. --- @param num_section_c_components integer Number of components in section-c. --- @return table section_line_components Array of line components whether or not connected with separators. +--- @see connect_padding To know how components have paddings. --- @see connect_separator To know how component and separator connected. local function config_components_separators( section_components, @@ -881,70 +1141,109 @@ local function config_components_separators( local num_section_components = #section_components local section_line_components = {} for i, component in ipairs(section_components) do - if component[2] == true then - separator_style = { bg = nil, fg = nil } + if component[2] == true then -- Does component have separator? + local separator_style = { bg = nil, fg = nil } local separator_type - if i ~= num_section_components then - if component_type == ComponentType.A then - separator_style = style_a - elseif component_type == ComponentType.B then - separator_style = style_b - else - separator_style = style_c - end - + if i ~= num_section_components then -- Does component is not at the end of the section? separator_type = SeparatorType.INNER - else + if component_type == ComponentType.A then - separator_style.fg = style_a.bg + separator_style = Yatline.config.style_a elseif component_type == ComponentType.B then - separator_style.fg = style_b.bg + separator_style = Yatline.config.style_b else - separator_style.fg = style_c.bg + separator_style = Yatline.config.style_c + end + else -- Does component is at the end of the section? + separator_type = SeparatorType.OUTER + + if component_type == ComponentType.A then + separator_style.fg = Yatline.config.style_a.bg + elseif component_type == ComponentType.B then + separator_style.fg = Yatline.config.style_b.bg + else + separator_style.fg = Yatline.config.style_c.bg end if component_type == ComponentType.A and num_section_b_components ~= 0 then - separator_style.bg = style_b.bg - else - if num_section_c_components == 0 or component_type == ComponentType.C then - if show_background then - separator_style.bg = style_c.bg - end - else - separator_style.bg = style_c.bg + separator_style.bg = Yatline.config.style_b.bg + elseif num_section_c_components == 0 or component_type == ComponentType.C then + if Yatline.config.show_background then + separator_style.bg = Yatline.config.style_c.bg end + else + separator_style.bg = Yatline.config.style_c.bg end - - separator_type = SeparatorType.OUTER end - section_line_components[i] = connect_separator(component[1], in_side, separator_type) + component[1] = connect_padding(component[1], component_type, in_side) + section_line_components[i] = connect_separator(component[1], in_side, separator_type, separator_style) else - if in_side == Side.LEFT then - section_line_components[i] = component[1] - else - section_line_components[i] = component[1] - end + section_line_components[i] = component[1] end end return section_line_components end ---- Leads the given parameters to the other functions. ---- @param section_a_components table Components array whose components are in section-a of either side. ---- @param section_b_components table Components array whose components are in section-b of either side. ---- @param section_c_components table Components array whose components are in section-c of either side. ---- @param in_side Side Left or right side of the either header-line or status-line. ---- @return table section_a_line_components Array of components whose components are connected to separator and are in section-a of either side. ---- @return table section_b_line_components Array of components whose components are connected to separator and are in section-b of either side. ---- @return table section_c_line_components Array of components whose components are connected to separator and are in section-c of either side. ---- @see config_components_separators To know how separators are configured. -local function config_components(section_a_components, section_b_components, section_c_components, in_side) +--- Creates configured section according to its components' config. +--- @param section ComponentConfig[] Array of components' config in a section. +--- @param component_type ComponentType Which section that components will be. +--- @return [Line, boolean][] section_components Configured components array whose components are in section. +local function config_section(section, component_type) + --- @type [Line, boolean][] + local section_components = {} + + for _, component in ipairs(section) do + local component_group = Yatline[component.type] + + if component_group then -- Does component group exist? + if component.custom then -- Does component is custom? + if component.name ~= nil and component.name ~= "" and #component.name ~= 0 then -- Does component name is valid? + section_components[#section_components + 1] = -- Insert component to the table. + { component_group.create(component.name, component_type), component_group.has_separator } + end + else + local getter = component_group.get[component.name] -- Get component function that will be called. + + if getter then -- Does function exist? + local output -- Output of the function. + if component.params then -- Does component function has parameters? + output = getter(component_group.get, table.unpack(component.params)) + else + output = getter() + end + + if output ~= nil and output ~= "" then -- Does component is not empty? + section_components[#section_components + 1] = -- Insert component to the table. + { component_group.create(output, component_type), component_group.has_separator } + end + end + end + end + end + + return section_components +end + +--- Automatically creates and configures either header-line or status-line. +--- @param side SideConfig Configuration of either left or right side. +--- @param in_side Side Which side components will be. +--- @return Line left_line Consist of components that are in left side of the line. +--- @return Line right_line Consist of components that are in right side of the line. +--- @see config_section To know how components are gotten from sections' config. +--- @see config_components_separators To know how components are connected with separators. +local function config_line(side, in_side) + -- Configures components of sections. + local section_a_components = config_section(side.section_a, ComponentType.A) + local section_b_components = config_section(side.section_b, ComponentType.B) + local section_c_components = config_section(side.section_c, ComponentType.C) + local num_section_b_components = #section_b_components local num_section_c_components = #section_c_components + -- Connects components of section by separators. local section_a_line_components = config_components_separators( section_a_components, ComponentType.A, @@ -967,85 +1266,13 @@ local function config_components(section_a_components, section_b_components, sec num_section_c_components ) - return section_a_line_components, section_b_line_components, section_c_line_components -end - ---- Automatically creates and configures either left or right side according to their config. ---- @param side Config Configuration of either left or right side. ---- @return table section_a_components Components array whose components are in section-a of either side. ---- @return table section_b_components Components array whose components are in section-b of either side. ---- @return table section_c_components Components array whose components are in section-c of either side. -local function config_side(side) - local section_a_components = {} - local section_b_components = {} - local section_c_components = {} - - for _, section in ipairs(section_order) do - local components = side[section] - - local in_section, section_components - if section == "section_a" then - in_section = ComponentType.A - section_components = section_a_components - elseif section == "section_b" then - in_section = ComponentType.B - section_components = section_b_components - else - in_section = ComponentType.C - section_components = section_c_components - end - - for _, component in ipairs(components) do - local component_group = Yatline[component.type] - - if component_group then - if component.custom then - if component.name ~= nil and component.name ~= "" and #component.name ~= 0 then - section_components[#section_components + 1] = - { component_group.create(component.name, in_section), component_group.has_separator } - end - else - local getter = component_group.get[component.name] - - if getter then - local output - if component.params then - output = getter(component_group.get, table.unpack(component.params)) - else - output = getter() - end - - if output ~= nil and output ~= "" then - section_components[#section_components + 1] = - { component_group.create(output, in_section), component_group.has_separator } - end - end - end - end - end - end - - return section_a_components, section_b_components, section_c_components -end - ---- Automatically creates and configures either header-line or status-line. ---- @param side Config Configuration of either left or right side. ---- @return table left_components Components array whose components are in left side of the line. ---- @return table right_components Components array whose components are in right side of the line. ---- @see config_side To know how components are gotten from side's config. ---- @see config_components To know how components are configured. -local function config_line(side, in_side) - local section_a_components, section_b_components, section_c_components = config_side(side) - - local section_a_line_components, section_b_line_components, section_c_line_components = - config_components(section_a_components, section_b_components, section_c_components, in_side) - - if in_side == Side.RIGHT then + if in_side == Side.RIGHT then -- Reverse the order of the components if it is in the right side. section_a_line_components = reverse_order(section_a_line_components) section_b_line_components = reverse_order(section_b_line_components) section_c_line_components = reverse_order(section_c_line_components) end + -- Combines components of section into single components. local section_a_line = ui.Line(section_a_line_components) local section_b_line = ui.Line(section_b_line_components) local section_c_line = ui.Line(section_c_line_components) @@ -1058,18 +1285,18 @@ local function config_line(side, in_side) end --- Checks if either header-line or status-line contains components. ---- @param line Config Configuration of either header-line or status-line. +--- @param line LineConfig Configuration of either header-line or status-line. --- @return boolean show_line Returns yes if it contains components, otherwise returns no. local function show_line(line) - local total_components = 0 - for _, side in pairs(line) do for _, section in pairs(side) do - total_components = total_components + #section + if #section ~= 0 then + return true + end end end - return total_components ~= 0 + return false end --- Creates and configures paragraph which is used as left or right of either @@ -1079,8 +1306,8 @@ end --- @return Paragraph paragraph Configured parapgraph. local function config_paragraph(area, line) local line_array = { line } or {} - if show_background then - return ui.Text(line_array):area(area):style(style_c) + if Yatline.config.show_background then + return apply_style_table(ui.Text(line_array):area(area), Yatline.config.style_c) else return ui.Text(line_array):area(area) end @@ -1088,274 +1315,77 @@ end return { setup = function(_, config, pre_theme) - config = config or {} + if config then + -- Fills the sections that are not given if the line exists. + for _, line in ipairs({ "header_line", "status_line" }) do + if config[line] then + for _, side in ipairs({ "left", "right" }) do + if config[line][side] then + for _, section in ipairs({ "section_a", "section_b", "section_c" }) do + config[line][side][section] = config[line][side][section] or {} + end + else + config[line][side] = {} + for _, section in ipairs({ "section_a", "section_b", "section_c" }) do + config[line][side][section] = {} + end + end + end + end + end - if config == 0 then - config = { - show_background = false, + -- Get the current theme according to the light/dark mode. (default: config.theme) + config.theme = (not rt.term.light and config.theme_dark) + or (rt.term.light and config.theme_light) + or config.theme - header_line = { - left = { - section_a = { - { type = "line", custom = false, name = "tabs", params = { "left" } }, - }, - section_b = {}, - section_c = {}, - }, - right = { - section_a = { - { type = "string", custom = false, name = "date", params = { "%A, %d %B %Y" } }, - }, - section_b = { - { type = "string", custom = false, name = "date", params = { "%X" } }, - }, - section_c = {}, - }, - }, + -- Extracts theme fields to the config unless that fields does not exists. + if config.theme then + for key, value in pairs(config.theme) do + if not config[key] then + config[key] = value + end + end + end - status_line = { - left = { - section_a = { - { type = "string", custom = false, name = "tab_mode" }, - }, - section_b = { - { type = "string", custom = false, name = "hovered_size" }, - }, - section_c = { - { type = "string", custom = false, name = "hovered_path" }, - { type = "coloreds", custom = false, name = "count" }, - }, - }, - right = { - section_a = { - { type = "string", custom = false, name = "cursor_position" }, - }, - section_b = { - { type = "string", custom = false, name = "cursor_percentage" }, - }, - section_c = { - { type = "string", custom = false, name = "hovered_file_extension", params = { true } }, - { type = "coloreds", custom = false, name = "permissions" }, - }, - }, - }, - } - end - - if pre_theme then - config.theme = pre_theme - end - - tab_width = config.tab_width or 20 - - local component_positions = config.component_positions or { "header", "tab", "status" } - - show_background = config.show_background or false - - local display_header_line = config.display_header_line - if display_header_line == nil then - display_header_line = true - end - - local display_status_line = config.display_status_line - if display_status_line == nil then - display_status_line = true - end - - local header_line = config.header_line - or { - left = { section_a = {}, section_b = {}, section_c = {} }, - right = { section_a = {}, section_b = {}, section_c = {} }, - } - local status_line = config.status_line - or { - left = { section_a = {}, section_b = {}, section_c = {} }, - right = { section_a = {}, section_b = {}, section_c = {} }, - } - - config.theme = (not rt.term.light and config.theme_dark) - or (rt.term.light and config.theme_light) - or config.theme - - if config.theme then - for key, value in pairs(config.theme) do - if not config[key] then - config[key] = value + -- Extracts config fields to the YatlineConfig if that fields exists. + for key, value in pairs(config) do + if Yatline.config[key] then + Yatline.config[key] = value end end end - if config.section_separator then - section_separator_open = config.section_separator.open - section_separator_close = config.section_separator.close - else - section_separator_open = "" - section_separator_close = "" - end - - if config.inverse_separator then - inverse_separator_open = config.inverse_separator.open - inverse_separator_close = config.inverse_separator.close - else - inverse_separator_open = "" - inverse_separator_close = "" - end - - if config.part_separator then - part_separator_open = config.part_separator.open - part_separator_close = config.part_separator.close - else - part_separator_open = "" - part_separator_close = "" - end - - if config.style_a then - style_a = { bg = config.style_a.bg_mode.normal, fg = config.style_a.fg } - - style_a_normal_bg = config.style_a.bg_mode.normal - style_a_select_bg = config.style_a.bg_mode.select - style_a_un_set_bg = config.style_a.bg_mode.un_set - else - style_a = { bg = "white", fg = "black" } - - style_a_normal_bg = "white" - style_a_select_bg = "brightyellow" - style_a_un_set_bg = "brightred" - end - - style_b = config.style_b or { bg = "brightblack", fg = "brightwhite" } - style_c = config.style_c or { bg = "black", fg = "brightwhite" } - - permissions_t_fg = config.permissions_t_fg or "green" - permissions_r_fg = config.permissions_r_fg or "yellow" - permissions_w_fg = config.permissions_w_fg or "red" - permissions_x_fg = config.permissions_x_fg or "cyan" - permissions_s_fg = config.permissions_s_fg or "white" - - if config.selected then - selected_fg = config.selected.fg - selected_icon = config.selected.icon - else - selected_fg = "yellow" - selected_icon = "󰻭" - end - - if config.copied then - copied_fg = config.copied.fg - copied_icon = config.copied.icon - else - copied_fg = "green" - copied_icon = "" - end - - if config.cut then - cut_icon = config.cut.icon - cut_fg = config.cut.fg - else - cut_icon = "" - cut_fg = "red" - end - - if config.files then - files_icon = config.files.icon - files_fg = config.files.fg - else - files_icon = "" - files_fg = "blue" - end - - if config.filtereds then - filtereds_icon = config.filtereds.icon - filtereds_fg = config.filtereds.fg - else - filtereds_icon = "" - filtereds_fg = "magenta" - end - - if config.total then - task_total_icon = config.total.icon - task_total_fg = config.total.fg - else - task_total_icon = "󰮍" - task_total_fg = "yellow" - end - - if config.succ then - task_succ_icon = config.succ.icon - task_succ_fg = config.succ.fg - else - task_succ_icon = "" - task_succ_fg = "green" - end - - if config.fail then - task_fail_icon = config.fail.icon - task_fail_fg = config.fail.fg - else - task_fail_icon = "" - task_fail_fg = "red" - end - - if config.found then - task_found_icon = config.found.icon - task_found_fg = config.found.fg - else - task_found_icon = "󰮕" - task_found_fg = "blue" - end - - if config.processed then - task_processed_icon = config.processed.icon - task_processed_fg = config.processed.fg - else - task_processed_icon = "󰐍" - task_processed_fg = "green" - end - - config = nil - - Progress.partial_render = function(self) - local progress = cx.tasks.progress - if progress.total == 0 then - return config_paragraph(self._area) + -- Extracts pre_theme fields to the YatlineConfig if that fields exists. + if pre_theme then + for key, value in pairs(pre_theme) do + if Yatline.config[key] then + Yatline.config[key] = value + end end - - local gauge = ui.Gauge():area(self._area) - if progress.fail == 0 then - gauge = gauge:gauge_style(th.status.progress_normal) - else - gauge = gauge:gauge_style(th.status.progress_error) - end - - local percent = 99 - if progress.found ~= 0 then - percent = math.min(99, ya.round(progress.processed * 100 / progress.found)) - end - - local left = progress.total - progress.succ - return gauge - :percent(percent) - :label(ui.Span(string.format("%3d%%, %d left", percent, left)):style(th.status.progress_label)) end - if display_header_line then - if show_line(header_line) then + if Yatline.config.display_header_line then -- Controls displaying header-line. + if show_line(Yatline.config.header_line) then -- Controls recoding of header-line. + -- Empties default Yazi header-line. + Header._left = {} + Header._right = {} + Header.redraw = function(self) - local left_line = config_line(header_line.left, Side.LEFT) - local right_line = config_line(header_line.right, Side.RIGHT) + -- Gets Yazi components. + local right = self:children_redraw(self.RIGHT) + self._right_width = right:width() + local left = self:children_redraw(self.LEFT) + + -- Gets Yatline components. + local left_line = config_line(Yatline.config.header_line.left, Side.LEFT) + local right_line = config_line(Yatline.config.header_line.right, Side.RIGHT) return { - config_paragraph(self._area, left_line), - right_line:area(self._area):align(ui.Align.RIGHT), + config_paragraph(self._area, ui.Line({ left_line, left })), -- Styles left_line if show_background set. + ui.Line({ right, right_line }):area(self._area):align(ui.Align.RIGHT), } end - - Header.children_add = function() - return {} - end - Header.children_remove = function() - return {} - end end else Header.redraw = function() @@ -1363,26 +1393,28 @@ return { end end - if display_status_line then - if show_line(status_line) then + if Yatline.config.display_status_line then -- Controls displaying status-line. + if show_line(Yatline.config.status_line) then -- Controls recoding of status-line. + -- Empties default Yazi status-line. + Status._left = {} + Status._right = {} + Status.redraw = function(self) - local left_line = config_line(status_line.left, Side.LEFT) - local right_line = config_line(status_line.right, Side.RIGHT) - local right_width = right_line:width() + -- Gets Yazi components. + local left = self:children_redraw(self.LEFT) + local right = self:children_redraw(self.RIGHT) + -- Gets Yatline components. + local left_line = config_line(Yatline.config.status_line.left, Side.LEFT) + local right_line = config_line(Yatline.config.status_line.right, Side.RIGHT) + + local sum_right = ui.Line({ right, right_line }) -- Needed for error prevention. return { - config_paragraph(self._area, left_line), - right_line:area(self._area):align(ui.Align.RIGHT), - table.unpack(ui.redraw(Progress:new(self._area, right_width))), + config_paragraph(self._area, ui.Line({ left_line, left })), -- Styles left_line if show_background set. + sum_right:area(self._area):align(ui.Align.RIGHT), + table.unpack(ui.redraw(Progress:new(self._area, sum_right:width()))), -- Inserts Progress bar. } end - - Status.children_add = function() - return {} - end - Status.children_remove = function() - return {} - end end else Status.redraw = function() @@ -1392,9 +1424,11 @@ return { Root.layout = function(self) local constraints = {} - for _, component in ipairs(component_positions) do + -- Sets Yazi layout according to the given positions. + for _, component in ipairs(Yatline.config.component_positions) do if - (component == "header" and display_header_line) or (component == "status" and display_status_line) + (component == "header" and Yatline.config.display_header_line) + or (component == "status" and Yatline.config.display_status_line) then table.insert(constraints, ui.Constraint.Length(1)) elseif component == "tab" then @@ -1407,16 +1441,16 @@ return { Root.build = function(self) local childrens = {} - + -- Fills the layout according to the given positions. local i = 1 - for _, component in ipairs(component_positions) do - if component == "header" and display_header_line then + for _, component in ipairs(Yatline.config.component_positions) do + if component == "header" and Yatline.config.display_header_line then table.insert(childrens, Header:new(self._chunks[i], cx.active)) i = i + 1 elseif component == "tab" then table.insert(childrens, Tab:new(self._chunks[i], cx.active)) i = i + 1 - elseif component == "status" and display_status_line then + elseif component == "status" and Yatline.config.display_status_line then table.insert(childrens, Status:new(self._chunks[i], cx.active)) i = i + 1 end diff --git a/config/yazi/theme.toml b/config/yazi/theme.toml index d6bd9d47..9691aeb9 100644 --- a/config/yazi/theme.toml +++ b/config/yazi/theme.toml @@ -4,130 +4,18 @@ # vim:fileencoding=utf-8:foldmethod=marker -# : Flavor - [flavor] -use = "rose-pine" - -# : - -# : Manager - -# Hovered -hovered = {reversed = true} - -# Find -find_keyword = {bold = true, italic = true, underline = true} -find_position = {bold = true, italic = true} - -# Marker -# marker_marked = { fg = "blue", bg = "cyan" } - -# # Count -# count_copied = { fg = "darkgray", bg = "green" } -# count_cut = { fg = "darkgray", bg = "yellow" } -# count_selected = { fg = "darkgray", bg = "blue" } - -# : - - -# : Status - -[status] -separator_open = "" -separator_close = "" - -# : - - -# : Select - -[select] -active = {bold = true} - -# : - - -# : Input -# : - - -# : Completion - -[completion] -active = {reversed = true} -inactive = {} -border = {fg = "blue"} - +# dark = "rose-pine" # or "rose-pine-moon" +light = "rose-pine-dawn" # Icons icon_file = "" icon_folder = "" icon_command = "" - -# : - - -# : Tasks - -# : - - -# : Which - -[which] -cols = 3 - -# : - - -# : Help -# : - - -# : Notify - -[notify] -title_info = {fg = "green"} -title_warn = {fg = "red"} -title_error = {fg = "yellow"} - -# Icons icon_info = "" icon_warn = "" icon_error = "" -# : - - -# : File-specific styles - -[filetype] - -rules = [ - # Documents - {mime = "application/{pdf,doc,rtf,vnd.*}", fg = "green"}, - - # Archives - {mime = "application/{,g}zip", fg = "magenta"}, - {mime = "application/x-{tar,bzip*,7z-compressed,xz,rar}", fg = "magenta"}, - - # Empty files - # { mime = "inode/x-empty", fg = "white" }, - - # Symbolic links - {name = "*", is = "link", fg = "cyan"}, - {name = "*/", is = "link", fg = "cyan", bold = true}, - {name = "*", is = "orphan", fg = "red"}, - {name = "*/", is = "orphan", fg = "red", bold = true}, - - {name = "*", is = "exec", fg = "green"}, - - # Fallback - {name = "*", fg = "lightgray"}, - {name = "*/", fg = "blue", bold = true}, -] - [icon] globs = [ ] dirs = [ @@ -146,556 +34,653 @@ dirs = [ {name = "Videos", text = ""}, ] files = [ - {name = ".babelrc", text = "", fg_dark = "#cbcb41", fg_light = "#666620"}, - {name = ".bash_profile", text = "", fg_dark = "#89e051", fg_light = "#447028"}, - {name = ".bashrc", text = "", fg_dark = "#89e051", fg_light = "#447028"}, - {name = ".dockerignore", text = "󰡨", fg_dark = "#458ee6", fg_light = "#2e5f99"}, - {name = ".ds_store", text = "", fg_dark = "#41535b", fg_light = "#41535b"}, - {name = ".editorconfig", text = "", fg_dark = "#fff2f2", fg_light = "#333030"}, - {name = ".env", text = "", fg_dark = "#faf743", fg_light = "#32310d"}, - {name = ".eslintignore", text = "", fg_dark = "#4b32c3", fg_light = "#4b32c3"}, - {name = ".eslintrc", text = "", fg_dark = "#4b32c3", fg_light = "#4b32c3"}, - {name = ".gitattributes", text = "", fg_dark = "#f54d27", fg_light = "#b83a1d"}, - {name = ".gitconfig", text = "", fg_dark = "#f54d27", fg_light = "#b83a1d"}, - {name = ".gitignore", text = "", fg_dark = "#f54d27", fg_light = "#b83a1d"}, - {name = ".gitlab-ci.yml", text = "", fg_dark = "#e24329", fg_light = "#aa321f"}, - {name = ".gitmodules", text = "", fg_dark = "#f54d27", fg_light = "#b83a1d"}, - {name = ".gtkrc-2.0", text = "", fg_dark = "#ffffff", fg_light = "#333333"}, - {name = ".gvimrc", text = "", fg_dark = "#019833", fg_light = "#017226"}, - {name = ".luaurc", text = "", fg_dark = "#00a2ff", fg_light = "#007abf"}, - {name = ".mailmap", text = "󰊢", fg_dark = "#41535b", fg_light = "#41535b"}, - {name = ".npmignore", text = "", fg_dark = "#e8274b", fg_light = "#ae1d38"}, - {name = ".npmrc", text = "", fg_dark = "#e8274b", fg_light = "#ae1d38"}, - {name = ".prettierrc", text = "", fg_dark = "#4285f4", fg_light = "#3264b7"}, - {name = ".settings.json", text = "", fg_dark = "#854cc7", fg_light = "#643995"}, - {name = ".SRCINFO", text = "󰣇", fg_dark = "#0f94d2", fg_light = "#0b6f9e"}, - {name = ".vimrc", text = "", fg_dark = "#019833", fg_light = "#017226"}, - {name = ".Xauthority", text = "", fg_dark = "#e54d18", fg_light = "#ac3a12"}, - {name = ".xinitrc", text = "", fg_dark = "#e54d18", fg_light = "#ac3a12"}, - {name = ".Xresources", text = "", fg_dark = "#e54d18", fg_light = "#ac3a12"}, - {name = ".xsession", text = "", fg_dark = "#e54d18", fg_light = "#ac3a12"}, - {name = ".zprofile", text = "", fg_dark = "#89e051", fg_light = "#447028"}, - {name = ".zshenv", text = "", fg_dark = "#89e051", fg_light = "#447028"}, - {name = ".zshrc", text = "", fg_dark = "#89e051", fg_light = "#447028"}, - {name = "_gvimrc", text = "", fg_dark = "#019833", fg_light = "#017226"}, - {name = "_vimrc", text = "", fg_dark = "#019833", fg_light = "#017226"}, - {name = "avif", text = "", fg_dark = "#a074c4", fg_light = "#6b4d83"}, - {name = "brewfile", text = "", fg_dark = "#701516", fg_light = "#701516"}, - {name = "bspwmrc", text = "", fg_dark = "#2f2f2f", fg_light = "#2f2f2f"}, - {name = "build", text = "", fg_dark = "#89e051", fg_light = "#447028"}, - {name = "build.gradle", text = "", fg_dark = "#005f87", fg_light = "#005f87"}, - {name = "build.zig.zon", text = "", fg_dark = "#f69a1b", fg_light = "#7b4d0e"}, - {name = "cantorrc", text = "", fg_dark = "#1c99f3", fg_light = "#1573b6"}, - {name = "checkhealth", text = "󰓙", fg_dark = "#75b4fb", fg_light = "#3a5a7e"}, - {name = "cmakelists.txt", text = "", fg_dark = "#6d8086", fg_light = "#526064"}, - {name = "commit_editmsg", text = "", fg_dark = "#f54d27", fg_light = "#b83a1d"}, - {name = "compose.yaml", text = "󰡨", fg_dark = "#458ee6", fg_light = "#2e5f99"}, - {name = "compose.yml", text = "󰡨", fg_dark = "#458ee6", fg_light = "#2e5f99"}, - {name = "config", text = "", fg_dark = "#6d8086", fg_light = "#526064"}, - {name = "containerfile", text = "󰡨", fg_dark = "#458ee6", fg_light = "#2e5f99"}, - {name = "copying", text = "", fg_dark = "#cbcb41", fg_light = "#666620"}, - {name = "copying.lesser", text = "", fg_dark = "#cbcb41", fg_light = "#666620"}, - {name = "docker-compose.yaml", text = "󰡨", fg_dark = "#458ee6", fg_light = "#2e5f99"}, - {name = "docker-compose.yml", text = "󰡨", fg_dark = "#458ee6", fg_light = "#2e5f99"}, - {name = "dockerfile", text = "󰡨", fg_dark = "#458ee6", fg_light = "#2e5f99"}, - {name = "ext_typoscript_setup.txt", text = "", fg_dark = "#ff8700", fg_light = "#aa5a00"}, - {name = "favicon.ico", text = "", fg_dark = "#cbcb41", fg_light = "#666620"}, - {name = "fp-info-cache", text = "", fg_dark = "#ffffff", fg_light = "#333333"}, - {name = "fp-lib-table", text = "", fg_dark = "#ffffff", fg_light = "#333333"}, - {name = "FreeCAD.conf", text = "", fg_dark = "#cb0d0d", fg_light = "#cb0d0d"}, - {name = "gemfile$", text = "", fg_dark = "#701516", fg_light = "#701516"}, - {name = "gnumakefile", text = "", fg_dark = "#6d8086", fg_light = "#526064"}, - {name = "gradle-wrapper.properties", text = "", fg_dark = "#005f87", fg_light = "#005f87"}, - {name = "gradle.properties", text = "", fg_dark = "#005f87", fg_light = "#005f87"}, - {name = "gradlew", text = "", fg_dark = "#005f87", fg_light = "#005f87"}, - {name = "groovy", text = "", fg_dark = "#4a687c", fg_light = "#384e5d"}, - {name = "gruntfile.babel.js", text = "", fg_dark = "#e37933", fg_light = "#975122"}, - {name = "gruntfile.coffee", text = "", fg_dark = "#e37933", fg_light = "#975122"}, - {name = "gruntfile.js", text = "", fg_dark = "#e37933", fg_light = "#975122"}, - {name = "gruntfile.ts", text = "", fg_dark = "#e37933", fg_light = "#975122"}, - {name = "gtkrc", text = "", fg_dark = "#ffffff", fg_light = "#333333"}, - {name = "gulpfile.babel.js", text = "", fg_dark = "#cc3e44", fg_light = "#992e33"}, - {name = "gulpfile.coffee", text = "", fg_dark = "#cc3e44", fg_light = "#992e33"}, - {name = "gulpfile.js", text = "", fg_dark = "#cc3e44", fg_light = "#992e33"}, - {name = "gulpfile.ts", text = "", fg_dark = "#cc3e44", fg_light = "#992e33"}, - {name = "hyprland.conf", text = "", fg_dark = "#00aaae", fg_light = "#008082"}, - {name = "i3blocks.conf", text = "", fg_dark = "#e8ebee", fg_light = "#2e2f30"}, - {name = "i3status.conf", text = "", fg_dark = "#e8ebee", fg_light = "#2e2f30"}, - {name = "kalgebrarc", text = "", fg_dark = "#1c99f3", fg_light = "#1573b6"}, - {name = "kdeglobals", text = "", fg_dark = "#1c99f3", fg_light = "#1573b6"}, - {name = "kdenlive-layoutsrc", text = "", fg_dark = "#83b8f2", fg_light = "#425c79"}, - {name = "kdenliverc", text = "", fg_dark = "#83b8f2", fg_light = "#425c79"}, - {name = "kritadisplayrc", text = "", fg_dark = "#f245fb", fg_light = "#a12ea7"}, - {name = "kritarc", text = "", fg_dark = "#f245fb", fg_light = "#a12ea7"}, - {name = "license", text = "", fg_dark = "#d0bf41", fg_light = "#686020"}, - {name = "lxde-rc.xml", text = "", fg_dark = "#909090", fg_light = "#606060"}, - {name = "lxqt.conf", text = "", fg_dark = "#0192d3", fg_light = "#016e9e"}, - {name = "makefile", text = "", fg_dark = "#6d8086", fg_light = "#526064"}, - {name = "mix.lock", text = "", fg_dark = "#a074c4", fg_light = "#6b4d83"}, - {name = "mpv.conf", text = "", fg_dark = "#3b1342", fg_light = "#3b1342"}, - {name = "node_modules", text = "", fg_dark = "#e8274b", fg_light = "#ae1d38"}, - {name = "package-lock.json", text = "", fg_dark = "#7a0d21", fg_light = "#7a0d21"}, - {name = "package.json", text = "", fg_dark = "#e8274b", fg_light = "#ae1d38"}, - {name = "PKGBUILD", text = "", fg_dark = "#0f94d2", fg_light = "#0b6f9e"}, - {name = "platformio.ini", text = "", fg_dark = "#f6822b", fg_light = "#a4571d"}, - {name = "pom.xml", text = "", fg_dark = "#7a0d21", fg_light = "#7a0d21"}, - {name = "procfile", text = "", fg_dark = "#a074c4", fg_light = "#6b4d83"}, - {name = "PrusaSlicer.ini", text = "", fg_dark = "#ec6b23", fg_light = "#9d4717"}, - {name = "PrusaSlicerGcodeViewer.ini", text = "", fg_dark = "#ec6b23", fg_light = "#9d4717"}, - {name = "py.typed", text = "", fg_dark = "#ffbc03", fg_light = "#805e02"}, - {name = "QtProject.conf", text = "", fg_dark = "#40cd52", fg_light = "#2b8937"}, - {name = "R", text = "󰟔", fg_dark = "#2266ba", fg_light = "#1a4c8c"}, - {name = "r", text = "󰟔", fg_dark = "#2266ba", fg_light = "#1a4c8c"}, - {name = "rakefile", text = "", fg_dark = "#701516", fg_light = "#701516"}, - {name = "rmd", text = "", fg_dark = "#519aba", fg_light = "#36677c"}, - {name = "settings.gradle", text = "", fg_dark = "#005f87", fg_light = "#005f87"}, - {name = "svelte.config.js", text = "", fg_dark = "#ff3e00", fg_light = "#bf2e00"}, - {name = "sxhkdrc", text = "", fg_dark = "#2f2f2f", fg_light = "#2f2f2f"}, - {name = "sym-lib-table", text = "", fg_dark = "#ffffff", fg_light = "#333333"}, - {name = "tailwind.config.js", text = "󱏿", fg_dark = "#20c2e3", fg_light = "#158197"}, - {name = "tailwind.config.mjs", text = "󱏿", fg_dark = "#20c2e3", fg_light = "#158197"}, - {name = "tailwind.config.ts", text = "󱏿", fg_dark = "#20c2e3", fg_light = "#158197"}, - {name = "tmux.conf", text = "", fg_dark = "#14ba19", fg_light = "#0f8c13"}, - {name = "tmux.conf.local", text = "", fg_dark = "#14ba19", fg_light = "#0f8c13"}, - {name = "tsconfig.json", text = "", fg_dark = "#519aba", fg_light = "#36677c"}, - {name = "unlicense", text = "", fg_dark = "#d0bf41", fg_light = "#686020"}, - {name = "vagrantfile$", text = "", fg_dark = "#1563ff", fg_light = "#104abf"}, - {name = "vlcrc", text = "󰕼", fg_dark = "#ee7a00", fg_light = "#9f5100"}, - {name = "webpack", text = "󰜫", fg_dark = "#519aba", fg_light = "#36677c"}, - {name = "weston.ini", text = "", fg_dark = "#ffbb01", fg_light = "#805e00"}, - {name = "workspace", text = "", fg_dark = "#89e051", fg_light = "#447028"}, - {name = "xmobarrc", text = "", fg_dark = "#fd4d5d", fg_light = "#a9333e"}, - {name = "xmobarrc.hs", text = "", fg_dark = "#fd4d5d", fg_light = "#a9333e"}, - {name = "xmonad.hs", text = "", fg_dark = "#fd4d5d", fg_light = "#a9333e"}, - {name = "xorg.conf", text = "", fg_dark = "#e54d18", fg_light = "#ac3a12"}, - {name = "xsettingsd.conf", text = "", fg_dark = "#e54d18", fg_light = "#ac3a12"}, + {name = ".babelrc", text = "", fg = "#f6c177"}, + {name = ".bash_profile", text = "", fg = "#f6c177"}, + {name = ".bashrc", text = "", fg = "#f6c177"}, + {name = ".clang-format", text = "", fg = "#524f67"}, + {name = ".clang-tidy", text = "", fg = "#524f67"}, + {name = ".codespellrc", text = "󰓆", fg = "#f6c177"}, + {name = ".condarc", text = "", fg = "#f6c177"}, + {name = ".dockerignore", text = "󰡨", fg = "#31748f"}, + {name = ".ds_store", text = "", fg = "#21202e"}, + {name = ".editorconfig", text = "", fg = "#e0def4"}, + {name = ".env", text = "", fg = "#f6c177"}, + {name = ".eslintignore", text = "", fg = "#31748f"}, + {name = ".eslintrc", text = "", fg = "#31748f"}, + {name = ".git-blame-ignore-revs", text = "", fg = "#eb6f92"}, + {name = ".gitattributes", text = "", fg = "#eb6f92"}, + {name = ".gitconfig", text = "", fg = "#eb6f92"}, + {name = ".gitignore", text = "", fg = "#eb6f92"}, + {name = ".gitlab-ci.yml", text = "", fg = "#eb6f92"}, + {name = ".gitmodules", text = "", fg = "#eb6f92"}, + {name = ".gtkrc-2.0", text = "", fg = "#e0def4"}, + {name = ".gvimrc", text = "", fg = "#f6c177"}, + {name = ".justfile", text = "", fg = "#e0def4"}, + {name = ".luacheckrc", text = "", fg = "#31748f"}, + {name = ".luaurc", text = "", fg = "#31748f"}, + {name = ".mailmap", text = "󰊢", fg = "#eb6f92"}, + {name = ".nanorc", text = "", fg = "#31748f"}, + {name = ".npmignore", text = "", fg = "#eb6f92"}, + {name = ".npmrc", text = "", fg = "#eb6f92"}, + {name = ".nuxtrc", text = "󱄆", fg = "#f6c177"}, + {name = ".nvmrc", text = "", fg = "#f6c177"}, + {name = ".pre-commit-config.yaml", text = "󰛢", fg = "#f6c177"}, + {name = ".prettierignore", text = "", fg = "#31748f"}, + {name = ".prettierrc", text = "", fg = "#31748f"}, + {name = ".prettierrc.cjs", text = "", fg = "#31748f"}, + {name = ".prettierrc.js", text = "", fg = "#31748f"}, + {name = ".prettierrc.json", text = "", fg = "#31748f"}, + {name = ".prettierrc.json5", text = "", fg = "#31748f"}, + {name = ".prettierrc.mjs", text = "", fg = "#31748f"}, + {name = ".prettierrc.toml", text = "", fg = "#31748f"}, + {name = ".prettierrc.yaml", text = "", fg = "#31748f"}, + {name = ".prettierrc.yml", text = "", fg = "#31748f"}, + {name = ".pylintrc", text = "", fg = "#e0def4"}, + {name = ".settings.json", text = "", fg = "#31748f"}, + {name = ".SRCINFO", text = "󰣇", fg = "#31748f"}, + {name = ".vimrc", text = "", fg = "#f6c177"}, + {name = ".Xauthority", text = "", fg = "#eb6f92"}, + {name = ".xinitrc", text = "", fg = "#eb6f92"}, + {name = ".Xresources", text = "", fg = "#eb6f92"}, + {name = ".xsession", text = "", fg = "#eb6f92"}, + {name = ".zprofile", text = "", fg = "#f6c177"}, + {name = ".zshenv", text = "", fg = "#f6c177"}, + {name = ".zshrc", text = "", fg = "#f6c177"}, + {name = "_gvimrc", text = "", fg = "#f6c177"}, + {name = "_vimrc", text = "", fg = "#f6c177"}, + {name = "AUTHORS", text = "", fg = "#31748f"}, + {name = "AUTHORS.txt", text = "", fg = "#31748f"}, + {name = "brewfile", text = "", fg = "#eb6f92"}, + {name = "bspwmrc", text = "", fg = "#21202e"}, + {name = "build", text = "", fg = "#f6c177"}, + {name = "build.gradle", text = "", fg = "#31748f"}, + {name = "build.zig.zon", text = "", fg = "#f6c177"}, + {name = "bun.lockb", text = "", fg = "#e0def4"}, + {name = "cantorrc", text = "", fg = "#31748f"}, + {name = "checkhealth", text = "󰓙", fg = "#31748f"}, + {name = "cmakelists.txt", text = "", fg = "#e0def4"}, + {name = "code_of_conduct", text = "", fg = "#eb6f92"}, + {name = "code_of_conduct.md", text = "", fg = "#eb6f92"}, + {name = "commit_editmsg", text = "", fg = "#eb6f92"}, + {name = "commitlint.config.js", text = "󰜘", fg = "#31748f"}, + {name = "commitlint.config.ts", text = "󰜘", fg = "#31748f"}, + {name = "compose.yaml", text = "󰡨", fg = "#31748f"}, + {name = "compose.yml", text = "󰡨", fg = "#31748f"}, + {name = "config", text = "", fg = "#e0def4"}, + {name = "containerfile", text = "󰡨", fg = "#31748f"}, + {name = "copying", text = "", fg = "#f6c177"}, + {name = "copying.lesser", text = "", fg = "#f6c177"}, + {name = "Directory.Build.props", text = "", fg = "#31748f"}, + {name = "Directory.Build.targets", text = "", fg = "#31748f"}, + {name = "Directory.Packages.props", text = "", fg = "#31748f"}, + {name = "docker-compose.yaml", text = "󰡨", fg = "#31748f"}, + {name = "docker-compose.yml", text = "󰡨", fg = "#31748f"}, + {name = "dockerfile", text = "󰡨", fg = "#31748f"}, + {name = "eslint.config.cjs", text = "", fg = "#31748f"}, + {name = "eslint.config.js", text = "", fg = "#31748f"}, + {name = "eslint.config.mjs", text = "", fg = "#31748f"}, + {name = "eslint.config.ts", text = "", fg = "#31748f"}, + {name = "ext_typoscript_setup.txt", text = "", fg = "#f6c177"}, + {name = "favicon.ico", text = "", fg = "#f6c177"}, + {name = "fp-info-cache", text = "", fg = "#e0def4"}, + {name = "fp-lib-table", text = "", fg = "#e0def4"}, + {name = "FreeCAD.conf", text = "", fg = "#eb6f92"}, + {name = "Gemfile", text = "", fg = "#eb6f92"}, + {name = "gnumakefile", text = "", fg = "#e0def4"}, + {name = "go.mod", text = "", fg = "#31748f"}, + {name = "go.sum", text = "", fg = "#31748f"}, + {name = "go.work", text = "", fg = "#31748f"}, + {name = "gradle-wrapper.properties", text = "", fg = "#31748f"}, + {name = "gradle.properties", text = "", fg = "#31748f"}, + {name = "gradlew", text = "", fg = "#31748f"}, + {name = "groovy", text = "", fg = "#6e6a86"}, + {name = "gruntfile.babel.js", text = "", fg = "#f6c177"}, + {name = "gruntfile.coffee", text = "", fg = "#f6c177"}, + {name = "gruntfile.js", text = "", fg = "#f6c177"}, + {name = "gruntfile.ts", text = "", fg = "#f6c177"}, + {name = "gtkrc", text = "", fg = "#e0def4"}, + {name = "gulpfile.babel.js", text = "", fg = "#eb6f92"}, + {name = "gulpfile.coffee", text = "", fg = "#eb6f92"}, + {name = "gulpfile.js", text = "", fg = "#eb6f92"}, + {name = "gulpfile.ts", text = "", fg = "#eb6f92"}, + {name = "hypridle.conf", text = "", fg = "#31748f"}, + {name = "hyprland.conf", text = "", fg = "#31748f"}, + {name = "hyprlock.conf", text = "", fg = "#31748f"}, + {name = "hyprpaper.conf", text = "", fg = "#31748f"}, + {name = "i18n.config.js", text = "󰗊", fg = "#c4a7e7"}, + {name = "i18n.config.ts", text = "󰗊", fg = "#c4a7e7"}, + {name = "i3blocks.conf", text = "", fg = "#e0def4"}, + {name = "i3status.conf", text = "", fg = "#e0def4"}, + {name = "index.theme", text = "", fg = "#f6c177"}, + {name = "ionic.config.json", text = "", fg = "#31748f"}, + {name = "justfile", text = "", fg = "#e0def4"}, + {name = "kalgebrarc", text = "", fg = "#31748f"}, + {name = "kdeglobals", text = "", fg = "#31748f"}, + {name = "kdenlive-layoutsrc", text = "", fg = "#31748f"}, + {name = "kdenliverc", text = "", fg = "#31748f"}, + {name = "kritadisplayrc", text = "", fg = "#31748f"}, + {name = "kritarc", text = "", fg = "#31748f"}, + {name = "license", text = "", fg = "#f6c177"}, + {name = "license.md", text = "", fg = "#f6c177"}, + {name = "lxde-rc.xml", text = "", fg = "#e0def4"}, + {name = "lxqt.conf", text = "", fg = "#31748f"}, + {name = "makefile", text = "", fg = "#e0def4"}, + {name = "mix.lock", text = "", fg = "#c4a7e7"}, + {name = "mpv.conf", text = "", fg = "#31748f"}, + {name = "node_modules", text = "", fg = "#eb6f92"}, + {name = "nuxt.config.cjs", text = "󱄆", fg = "#f6c177"}, + {name = "nuxt.config.js", text = "󱄆", fg = "#f6c177"}, + {name = "nuxt.config.mjs", text = "󱄆", fg = "#f6c177"}, + {name = "nuxt.config.ts", text = "󱄆", fg = "#f6c177"}, + {name = "package-lock.json", text = "", fg = "#eb6f92"}, + {name = "package.json", text = "", fg = "#eb6f92"}, + {name = "PKGBUILD", text = "", fg = "#31748f"}, + {name = "platformio.ini", text = "", fg = "#f6c177"}, + {name = "pom.xml", text = "", fg = "#eb6f92"}, + {name = "prettier.config.cjs", text = "", fg = "#31748f"}, + {name = "prettier.config.js", text = "", fg = "#31748f"}, + {name = "prettier.config.mjs", text = "", fg = "#31748f"}, + {name = "prettier.config.ts", text = "", fg = "#31748f"}, + {name = "procfile", text = "", fg = "#c4a7e7"}, + {name = "PrusaSlicer.ini", text = "", fg = "#f6c177"}, + {name = "PrusaSlicerGcodeViewer.ini", text = "", fg = "#f6c177"}, + {name = "py.typed", text = "", fg = "#f6c177"}, + {name = "QtProject.conf", text = "", fg = "#f6c177"}, + {name = "rakefile", text = "", fg = "#eb6f92"}, + {name = "readme", text = "󰂺", fg = "#e0def4"}, + {name = "readme.md", text = "󰂺", fg = "#e0def4"}, + {name = "rmd", text = "", fg = "#31748f"}, + {name = "robots.txt", text = "󰚩", fg = "#6e6a86"}, + {name = "security", text = "󰒃", fg = "#e0def4"}, + {name = "security.md", text = "󰒃", fg = "#e0def4"}, + {name = "settings.gradle", text = "", fg = "#31748f"}, + {name = "svelte.config.js", text = "", fg = "#eb6f92"}, + {name = "sxhkdrc", text = "", fg = "#21202e"}, + {name = "sym-lib-table", text = "", fg = "#e0def4"}, + {name = "tailwind.config.js", text = "󱏿", fg = "#31748f"}, + {name = "tailwind.config.mjs", text = "󱏿", fg = "#31748f"}, + {name = "tailwind.config.ts", text = "󱏿", fg = "#31748f"}, + {name = "tmux.conf", text = "", fg = "#f6c177"}, + {name = "tmux.conf.local", text = "", fg = "#f6c177"}, + {name = "tsconfig.json", text = "", fg = "#31748f"}, + {name = "unlicense", text = "", fg = "#f6c177"}, + {name = "vagrantfile", text = "", fg = "#31748f"}, + {name = "vercel.json", text = "", fg = "#e0def4"}, + {name = "vlcrc", text = "󰕼", fg = "#f6c177"}, + {name = "webpack", text = "󰜫", fg = "#31748f"}, + {name = "weston.ini", text = "", fg = "#f6c177"}, + {name = "workspace", text = "", fg = "#f6c177"}, + {name = "xmobarrc", text = "", fg = "#eb6f92"}, + {name = "xmobarrc.hs", text = "", fg = "#eb6f92"}, + {name = "xmonad.hs", text = "", fg = "#eb6f92"}, + {name = "xorg.conf", text = "", fg = "#eb6f92"}, + {name = "xsettingsd.conf", text = "", fg = "#eb6f92"}, ] exts = [ - {name = "3gp", text = "", fg_dark = "#fd971f", fg_light = "#7e4c10"}, - {name = "3mf", text = "󰆧", fg_dark = "#888888", fg_light = "#5b5b5b"}, - {name = "7z", text = "", fg_dark = "#eca517", fg_light = "#76520c"}, - {name = "Dockerfile", text = "󰡨", fg_dark = "#458ee6", fg_light = "#2e5f99"}, - {name = "a", text = "", fg_dark = "#dcddd6", fg_light = "#494a47"}, - {name = "aac", text = "", fg_dark = "#00afff", fg_light = "#0075aa"}, - {name = "ai", text = "", fg_dark = "#cbcb41", fg_light = "#666620"}, - {name = "aif", text = "", fg_dark = "#00afff", fg_light = "#0075aa"}, - {name = "aiff", text = "", fg_dark = "#00afff", fg_light = "#0075aa"}, - {name = "android", text = "", fg_dark = "#34a853", fg_light = "#277e3e"}, - {name = "ape", text = "", fg_dark = "#00afff", fg_light = "#0075aa"}, - {name = "apk", text = "", fg_dark = "#34a853", fg_light = "#277e3e"}, - {name = "app", text = "", fg_dark = "#9f0500", fg_light = "#9f0500"}, - {name = "applescript", text = "", fg_dark = "#6d8085", fg_light = "#526064"}, - {name = "asc", text = "󰦝", fg_dark = "#576d7f", fg_light = "#41525f"}, - {name = "ass", text = "󰨖", fg_dark = "#ffb713", fg_light = "#805c0a"}, - {name = "astro", text = "", fg_dark = "#e23f67", fg_light = "#aa2f4d"}, - {name = "awk", text = "", fg_dark = "#4d5a5e", fg_light = "#3a4446"}, - {name = "azcli", text = "", fg_dark = "#0078d4", fg_light = "#005a9f"}, - {name = "bak", text = "󰁯", fg_dark = "#6d8086", fg_light = "#526064"}, - {name = "bash", text = "", fg_dark = "#89e051", fg_light = "#447028"}, - {name = "bat", text = "", fg_dark = "#c1f12e", fg_light = "#40500f"}, - {name = "bazel", text = "", fg_dark = "#89e051", fg_light = "#447028"}, - {name = "bib", text = "󱉟", fg_dark = "#cbcb41", fg_light = "#666620"}, - {name = "bicep", text = "", fg_dark = "#519aba", fg_light = "#36677c"}, - {name = "bicepparam", text = "", fg_dark = "#9f74b3", fg_light = "#6a4d77"}, - {name = "bin", text = "", fg_dark = "#9f0500", fg_light = "#9f0500"}, - {name = "blade.php", text = "", fg_dark = "#f05340", fg_light = "#a0372b"}, - {name = "blend", text = "󰂫", fg_dark = "#ea7600", fg_light = "#9c4f00"}, - {name = "blp", text = "󰺾", fg_dark = "#5796e2", fg_light = "#3a6497"}, - {name = "bmp", text = "", fg_dark = "#a074c4", fg_light = "#6b4d83"}, - {name = "brep", text = "󰻫", fg_dark = "#839463", fg_light = "#576342"}, - {name = "bz", text = "", fg_dark = "#eca517", fg_light = "#76520c"}, - {name = "bz2", text = "", fg_dark = "#eca517", fg_light = "#76520c"}, - {name = "bz3", text = "", fg_dark = "#eca517", fg_light = "#76520c"}, - {name = "bzl", text = "", fg_dark = "#89e051", fg_light = "#447028"}, - {name = "c", text = "", fg_dark = "#599eff", fg_light = "#3b69aa"}, - {name = "c++", text = "", fg_dark = "#f34b7d", fg_light = "#a23253"}, - {name = "cache", text = "", fg_dark = "#ffffff", fg_light = "#333333"}, - {name = "cast", text = "", fg_dark = "#fd971f", fg_light = "#7e4c10"}, - {name = "cbl", text = "⚙", fg_dark = "#005ca5", fg_light = "#005ca5"}, - {name = "cc", text = "", fg_dark = "#f34b7d", fg_light = "#a23253"}, - {name = "ccm", text = "", fg_dark = "#f34b7d", fg_light = "#a23253"}, - {name = "cfg", text = "", fg_dark = "#6d8086", fg_light = "#526064"}, - {name = "cjs", text = "", fg_dark = "#cbcb41", fg_light = "#666620"}, - {name = "clj", text = "", fg_dark = "#8dc149", fg_light = "#466024"}, - {name = "cljc", text = "", fg_dark = "#8dc149", fg_light = "#466024"}, - {name = "cljd", text = "", fg_dark = "#519aba", fg_light = "#36677c"}, - {name = "cljs", text = "", fg_dark = "#519aba", fg_light = "#36677c"}, - {name = "cmake", text = "", fg_dark = "#6d8086", fg_light = "#526064"}, - {name = "cob", text = "⚙", fg_dark = "#005ca5", fg_light = "#005ca5"}, - {name = "cobol", text = "⚙", fg_dark = "#005ca5", fg_light = "#005ca5"}, - {name = "coffee", text = "", fg_dark = "#cbcb41", fg_light = "#666620"}, - {name = "conf", text = "", fg_dark = "#6d8086", fg_light = "#526064"}, - {name = "config.ru", text = "", fg_dark = "#701516", fg_light = "#701516"}, - {name = "cp", text = "", fg_dark = "#519aba", fg_light = "#36677c"}, - {name = "cpp", text = "", fg_dark = "#519aba", fg_light = "#36677c"}, - {name = "cppm", text = "", fg_dark = "#519aba", fg_light = "#36677c"}, - {name = "cpy", text = "⚙", fg_dark = "#005ca5", fg_light = "#005ca5"}, - {name = "cr", text = "", fg_dark = "#c8c8c8", fg_light = "#434343"}, - {name = "crdownload", text = "", fg_dark = "#44cda8", fg_light = "#226654"}, - {name = "cs", text = "󰌛", fg_dark = "#596706", fg_light = "#434d04"}, - {name = "csh", text = "", fg_dark = "#4d5a5e", fg_light = "#3a4446"}, - {name = "cshtml", text = "󱦗", fg_dark = "#512bd4", fg_light = "#512bd4"}, - {name = "cson", text = "", fg_dark = "#cbcb41", fg_light = "#666620"}, - {name = "csproj", text = "󰪮", fg_dark = "#512bd4", fg_light = "#512bd4"}, - {name = "css", text = "", fg_dark = "#42a5f5", fg_light = "#2c6ea3"}, - {name = "csv", text = "", fg_dark = "#89e051", fg_light = "#447028"}, - {name = "cts", text = "", fg_dark = "#519aba", fg_light = "#36677c"}, - {name = "cu", text = "", fg_dark = "#89e051", fg_light = "#447028"}, - {name = "cue", text = "󰲹", fg_dark = "#ed95ae", fg_light = "#764a57"}, - {name = "cuh", text = "", fg_dark = "#a074c4", fg_light = "#6b4d83"}, - {name = "cxx", text = "", fg_dark = "#519aba", fg_light = "#36677c"}, - {name = "cxxm", text = "", fg_dark = "#519aba", fg_light = "#36677c"}, - {name = "d", text = "", fg_dark = "#427819", fg_light = "#325a13"}, - {name = "d.ts", text = "", fg_dark = "#d59855", fg_light = "#6a4c2a"}, - {name = "dart", text = "", fg_dark = "#03589c", fg_light = "#03589c"}, - {name = "db", text = "", fg_dark = "#dad8d8", fg_light = "#494848"}, - {name = "dconf", text = "", fg_dark = "#ffffff", fg_light = "#333333"}, - {name = "desktop", text = "", fg_dark = "#563d7c", fg_light = "#563d7c"}, - {name = "diff", text = "", fg_dark = "#41535b", fg_light = "#41535b"}, - {name = "dll", text = "", fg_dark = "#4d2c0b", fg_light = "#4d2c0b"}, - {name = "doc", text = "󰈬", fg_dark = "#185abd", fg_light = "#185abd"}, - {name = "docx", text = "󰈬", fg_dark = "#185abd", fg_light = "#185abd"}, - {name = "dot", text = "󱁉", fg_dark = "#30638e", fg_light = "#244a6a"}, - {name = "download", text = "", fg_dark = "#44cda8", fg_light = "#226654"}, - {name = "drl", text = "", fg_dark = "#ffafaf", fg_light = "#553a3a"}, - {name = "dropbox", text = "", fg_dark = "#0061fe", fg_light = "#0049be"}, - {name = "dump", text = "", fg_dark = "#dad8d8", fg_light = "#494848"}, - {name = "dwg", text = "󰻫", fg_dark = "#839463", fg_light = "#576342"}, - {name = "dxf", text = "󰻫", fg_dark = "#839463", fg_light = "#576342"}, - {name = "ebook", text = "", fg_dark = "#eab16d", fg_light = "#755836"}, - {name = "edn", text = "", fg_dark = "#519aba", fg_light = "#36677c"}, - {name = "eex", text = "", fg_dark = "#a074c4", fg_light = "#6b4d83"}, - {name = "ejs", text = "", fg_dark = "#cbcb41", fg_light = "#666620"}, - {name = "el", text = "", fg_dark = "#8172be", fg_light = "#61568e"}, - {name = "elc", text = "", fg_dark = "#8172be", fg_light = "#61568e"}, - {name = "elf", text = "", fg_dark = "#9f0500", fg_light = "#9f0500"}, - {name = "elm", text = "", fg_dark = "#519aba", fg_light = "#36677c"}, - {name = "eln", text = "", fg_dark = "#8172be", fg_light = "#61568e"}, - {name = "env", text = "", fg_dark = "#faf743", fg_light = "#32310d"}, - {name = "eot", text = "", fg_dark = "#ececec", fg_light = "#2f2f2f"}, - {name = "epp", text = "", fg_dark = "#ffa61a", fg_light = "#80530d"}, - {name = "epub", text = "", fg_dark = "#eab16d", fg_light = "#755836"}, - {name = "erb", text = "", fg_dark = "#701516", fg_light = "#701516"}, - {name = "erl", text = "", fg_dark = "#b83998", fg_light = "#8a2b72"}, - {name = "ex", text = "", fg_dark = "#a074c4", fg_light = "#6b4d83"}, - {name = "exe", text = "", fg_dark = "#9f0500", fg_light = "#9f0500"}, - {name = "exs", text = "", fg_dark = "#a074c4", fg_light = "#6b4d83"}, - {name = "f#", text = "", fg_dark = "#519aba", fg_light = "#36677c"}, - {name = "f3d", text = "󰻫", fg_dark = "#839463", fg_light = "#576342"}, - {name = "f90", text = "󱈚", fg_dark = "#734f96", fg_light = "#563b70"}, - {name = "fbx", text = "󰆧", fg_dark = "#888888", fg_light = "#5b5b5b"}, - {name = "fcbak", text = "", fg_dark = "#cb0d0d", fg_light = "#cb0d0d"}, - {name = "fcmacro", text = "", fg_dark = "#cb0d0d", fg_light = "#cb0d0d"}, - {name = "fcmat", text = "", fg_dark = "#cb0d0d", fg_light = "#cb0d0d"}, - {name = "fcparam", text = "", fg_dark = "#cb0d0d", fg_light = "#cb0d0d"}, - {name = "fcscript", text = "", fg_dark = "#cb0d0d", fg_light = "#cb0d0d"}, - {name = "fcstd", text = "", fg_dark = "#cb0d0d", fg_light = "#cb0d0d"}, - {name = "fcstd1", text = "", fg_dark = "#cb0d0d", fg_light = "#cb0d0d"}, - {name = "fctb", text = "", fg_dark = "#cb0d0d", fg_light = "#cb0d0d"}, - {name = "fctl", text = "", fg_dark = "#cb0d0d", fg_light = "#cb0d0d"}, - {name = "fdmdownload", text = "", fg_dark = "#44cda8", fg_light = "#226654"}, - {name = "fish", text = "", fg_dark = "#4d5a5e", fg_light = "#3a4446"}, - {name = "flac", text = "", fg_dark = "#0075aa", fg_light = "#005880"}, - {name = "flc", text = "", fg_dark = "#ececec", fg_light = "#2f2f2f"}, - {name = "flf", text = "", fg_dark = "#ececec", fg_light = "#2f2f2f"}, - {name = "fnl", text = "", fg_dark = "#fff3d7", fg_light = "#33312b"}, - {name = "fs", text = "", fg_dark = "#519aba", fg_light = "#36677c"}, - {name = "fsi", text = "", fg_dark = "#519aba", fg_light = "#36677c"}, - {name = "fsscript", text = "", fg_dark = "#519aba", fg_light = "#36677c"}, - {name = "fsx", text = "", fg_dark = "#519aba", fg_light = "#36677c"}, - {name = "gcode", text = "󰐫", fg_dark = "#1471ad", fg_light = "#0f5582"}, - {name = "gd", text = "", fg_dark = "#6d8086", fg_light = "#526064"}, - {name = "gemspec", text = "", fg_dark = "#701516", fg_light = "#701516"}, - {name = "gif", text = "", fg_dark = "#a074c4", fg_light = "#6b4d83"}, - {name = "git", text = "", fg_dark = "#f14c28", fg_light = "#b5391e"}, - {name = "glb", text = "", fg_dark = "#ffb13b", fg_light = "#80581e"}, - {name = "gnumakefile", text = "", fg_dark = "#6d8086", fg_light = "#526064"}, - {name = "go", text = "", fg_dark = "#519aba", fg_light = "#36677c"}, - {name = "godot", text = "", fg_dark = "#6d8086", fg_light = "#526064"}, - {name = "gql", text = "", fg_dark = "#e535ab", fg_light = "#ac2880"}, - {name = "graphql", text = "", fg_dark = "#e535ab", fg_light = "#ac2880"}, - {name = "gresource", text = "", fg_dark = "#ffffff", fg_light = "#333333"}, - {name = "gv", text = "󱁉", fg_dark = "#30638e", fg_light = "#244a6a"}, - {name = "gz", text = "", fg_dark = "#eca517", fg_light = "#76520c"}, - {name = "h", text = "", fg_dark = "#a074c4", fg_light = "#6b4d83"}, - {name = "haml", text = "", fg_dark = "#eaeae1", fg_light = "#2f2f2d"}, - {name = "hbs", text = "", fg_dark = "#f0772b", fg_light = "#a04f1d"}, - {name = "heex", text = "", fg_dark = "#a074c4", fg_light = "#6b4d83"}, - {name = "heic", text = "", fg_dark = "#a074c4", fg_light = "#6b4d83"}, - {name = "hex", text = "", fg_dark = "#2e63ff", fg_light = "#224abf"}, - {name = "hh", text = "", fg_dark = "#a074c4", fg_light = "#6b4d83"}, - {name = "hpp", text = "", fg_dark = "#a074c4", fg_light = "#6b4d83"}, - {name = "hrl", text = "", fg_dark = "#b83998", fg_light = "#8a2b72"}, - {name = "hs", text = "", fg_dark = "#a074c4", fg_light = "#6b4d83"}, - {name = "htm", text = "", fg_dark = "#e34c26", fg_light = "#aa391c"}, - {name = "html", text = "", fg_dark = "#e44d26", fg_light = "#ab3a1c"}, - {name = "huff", text = "󰡘", fg_dark = "#4242c7", fg_light = "#4242c7"}, - {name = "hurl", text = "", fg_dark = "#ff0288", fg_light = "#bf0266"}, - {name = "hx", text = "", fg_dark = "#ea8220", fg_light = "#9c5715"}, - {name = "hxx", text = "", fg_dark = "#a074c4", fg_light = "#6b4d83"}, - {name = "ical", text = "", fg_dark = "#2b2e83", fg_light = "#2b2e83"}, - {name = "icalendar", text = "", fg_dark = "#2b2e83", fg_light = "#2b2e83"}, - {name = "ico", text = "", fg_dark = "#cbcb41", fg_light = "#666620"}, - {name = "ics", text = "", fg_dark = "#2b2e83", fg_light = "#2b2e83"}, - {name = "ifb", text = "", fg_dark = "#2b2e83", fg_light = "#2b2e83"}, - {name = "ifc", text = "󰻫", fg_dark = "#839463", fg_light = "#576342"}, - {name = "ige", text = "󰻫", fg_dark = "#839463", fg_light = "#576342"}, - {name = "iges", text = "󰻫", fg_dark = "#839463", fg_light = "#576342"}, - {name = "igs", text = "󰻫", fg_dark = "#839463", fg_light = "#576342"}, - {name = "image", text = "", fg_dark = "#d0bec8", fg_light = "#453f43"}, - {name = "img", text = "", fg_dark = "#d0bec8", fg_light = "#453f43"}, - {name = "import", text = "", fg_dark = "#ececec", fg_light = "#2f2f2f"}, - {name = "info", text = "", fg_dark = "#ffffcd", fg_light = "#333329"}, - {name = "ini", text = "", fg_dark = "#6d8086", fg_light = "#526064"}, - {name = "ino", text = "", fg_dark = "#56b6c2", fg_light = "#397981"}, - {name = "ipynb", text = "", fg_dark = "#51a0cf", fg_light = "#366b8a"}, - {name = "iso", text = "", fg_dark = "#d0bec8", fg_light = "#453f43"}, - {name = "ixx", text = "", fg_dark = "#519aba", fg_light = "#36677c"}, - {name = "java", text = "", fg_dark = "#cc3e44", fg_light = "#992e33"}, - {name = "jl", text = "", fg_dark = "#a270ba", fg_light = "#6c4b7c"}, - {name = "jpeg", text = "", fg_dark = "#a074c4", fg_light = "#6b4d83"}, - {name = "jpg", text = "", fg_dark = "#a074c4", fg_light = "#6b4d83"}, - {name = "js", text = "", fg_dark = "#cbcb41", fg_light = "#666620"}, - {name = "json", text = "", fg_dark = "#cbcb41", fg_light = "#666620"}, - {name = "json5", text = "", fg_dark = "#cbcb41", fg_light = "#666620"}, - {name = "jsonc", text = "", fg_dark = "#cbcb41", fg_light = "#666620"}, - {name = "jsx", text = "", fg_dark = "#20c2e3", fg_light = "#158197"}, - {name = "jwmrc", text = "", fg_dark = "#0078cd", fg_light = "#005a9a"}, - {name = "jxl", text = "", fg_dark = "#a074c4", fg_light = "#6b4d83"}, - {name = "kbx", text = "󰯄", fg_dark = "#737672", fg_light = "#565856"}, - {name = "kdb", text = "", fg_dark = "#529b34", fg_light = "#3e7427"}, - {name = "kdbx", text = "", fg_dark = "#529b34", fg_light = "#3e7427"}, - {name = "kdenlive", text = "", fg_dark = "#83b8f2", fg_light = "#425c79"}, - {name = "kdenlivetitle", text = "", fg_dark = "#83b8f2", fg_light = "#425c79"}, - {name = "kicad_dru", text = "", fg_dark = "#ffffff", fg_light = "#333333"}, - {name = "kicad_mod", text = "", fg_dark = "#ffffff", fg_light = "#333333"}, - {name = "kicad_pcb", text = "", fg_dark = "#ffffff", fg_light = "#333333"}, - {name = "kicad_prl", text = "", fg_dark = "#ffffff", fg_light = "#333333"}, - {name = "kicad_pro", text = "", fg_dark = "#ffffff", fg_light = "#333333"}, - {name = "kicad_sch", text = "", fg_dark = "#ffffff", fg_light = "#333333"}, - {name = "kicad_sym", text = "", fg_dark = "#ffffff", fg_light = "#333333"}, - {name = "kicad_wks", text = "", fg_dark = "#ffffff", fg_light = "#333333"}, - {name = "ko", text = "", fg_dark = "#dcddd6", fg_light = "#494a47"}, - {name = "kpp", text = "", fg_dark = "#f245fb", fg_light = "#a12ea7"}, - {name = "kra", text = "", fg_dark = "#f245fb", fg_light = "#a12ea7"}, - {name = "krz", text = "", fg_dark = "#f245fb", fg_light = "#a12ea7"}, - {name = "ksh", text = "", fg_dark = "#4d5a5e", fg_light = "#3a4446"}, - {name = "kt", text = "", fg_dark = "#7f52ff", fg_light = "#5f3ebf"}, - {name = "kts", text = "", fg_dark = "#7f52ff", fg_light = "#5f3ebf"}, - {name = "lck", text = "", fg_dark = "#bbbbbb", fg_light = "#5e5e5e"}, - {name = "leex", text = "", fg_dark = "#a074c4", fg_light = "#6b4d83"}, - {name = "less", text = "", fg_dark = "#563d7c", fg_light = "#563d7c"}, - {name = "lff", text = "", fg_dark = "#ececec", fg_light = "#2f2f2f"}, - {name = "lhs", text = "", fg_dark = "#a074c4", fg_light = "#6b4d83"}, - {name = "lib", text = "", fg_dark = "#4d2c0b", fg_light = "#4d2c0b"}, - {name = "license", text = "", fg_dark = "#cbcb41", fg_light = "#666620"}, - {name = "liquid", text = "", fg_dark = "#95bf47", fg_light = "#4a6024"}, - {name = "lock", text = "", fg_dark = "#bbbbbb", fg_light = "#5e5e5e"}, - {name = "log", text = "󰌱", fg_dark = "#dddddd", fg_light = "#4a4a4a"}, - {name = "lrc", text = "󰨖", fg_dark = "#ffb713", fg_light = "#805c0a"}, - {name = "lua", text = "", fg_dark = "#51a0cf", fg_light = "#366b8a"}, - {name = "luac", text = "", fg_dark = "#51a0cf", fg_light = "#366b8a"}, - {name = "luau", text = "", fg_dark = "#00a2ff", fg_light = "#007abf"}, - {name = "m", text = "", fg_dark = "#599eff", fg_light = "#3b69aa"}, - {name = "m3u", text = "󰲹", fg_dark = "#ed95ae", fg_light = "#764a57"}, - {name = "m3u8", text = "󰲹", fg_dark = "#ed95ae", fg_light = "#764a57"}, - {name = "m4a", text = "", fg_dark = "#00afff", fg_light = "#0075aa"}, - {name = "m4v", text = "", fg_dark = "#fd971f", fg_light = "#7e4c10"}, - {name = "magnet", text = "", fg_dark = "#a51b16", fg_light = "#a51b16"}, - {name = "makefile", text = "", fg_dark = "#6d8086", fg_light = "#526064"}, - {name = "markdown", text = "", fg_dark = "#dddddd", fg_light = "#4a4a4a"}, - {name = "material", text = "󰔉", fg_dark = "#b83998", fg_light = "#8a2b72"}, - {name = "md", text = "", fg_dark = "#dddddd", fg_light = "#4a4a4a"}, - {name = "md5", text = "󰕥", fg_dark = "#8c86af", fg_light = "#5d5975"}, - {name = "mdx", text = "", fg_dark = "#519aba", fg_light = "#36677c"}, - {name = "mint", text = "󰌪", fg_dark = "#87c095", fg_light = "#44604a"}, - {name = "mjs", text = "", fg_dark = "#f1e05a", fg_light = "#504b1e"}, - {name = "mk", text = "", fg_dark = "#6d8086", fg_light = "#526064"}, - {name = "mkv", text = "", fg_dark = "#fd971f", fg_light = "#7e4c10"}, - {name = "ml", text = "", fg_dark = "#e37933", fg_light = "#975122"}, - {name = "mli", text = "", fg_dark = "#e37933", fg_light = "#975122"}, - {name = "mm", text = "", fg_dark = "#519aba", fg_light = "#36677c"}, - {name = "mo", text = "∞", fg_dark = "#9772fb", fg_light = "#654ca7"}, - {name = "mobi", text = "", fg_dark = "#eab16d", fg_light = "#755836"}, - {name = "mov", text = "", fg_dark = "#fd971f", fg_light = "#7e4c10"}, - {name = "mp3", text = "", fg_dark = "#00afff", fg_light = "#0075aa"}, - {name = "mp4", text = "", fg_dark = "#fd971f", fg_light = "#7e4c10"}, - {name = "mpp", text = "", fg_dark = "#519aba", fg_light = "#36677c"}, - {name = "msf", text = "", fg_dark = "#137be1", fg_light = "#0e5ca9"}, - {name = "mts", text = "", fg_dark = "#519aba", fg_light = "#36677c"}, - {name = "mustache", text = "", fg_dark = "#e37933", fg_light = "#975122"}, - {name = "nfo", text = "", fg_dark = "#ffffcd", fg_light = "#333329"}, - {name = "nim", text = "", fg_dark = "#f3d400", fg_light = "#514700"}, - {name = "nix", text = "", fg_dark = "#7ebae4", fg_light = "#3f5d72"}, - {name = "nswag", text = "", fg_dark = "#85ea2d", fg_light = "#427516"}, - {name = "nu", text = ">", fg_dark = "#3aa675", fg_light = "#276f4e"}, - {name = "o", text = "", fg_dark = "#9f0500", fg_light = "#9f0500"}, - {name = "obj", text = "󰆧", fg_dark = "#888888", fg_light = "#5b5b5b"}, - {name = "ogg", text = "", fg_dark = "#0075aa", fg_light = "#005880"}, - {name = "opus", text = "", fg_dark = "#0075aa", fg_light = "#005880"}, - {name = "org", text = "", fg_dark = "#77aa99", fg_light = "#4f7166"}, - {name = "otf", text = "", fg_dark = "#ececec", fg_light = "#2f2f2f"}, - {name = "out", text = "", fg_dark = "#9f0500", fg_light = "#9f0500"}, - {name = "part", text = "", fg_dark = "#44cda8", fg_light = "#226654"}, - {name = "patch", text = "", fg_dark = "#41535b", fg_light = "#41535b"}, - {name = "pck", text = "", fg_dark = "#6d8086", fg_light = "#526064"}, - {name = "pcm", text = "", fg_dark = "#0075aa", fg_light = "#005880"}, - {name = "pdf", text = "", fg_dark = "#b30b00", fg_light = "#b30b00"}, - {name = "php", text = "", fg_dark = "#a074c4", fg_light = "#6b4d83"}, - {name = "pl", text = "", fg_dark = "#519aba", fg_light = "#36677c"}, - {name = "pls", text = "󰲹", fg_dark = "#ed95ae", fg_light = "#764a57"}, - {name = "ply", text = "󰆧", fg_dark = "#888888", fg_light = "#5b5b5b"}, - {name = "pm", text = "", fg_dark = "#519aba", fg_light = "#36677c"}, - {name = "png", text = "", fg_dark = "#a074c4", fg_light = "#6b4d83"}, - {name = "po", text = "", fg_dark = "#2596be", fg_light = "#1c708e"}, - {name = "pot", text = "", fg_dark = "#2596be", fg_light = "#1c708e"}, - {name = "pp", text = "", fg_dark = "#ffa61a", fg_light = "#80530d"}, - {name = "ppt", text = "󰈧", fg_dark = "#cb4a32", fg_light = "#983826"}, - {name = "prisma", text = "", fg_dark = "#5a67d8", fg_light = "#444da2"}, - {name = "pro", text = "", fg_dark = "#e4b854", fg_light = "#725c2a"}, - {name = "ps1", text = "󰨊", fg_dark = "#4273ca", fg_light = "#325698"}, - {name = "psb", text = "", fg_dark = "#519aba", fg_light = "#36677c"}, - {name = "psd", text = "", fg_dark = "#519aba", fg_light = "#36677c"}, - {name = "psd1", text = "󰨊", fg_dark = "#6975c4", fg_light = "#4f5893"}, - {name = "psm1", text = "󰨊", fg_dark = "#6975c4", fg_light = "#4f5893"}, - {name = "pub", text = "󰷖", fg_dark = "#e3c58e", fg_light = "#4c422f"}, - {name = "pxd", text = "", fg_dark = "#5aa7e4", fg_light = "#3c6f98"}, - {name = "pxi", text = "", fg_dark = "#5aa7e4", fg_light = "#3c6f98"}, - {name = "py", text = "", fg_dark = "#ffbc03", fg_light = "#805e02"}, - {name = "pyc", text = "", fg_dark = "#ffe291", fg_light = "#332d1d"}, - {name = "pyd", text = "", fg_dark = "#ffe291", fg_light = "#332d1d"}, - {name = "pyi", text = "", fg_dark = "#ffbc03", fg_light = "#805e02"}, - {name = "pyo", text = "", fg_dark = "#ffe291", fg_light = "#332d1d"}, - {name = "pyx", text = "", fg_dark = "#5aa7e4", fg_light = "#3c6f98"}, - {name = "qm", text = "", fg_dark = "#2596be", fg_light = "#1c708e"}, - {name = "qml", text = "", fg_dark = "#40cd52", fg_light = "#2b8937"}, - {name = "qrc", text = "", fg_dark = "#40cd52", fg_light = "#2b8937"}, - {name = "qss", text = "", fg_dark = "#40cd52", fg_light = "#2b8937"}, - {name = "query", text = "", fg_dark = "#90a850", fg_light = "#607035"}, - {name = "r", text = "󰟔", fg_dark = "#2266ba", fg_light = "#1a4c8c"}, - {name = "rake", text = "", fg_dark = "#701516", fg_light = "#701516"}, - {name = "rar", text = "", fg_dark = "#eca517", fg_light = "#76520c"}, - {name = "razor", text = "󱦘", fg_dark = "#512bd4", fg_light = "#512bd4"}, - {name = "rb", text = "", fg_dark = "#701516", fg_light = "#701516"}, - {name = "res", text = "", fg_dark = "#cc3e44", fg_light = "#992e33"}, - {name = "resi", text = "", fg_dark = "#f55385", fg_light = "#a33759"}, - {name = "rlib", text = "", fg_dark = "#dea584", fg_light = "#6f5242"}, - {name = "rmd", text = "", fg_dark = "#519aba", fg_light = "#36677c"}, - {name = "rproj", text = "󰗆", fg_dark = "#358a5b", fg_light = "#286844"}, - {name = "rs", text = "", fg_dark = "#dea584", fg_light = "#6f5242"}, - {name = "rss", text = "", fg_dark = "#fb9d3b", fg_light = "#7e4e1e"}, - {name = "sass", text = "", fg_dark = "#f55385", fg_light = "#a33759"}, - {name = "sbt", text = "", fg_dark = "#cc3e44", fg_light = "#992e33"}, - {name = "sc", text = "", fg_dark = "#cc3e44", fg_light = "#992e33"}, - {name = "scad", text = "", fg_dark = "#f9d72c", fg_light = "#53480f"}, - {name = "scala", text = "", fg_dark = "#cc3e44", fg_light = "#992e33"}, - {name = "scm", text = "󰘧", fg_dark = "#eeeeee", fg_light = "#303030"}, - {name = "scss", text = "", fg_dark = "#f55385", fg_light = "#a33759"}, - {name = "sh", text = "", fg_dark = "#4d5a5e", fg_light = "#3a4446"}, - {name = "sha1", text = "󰕥", fg_dark = "#8c86af", fg_light = "#5d5975"}, - {name = "sha224", text = "󰕥", fg_dark = "#8c86af", fg_light = "#5d5975"}, - {name = "sha256", text = "󰕥", fg_dark = "#8c86af", fg_light = "#5d5975"}, - {name = "sha384", text = "󰕥", fg_dark = "#8c86af", fg_light = "#5d5975"}, - {name = "sha512", text = "󰕥", fg_dark = "#8c86af", fg_light = "#5d5975"}, - {name = "sig", text = "λ", fg_dark = "#e37933", fg_light = "#975122"}, - {name = "signature", text = "λ", fg_dark = "#e37933", fg_light = "#975122"}, - {name = "skp", text = "󰻫", fg_dark = "#839463", fg_light = "#576342"}, - {name = "sldasm", text = "󰻫", fg_dark = "#839463", fg_light = "#576342"}, - {name = "sldprt", text = "󰻫", fg_dark = "#839463", fg_light = "#576342"}, - {name = "slim", text = "", fg_dark = "#e34c26", fg_light = "#aa391c"}, - {name = "sln", text = "", fg_dark = "#854cc7", fg_light = "#643995"}, - {name = "slvs", text = "󰻫", fg_dark = "#839463", fg_light = "#576342"}, - {name = "sml", text = "λ", fg_dark = "#e37933", fg_light = "#975122"}, - {name = "so", text = "", fg_dark = "#dcddd6", fg_light = "#494a47"}, - {name = "sol", text = "", fg_dark = "#519aba", fg_light = "#36677c"}, - {name = "spec.js", text = "", fg_dark = "#cbcb41", fg_light = "#666620"}, - {name = "spec.jsx", text = "", fg_dark = "#20c2e3", fg_light = "#158197"}, - {name = "spec.ts", text = "", fg_dark = "#519aba", fg_light = "#36677c"}, - {name = "spec.tsx", text = "", fg_dark = "#1354bf", fg_light = "#1354bf"}, - {name = "sql", text = "", fg_dark = "#dad8d8", fg_light = "#494848"}, - {name = "sqlite", text = "", fg_dark = "#dad8d8", fg_light = "#494848"}, - {name = "sqlite3", text = "", fg_dark = "#dad8d8", fg_light = "#494848"}, - {name = "srt", text = "󰨖", fg_dark = "#ffb713", fg_light = "#805c0a"}, - {name = "ssa", text = "󰨖", fg_dark = "#ffb713", fg_light = "#805c0a"}, - {name = "ste", text = "󰻫", fg_dark = "#839463", fg_light = "#576342"}, - {name = "step", text = "󰻫", fg_dark = "#839463", fg_light = "#576342"}, - {name = "stl", text = "󰆧", fg_dark = "#888888", fg_light = "#5b5b5b"}, - {name = "stp", text = "󰻫", fg_dark = "#839463", fg_light = "#576342"}, - {name = "strings", text = "", fg_dark = "#2596be", fg_light = "#1c708e"}, - {name = "styl", text = "", fg_dark = "#8dc149", fg_light = "#466024"}, - {name = "sub", text = "󰨖", fg_dark = "#ffb713", fg_light = "#805c0a"}, - {name = "sublime", text = "", fg_dark = "#e37933", fg_light = "#975122"}, - {name = "suo", text = "", fg_dark = "#854cc7", fg_light = "#643995"}, - {name = "sv", text = "󰍛", fg_dark = "#019833", fg_light = "#017226"}, - {name = "svelte", text = "", fg_dark = "#ff3e00", fg_light = "#bf2e00"}, - {name = "svg", text = "󰜡", fg_dark = "#ffb13b", fg_light = "#80581e"}, - {name = "svh", text = "󰍛", fg_dark = "#019833", fg_light = "#017226"}, - {name = "swift", text = "", fg_dark = "#e37933", fg_light = "#975122"}, - {name = "t", text = "", fg_dark = "#519aba", fg_light = "#36677c"}, - {name = "tbc", text = "󰛓", fg_dark = "#1e5cb3", fg_light = "#1e5cb3"}, - {name = "tcl", text = "󰛓", fg_dark = "#1e5cb3", fg_light = "#1e5cb3"}, - {name = "templ", text = "", fg_dark = "#dbbd30", fg_light = "#6e5e18"}, - {name = "terminal", text = "", fg_dark = "#31b53e", fg_light = "#217929"}, - {name = "test.js", text = "", fg_dark = "#cbcb41", fg_light = "#666620"}, - {name = "test.jsx", text = "", fg_dark = "#20c2e3", fg_light = "#158197"}, - {name = "test.ts", text = "", fg_dark = "#519aba", fg_light = "#36677c"}, - {name = "test.tsx", text = "", fg_dark = "#1354bf", fg_light = "#1354bf"}, - {name = "tex", text = "", fg_dark = "#3d6117", fg_light = "#3d6117"}, - {name = "tf", text = "", fg_dark = "#5f43e9", fg_light = "#4732af"}, - {name = "tfvars", text = "", fg_dark = "#5f43e9", fg_light = "#4732af"}, - {name = "tgz", text = "", fg_dark = "#eca517", fg_light = "#76520c"}, - {name = "tmux", text = "", fg_dark = "#14ba19", fg_light = "#0f8c13"}, - {name = "toml", text = "", fg_dark = "#9c4221", fg_light = "#753219"}, - {name = "torrent", text = "", fg_dark = "#44cda8", fg_light = "#226654"}, - {name = "tres", text = "", fg_dark = "#6d8086", fg_light = "#526064"}, - {name = "ts", text = "", fg_dark = "#519aba", fg_light = "#36677c"}, - {name = "tscn", text = "", fg_dark = "#6d8086", fg_light = "#526064"}, - {name = "tsconfig", text = "", fg_dark = "#ff8700", fg_light = "#aa5a00"}, - {name = "tsx", text = "", fg_dark = "#1354bf", fg_light = "#1354bf"}, - {name = "ttf", text = "", fg_dark = "#ececec", fg_light = "#2f2f2f"}, - {name = "twig", text = "", fg_dark = "#8dc149", fg_light = "#466024"}, - {name = "txt", text = "", fg_dark = "#89e051", fg_light = "#447028"}, - {name = "txz", text = "", fg_dark = "#eca517", fg_light = "#76520c"}, - {name = "typoscript", text = "", fg_dark = "#ff8700", fg_light = "#aa5a00"}, - {name = "ui", text = "", fg_dark = "#0c306e", fg_light = "#0c306e"}, - {name = "v", text = "󰍛", fg_dark = "#019833", fg_light = "#017226"}, - {name = "vala", text = "", fg_dark = "#7239b3", fg_light = "#562b86"}, - {name = "vh", text = "󰍛", fg_dark = "#019833", fg_light = "#017226"}, - {name = "vhd", text = "󰍛", fg_dark = "#019833", fg_light = "#017226"}, - {name = "vhdl", text = "󰍛", fg_dark = "#019833", fg_light = "#017226"}, - {name = "vim", text = "", fg_dark = "#019833", fg_light = "#017226"}, - {name = "vsh", text = "", fg_dark = "#5d87bf", fg_light = "#3e5a7f"}, - {name = "vsix", text = "", fg_dark = "#854cc7", fg_light = "#643995"}, - {name = "vue", text = "", fg_dark = "#8dc149", fg_light = "#466024"}, - {name = "wasm", text = "", fg_dark = "#5c4cdb", fg_light = "#4539a4"}, - {name = "wav", text = "", fg_dark = "#00afff", fg_light = "#0075aa"}, - {name = "webm", text = "", fg_dark = "#fd971f", fg_light = "#7e4c10"}, - {name = "webmanifest", text = "", fg_dark = "#f1e05a", fg_light = "#504b1e"}, - {name = "webp", text = "", fg_dark = "#a074c4", fg_light = "#6b4d83"}, - {name = "webpack", text = "󰜫", fg_dark = "#519aba", fg_light = "#36677c"}, - {name = "wma", text = "", fg_dark = "#00afff", fg_light = "#0075aa"}, - {name = "woff", text = "", fg_dark = "#ececec", fg_light = "#2f2f2f"}, - {name = "woff2", text = "", fg_dark = "#ececec", fg_light = "#2f2f2f"}, - {name = "wrl", text = "󰆧", fg_dark = "#888888", fg_light = "#5b5b5b"}, - {name = "wrz", text = "󰆧", fg_dark = "#888888", fg_light = "#5b5b5b"}, - {name = "x", text = "", fg_dark = "#599eff", fg_light = "#3b69aa"}, - {name = "xaml", text = "󰙳", fg_dark = "#512bd4", fg_light = "#512bd4"}, - {name = "xcf", text = "", fg_dark = "#635b46", fg_light = "#4a4434"}, - {name = "xcplayground", text = "", fg_dark = "#e37933", fg_light = "#975122"}, - {name = "xcstrings", text = "", fg_dark = "#2596be", fg_light = "#1c708e"}, - {name = "xls", text = "󰈛", fg_dark = "#207245", fg_light = "#207245"}, - {name = "xlsx", text = "󰈛", fg_dark = "#207245", fg_light = "#207245"}, - {name = "xm", text = "", fg_dark = "#519aba", fg_light = "#36677c"}, - {name = "xml", text = "󰗀", fg_dark = "#e37933", fg_light = "#975122"}, - {name = "xpi", text = "", fg_dark = "#ff1b01", fg_light = "#bf1401"}, - {name = "xul", text = "", fg_dark = "#e37933", fg_light = "#975122"}, - {name = "xz", text = "", fg_dark = "#eca517", fg_light = "#76520c"}, - {name = "yaml", text = "", fg_dark = "#6d8086", fg_light = "#526064"}, - {name = "yml", text = "", fg_dark = "#6d8086", fg_light = "#526064"}, - {name = "zig", text = "", fg_dark = "#f69a1b", fg_light = "#7b4d0e"}, - {name = "zip", text = "", fg_dark = "#eca517", fg_light = "#76520c"}, - {name = "zsh", text = "", fg_dark = "#89e051", fg_light = "#447028"}, - {name = "zst", text = "", fg_dark = "#eca517", fg_light = "#76520c"}, + {name = "3gp", text = "", fg = "#f6c177"}, + {name = "3mf", text = "󰆧", fg = "#21202e"}, + {name = "7z", text = "", fg = "#f6c177"}, + {name = "a", text = "", fg = "#e0def4"}, + {name = "aac", text = "", fg = "#31748f"}, + {name = "adb", text = "", fg = "#31748f"}, + {name = "ads", text = "", fg = "#e0def4"}, + {name = "ai", text = "", fg = "#f6c177"}, + {name = "aif", text = "", fg = "#31748f"}, + {name = "aiff", text = "", fg = "#31748f"}, + {name = "android", text = "", fg = "#f6c177"}, + {name = "ape", text = "", fg = "#31748f"}, + {name = "apk", text = "", fg = "#f6c177"}, + {name = "apl", text = "", fg = "#f6c177"}, + {name = "app", text = "", fg = "#eb6f92"}, + {name = "applescript", text = "", fg = "#e0def4"}, + {name = "asc", text = "󰦝", fg = "#524f67"}, + {name = "asm", text = "", fg = "#31748f"}, + {name = "ass", text = "󰨖", fg = "#f6c177"}, + {name = "astro", text = "", fg = "#eb6f92"}, + {name = "avif", text = "", fg = "#c4a7e7"}, + {name = "awk", text = "", fg = "#21202e"}, + {name = "azcli", text = "", fg = "#31748f"}, + {name = "bak", text = "󰁯", fg = "#e0def4"}, + {name = "bash", text = "", fg = "#f6c177"}, + {name = "bat", text = "", fg = "#f6c177"}, + {name = "bazel", text = "", fg = "#f6c177"}, + {name = "bib", text = "󱉟", fg = "#f6c177"}, + {name = "bicep", text = "", fg = "#31748f"}, + {name = "bicepparam", text = "", fg = "#c4a7e7"}, + {name = "bin", text = "", fg = "#eb6f92"}, + {name = "blade.php", text = "", fg = "#eb6f92"}, + {name = "blend", text = "󰂫", fg = "#f6c177"}, + {name = "blp", text = "󰺾", fg = "#31748f"}, + {name = "bmp", text = "", fg = "#c4a7e7"}, + {name = "bqn", text = "", fg = "#f6c177"}, + {name = "brep", text = "󰻫", fg = "#9ccfd8"}, + {name = "bz", text = "", fg = "#f6c177"}, + {name = "bz2", text = "", fg = "#f6c177"}, + {name = "bz3", text = "", fg = "#f6c177"}, + {name = "bzl", text = "", fg = "#f6c177"}, + {name = "c", text = "", fg = "#31748f"}, + {name = "c++", text = "", fg = "#eb6f92"}, + {name = "cache", text = "", fg = "#e0def4"}, + {name = "cast", text = "", fg = "#f6c177"}, + {name = "cbl", text = "", fg = "#31748f"}, + {name = "cc", text = "", fg = "#eb6f92"}, + {name = "ccm", text = "", fg = "#eb6f92"}, + {name = "cfg", text = "", fg = "#e0def4"}, + {name = "cjs", text = "", fg = "#f6c177"}, + {name = "clj", text = "", fg = "#f6c177"}, + {name = "cljc", text = "", fg = "#f6c177"}, + {name = "cljd", text = "", fg = "#31748f"}, + {name = "cljs", text = "", fg = "#31748f"}, + {name = "cmake", text = "", fg = "#e0def4"}, + {name = "cob", text = "", fg = "#31748f"}, + {name = "cobol", text = "", fg = "#31748f"}, + {name = "coffee", text = "", fg = "#f6c177"}, + {name = "conda", text = "", fg = "#f6c177"}, + {name = "conf", text = "", fg = "#e0def4"}, + {name = "config.ru", text = "", fg = "#eb6f92"}, + {name = "cow", text = "󰆚", fg = "#f6c177"}, + {name = "cp", text = "", fg = "#31748f"}, + {name = "cpp", text = "", fg = "#31748f"}, + {name = "cppm", text = "", fg = "#31748f"}, + {name = "cpy", text = "", fg = "#31748f"}, + {name = "cr", text = "", fg = "#e0def4"}, + {name = "crdownload", text = "", fg = "#f6c177"}, + {name = "cs", text = "󰌛", fg = "#f6c177"}, + {name = "csh", text = "", fg = "#21202e"}, + {name = "cshtml", text = "󱦗", fg = "#31748f"}, + {name = "cson", text = "", fg = "#f6c177"}, + {name = "csproj", text = "󰪮", fg = "#31748f"}, + {name = "css", text = "", fg = "#31748f"}, + {name = "csv", text = "", fg = "#f6c177"}, + {name = "cts", text = "", fg = "#31748f"}, + {name = "cu", text = "", fg = "#f6c177"}, + {name = "cue", text = "󰲹", fg = "#c4a7e7"}, + {name = "cuh", text = "", fg = "#c4a7e7"}, + {name = "cxx", text = "", fg = "#31748f"}, + {name = "cxxm", text = "", fg = "#31748f"}, + {name = "d", text = "", fg = "#eb6f92"}, + {name = "d.ts", text = "", fg = "#f6c177"}, + {name = "dart", text = "", fg = "#31748f"}, + {name = "db", text = "", fg = "#e0def4"}, + {name = "dconf", text = "", fg = "#e0def4"}, + {name = "desktop", text = "", fg = "#31748f"}, + {name = "diff", text = "", fg = "#21202e"}, + {name = "dll", text = "", fg = "#26233a"}, + {name = "doc", text = "󰈬", fg = "#31748f"}, + {name = "Dockerfile", text = "󰡨", fg = "#31748f"}, + {name = "docx", text = "󰈬", fg = "#31748f"}, + {name = "dot", text = "󱁉", fg = "#31748f"}, + {name = "download", text = "", fg = "#f6c177"}, + {name = "drl", text = "", fg = "#ebbcba"}, + {name = "dropbox", text = "", fg = "#31748f"}, + {name = "dump", text = "", fg = "#e0def4"}, + {name = "dwg", text = "󰻫", fg = "#9ccfd8"}, + {name = "dxf", text = "󰻫", fg = "#9ccfd8"}, + {name = "ebook", text = "", fg = "#f6c177"}, + {name = "ebuild", text = "", fg = "#31748f"}, + {name = "edn", text = "", fg = "#31748f"}, + {name = "eex", text = "", fg = "#c4a7e7"}, + {name = "ejs", text = "", fg = "#f6c177"}, + {name = "el", text = "", fg = "#c4a7e7"}, + {name = "elc", text = "", fg = "#c4a7e7"}, + {name = "elf", text = "", fg = "#eb6f92"}, + {name = "elm", text = "", fg = "#31748f"}, + {name = "eln", text = "", fg = "#c4a7e7"}, + {name = "env", text = "", fg = "#f6c177"}, + {name = "eot", text = "", fg = "#e0def4"}, + {name = "epp", text = "", fg = "#f6c177"}, + {name = "epub", text = "", fg = "#f6c177"}, + {name = "erb", text = "", fg = "#eb6f92"}, + {name = "erl", text = "", fg = "#eb6f92"}, + {name = "ex", text = "", fg = "#c4a7e7"}, + {name = "exe", text = "", fg = "#eb6f92"}, + {name = "exs", text = "", fg = "#c4a7e7"}, + {name = "f#", text = "", fg = "#31748f"}, + {name = "f3d", text = "󰻫", fg = "#9ccfd8"}, + {name = "f90", text = "󱈚", fg = "#31748f"}, + {name = "fbx", text = "󰆧", fg = "#21202e"}, + {name = "fcbak", text = "", fg = "#eb6f92"}, + {name = "fcmacro", text = "", fg = "#eb6f92"}, + {name = "fcmat", text = "", fg = "#eb6f92"}, + {name = "fcparam", text = "", fg = "#eb6f92"}, + {name = "fcscript", text = "", fg = "#eb6f92"}, + {name = "fcstd", text = "", fg = "#eb6f92"}, + {name = "fcstd1", text = "", fg = "#eb6f92"}, + {name = "fctb", text = "", fg = "#eb6f92"}, + {name = "fctl", text = "", fg = "#eb6f92"}, + {name = "fdmdownload", text = "", fg = "#f6c177"}, + {name = "feature", text = "", fg = "#f6c177"}, + {name = "fish", text = "", fg = "#21202e"}, + {name = "flac", text = "", fg = "#31748f"}, + {name = "flc", text = "", fg = "#e0def4"}, + {name = "flf", text = "", fg = "#e0def4"}, + {name = "fnl", text = "", fg = "#e0def4"}, + {name = "fodg", text = "", fg = "#f6c177"}, + {name = "fodp", text = "", fg = "#f6c177"}, + {name = "fods", text = "", fg = "#f6c177"}, + {name = "fodt", text = "", fg = "#31748f"}, + {name = "fs", text = "", fg = "#31748f"}, + {name = "fsi", text = "", fg = "#31748f"}, + {name = "fsscript", text = "", fg = "#31748f"}, + {name = "fsx", text = "", fg = "#31748f"}, + {name = "gcode", text = "󰐫", fg = "#31748f"}, + {name = "gd", text = "", fg = "#21202e"}, + {name = "gemspec", text = "", fg = "#eb6f92"}, + {name = "gif", text = "", fg = "#c4a7e7"}, + {name = "git", text = "", fg = "#eb6f92"}, + {name = "glb", text = "", fg = "#f6c177"}, + {name = "gleam", text = "", fg = "#c4a7e7"}, + {name = "gnumakefile", text = "", fg = "#21202e"}, + {name = "go", text = "", fg = "#31748f"}, + {name = "godot", text = "", fg = "#21202e"}, + {name = "gpr", text = "", fg = "#eb6f92"}, + {name = "gql", text = "", fg = "#eb6f92"}, + {name = "gradle", text = "", fg = "#31748f"}, + {name = "graphql", text = "", fg = "#eb6f92"}, + {name = "gresource", text = "", fg = "#e0def4"}, + {name = "gv", text = "󱁉", fg = "#31748f"}, + {name = "gz", text = "", fg = "#f6c177"}, + {name = "h", text = "", fg = "#c4a7e7"}, + {name = "haml", text = "", fg = "#e0def4"}, + {name = "hbs", text = "", fg = "#f6c177"}, + {name = "heex", text = "", fg = "#c4a7e7"}, + {name = "hex", text = "", fg = "#eb6f92"}, + {name = "hh", text = "", fg = "#c4a7e7"}, + {name = "hpp", text = "", fg = "#c4a7e7"}, + {name = "hrl", text = "", fg = "#eb6f92"}, + {name = "hs", text = "", fg = "#c4a7e7"}, + {name = "htm", text = "", fg = "#eb6f92"}, + {name = "html", text = "", fg = "#eb6f92"}, + {name = "http", text = "", fg = "#31748f"}, + {name = "huff", text = "󰡘", fg = "#31748f"}, + {name = "hurl", text = "", fg = "#eb6f92"}, + {name = "hx", text = "", fg = "#f6c177"}, + {name = "hxx", text = "", fg = "#c4a7e7"}, + {name = "ical", text = "", fg = "#31748f"}, + {name = "icalendar", text = "", fg = "#31748f"}, + {name = "ico", text = "", fg = "#f6c177"}, + {name = "ics", text = "", fg = "#31748f"}, + {name = "ifb", text = "", fg = "#31748f"}, + {name = "ifc", text = "󰻫", fg = "#9ccfd8"}, + {name = "ige", text = "󰻫", fg = "#9ccfd8"}, + {name = "iges", text = "󰻫", fg = "#9ccfd8"}, + {name = "igs", text = "󰻫", fg = "#9ccfd8"}, + {name = "image", text = "", fg = "#e0def4"}, + {name = "img", text = "", fg = "#e0def4"}, + {name = "import", text = "", fg = "#e0def4"}, + {name = "info", text = "", fg = "#9ccfd8"}, + {name = "ini", text = "", fg = "#21202e"}, + {name = "ino", text = "", fg = "#31748f"}, + {name = "ipynb", text = "", fg = "#f6c177"}, + {name = "iso", text = "", fg = "#e0def4"}, + {name = "ixx", text = "", fg = "#31748f"}, + {name = "java", text = "", fg = "#eb6f92"}, + {name = "jl", text = "", fg = "#c4a7e7"}, + {name = "jpeg", text = "", fg = "#c4a7e7"}, + {name = "jpg", text = "", fg = "#c4a7e7"}, + {name = "js", text = "", fg = "#f6c177"}, + {name = "json", text = "", fg = "#f6c177"}, + {name = "json5", text = "", fg = "#f6c177"}, + {name = "jsonc", text = "", fg = "#f6c177"}, + {name = "jsx", text = "", fg = "#31748f"}, + {name = "jwmrc", text = "", fg = "#31748f"}, + {name = "jxl", text = "", fg = "#c4a7e7"}, + {name = "kbx", text = "󰯄", fg = "#21202e"}, + {name = "kdb", text = "", fg = "#f6c177"}, + {name = "kdbx", text = "", fg = "#f6c177"}, + {name = "kdenlive", text = "", fg = "#31748f"}, + {name = "kdenlivetitle", text = "", fg = "#31748f"}, + {name = "kicad_dru", text = "", fg = "#e0def4"}, + {name = "kicad_mod", text = "", fg = "#e0def4"}, + {name = "kicad_pcb", text = "", fg = "#e0def4"}, + {name = "kicad_prl", text = "", fg = "#e0def4"}, + {name = "kicad_pro", text = "", fg = "#e0def4"}, + {name = "kicad_sch", text = "", fg = "#e0def4"}, + {name = "kicad_sym", text = "", fg = "#e0def4"}, + {name = "kicad_wks", text = "", fg = "#e0def4"}, + {name = "ko", text = "", fg = "#e0def4"}, + {name = "kpp", text = "", fg = "#eb6f92"}, + {name = "kra", text = "", fg = "#eb6f92"}, + {name = "krz", text = "", fg = "#eb6f92"}, + {name = "ksh", text = "", fg = "#21202e"}, + {name = "kt", text = "", fg = "#31748f"}, + {name = "kts", text = "", fg = "#31748f"}, + {name = "lck", text = "", fg = "#e0def4"}, + {name = "leex", text = "", fg = "#c4a7e7"}, + {name = "less", text = "", fg = "#31748f"}, + {name = "lff", text = "", fg = "#e0def4"}, + {name = "lhs", text = "", fg = "#c4a7e7"}, + {name = "lib", text = "", fg = "#ebbcba"}, + {name = "license", text = "", fg = "#f6c177"}, + {name = "liquid", text = "", fg = "#f6c177"}, + {name = "lock", text = "", fg = "#e0def4"}, + {name = "log", text = "󰌱", fg = "#e0def4"}, + {name = "lrc", text = "󰨖", fg = "#f6c177"}, + {name = "lua", text = "", fg = "#31748f"}, + {name = "luac", text = "", fg = "#31748f"}, + {name = "luau", text = "", fg = "#31748f"}, + {name = "m", text = "", fg = "#31748f"}, + {name = "m3u", text = "󰲹", fg = "#c4a7e7"}, + {name = "m3u8", text = "󰲹", fg = "#c4a7e7"}, + {name = "m4a", text = "", fg = "#31748f"}, + {name = "m4v", text = "", fg = "#f6c177"}, + {name = "magnet", text = "", fg = "#eb6f92"}, + {name = "makefile", text = "", fg = "#21202e"}, + {name = "markdown", text = "", fg = "#e0def4"}, + {name = "material", text = "", fg = "#eb6f92"}, + {name = "md", text = "", fg = "#e0def4"}, + {name = "md5", text = "󰕥", fg = "#908caa"}, + {name = "mdx", text = "", fg = "#31748f"}, + {name = "mint", text = "󰌪", fg = "#9ccfd8"}, + {name = "mjs", text = "", fg = "#f6c177"}, + {name = "mk", text = "", fg = "#21202e"}, + {name = "mkv", text = "", fg = "#f6c177"}, + {name = "ml", text = "", fg = "#f6c177"}, + {name = "mli", text = "", fg = "#f6c177"}, + {name = "mm", text = "", fg = "#31748f"}, + {name = "mo", text = "", fg = "#eb6f92"}, + {name = "mobi", text = "", fg = "#f6c177"}, + {name = "mojo", text = "", fg = "#eb6f92"}, + {name = "mov", text = "", fg = "#f6c177"}, + {name = "mp3", text = "", fg = "#31748f"}, + {name = "mp4", text = "", fg = "#f6c177"}, + {name = "mpp", text = "", fg = "#31748f"}, + {name = "msf", text = "", fg = "#31748f"}, + {name = "mts", text = "", fg = "#31748f"}, + {name = "mustache", text = "", fg = "#f6c177"}, + {name = "nfo", text = "", fg = "#9ccfd8"}, + {name = "nim", text = "", fg = "#f6c177"}, + {name = "nix", text = "", fg = "#31748f"}, + {name = "norg", text = "", fg = "#31748f"}, + {name = "nswag", text = "", fg = "#f6c177"}, + {name = "nu", text = "", fg = "#f6c177"}, + {name = "o", text = "", fg = "#eb6f92"}, + {name = "obj", text = "󰆧", fg = "#21202e"}, + {name = "odf", text = "", fg = "#eb6f92"}, + {name = "odg", text = "", fg = "#f6c177"}, + {name = "odin", text = "󰟢", fg = "#31748f"}, + {name = "odp", text = "", fg = "#f6c177"}, + {name = "ods", text = "", fg = "#f6c177"}, + {name = "odt", text = "", fg = "#31748f"}, + {name = "oga", text = "", fg = "#31748f"}, + {name = "ogg", text = "", fg = "#31748f"}, + {name = "ogv", text = "", fg = "#f6c177"}, + {name = "ogx", text = "", fg = "#f6c177"}, + {name = "opus", text = "", fg = "#31748f"}, + {name = "org", text = "", fg = "#9ccfd8"}, + {name = "otf", text = "", fg = "#e0def4"}, + {name = "out", text = "", fg = "#eb6f92"}, + {name = "part", text = "", fg = "#f6c177"}, + {name = "patch", text = "", fg = "#21202e"}, + {name = "pck", text = "", fg = "#21202e"}, + {name = "pcm", text = "", fg = "#31748f"}, + {name = "pdf", text = "", fg = "#eb6f92"}, + {name = "php", text = "", fg = "#c4a7e7"}, + {name = "pl", text = "", fg = "#31748f"}, + {name = "pls", text = "󰲹", fg = "#c4a7e7"}, + {name = "ply", text = "󰆧", fg = "#21202e"}, + {name = "pm", text = "", fg = "#31748f"}, + {name = "png", text = "", fg = "#c4a7e7"}, + {name = "po", text = "", fg = "#31748f"}, + {name = "pot", text = "", fg = "#31748f"}, + {name = "pp", text = "", fg = "#f6c177"}, + {name = "ppt", text = "󰈧", fg = "#eb6f92"}, + {name = "pptx", text = "󰈧", fg = "#eb6f92"}, + {name = "prisma", text = "", fg = "#eb6f92"}, + {name = "pro", text = "", fg = "#f6c177"}, + {name = "ps1", text = "󰨊", fg = "#31748f"}, + {name = "psb", text = "", fg = "#31748f"}, + {name = "psd", text = "", fg = "#31748f"}, + {name = "psd1", text = "󰨊", fg = "#c4a7e7"}, + {name = "psm1", text = "󰨊", fg = "#c4a7e7"}, + {name = "pub", text = "󰷖", fg = "#f6c177"}, + {name = "pxd", text = "", fg = "#31748f"}, + {name = "pxi", text = "", fg = "#31748f"}, + {name = "py", text = "", fg = "#f6c177"}, + {name = "pyc", text = "", fg = "#f6c177"}, + {name = "pyd", text = "", fg = "#f6c177"}, + {name = "pyi", text = "", fg = "#f6c177"}, + {name = "pyo", text = "", fg = "#f6c177"}, + {name = "pyw", text = "", fg = "#31748f"}, + {name = "pyx", text = "", fg = "#31748f"}, + {name = "qm", text = "", fg = "#31748f"}, + {name = "qml", text = "", fg = "#f6c177"}, + {name = "qrc", text = "", fg = "#f6c177"}, + {name = "qss", text = "", fg = "#f6c177"}, + {name = "query", text = "", fg = "#f6c177"}, + {name = "r", text = "󰟔", fg = "#31748f"}, + {name = "R", text = "󰟔", fg = "#31748f"}, + {name = "rake", text = "", fg = "#eb6f92"}, + {name = "rar", text = "", fg = "#f6c177"}, + {name = "razor", text = "󱦘", fg = "#31748f"}, + {name = "rb", text = "", fg = "#eb6f92"}, + {name = "res", text = "", fg = "#eb6f92"}, + {name = "resi", text = "", fg = "#eb6f92"}, + {name = "rlib", text = "", fg = "#ebbcba"}, + {name = "rmd", text = "", fg = "#31748f"}, + {name = "rproj", text = "󰗆", fg = "#f6c177"}, + {name = "rs", text = "", fg = "#ebbcba"}, + {name = "rss", text = "", fg = "#f6c177"}, + {name = "s", text = "", fg = "#31748f"}, + {name = "sass", text = "", fg = "#eb6f92"}, + {name = "sbt", text = "", fg = "#eb6f92"}, + {name = "sc", text = "", fg = "#eb6f92"}, + {name = "scad", text = "", fg = "#f6c177"}, + {name = "scala", text = "", fg = "#eb6f92"}, + {name = "scm", text = "󰘧", fg = "#e0def4"}, + {name = "scss", text = "", fg = "#eb6f92"}, + {name = "sh", text = "", fg = "#21202e"}, + {name = "sha1", text = "󰕥", fg = "#908caa"}, + {name = "sha224", text = "󰕥", fg = "#908caa"}, + {name = "sha256", text = "󰕥", fg = "#908caa"}, + {name = "sha384", text = "󰕥", fg = "#908caa"}, + {name = "sha512", text = "󰕥", fg = "#908caa"}, + {name = "sig", text = "󰘧", fg = "#f6c177"}, + {name = "signature", text = "󰘧", fg = "#f6c177"}, + {name = "skp", text = "󰻫", fg = "#9ccfd8"}, + {name = "sldasm", text = "󰻫", fg = "#9ccfd8"}, + {name = "sldprt", text = "󰻫", fg = "#9ccfd8"}, + {name = "slim", text = "", fg = "#eb6f92"}, + {name = "sln", text = "", fg = "#31748f"}, + {name = "slnx", text = "", fg = "#31748f"}, + {name = "slvs", text = "󰻫", fg = "#9ccfd8"}, + {name = "sml", text = "󰘧", fg = "#f6c177"}, + {name = "so", text = "", fg = "#e0def4"}, + {name = "sol", text = "", fg = "#31748f"}, + {name = "spec.js", text = "", fg = "#f6c177"}, + {name = "spec.jsx", text = "", fg = "#31748f"}, + {name = "spec.ts", text = "", fg = "#31748f"}, + {name = "spec.tsx", text = "", fg = "#31748f"}, + {name = "spx", text = "", fg = "#31748f"}, + {name = "sql", text = "", fg = "#e0def4"}, + {name = "sqlite", text = "", fg = "#e0def4"}, + {name = "sqlite3", text = "", fg = "#e0def4"}, + {name = "srt", text = "󰨖", fg = "#f6c177"}, + {name = "ssa", text = "󰨖", fg = "#f6c177"}, + {name = "ste", text = "󰻫", fg = "#9ccfd8"}, + {name = "step", text = "󰻫", fg = "#9ccfd8"}, + {name = "stl", text = "󰆧", fg = "#21202e"}, + {name = "stp", text = "󰻫", fg = "#9ccfd8"}, + {name = "strings", text = "", fg = "#31748f"}, + {name = "styl", text = "", fg = "#f6c177"}, + {name = "sub", text = "󰨖", fg = "#f6c177"}, + {name = "sublime", text = "", fg = "#f6c177"}, + {name = "suo", text = "", fg = "#31748f"}, + {name = "sv", text = "󰍛", fg = "#f6c177"}, + {name = "svelte", text = "", fg = "#eb6f92"}, + {name = "svg", text = "󰜡", fg = "#f6c177"}, + {name = "svh", text = "󰍛", fg = "#f6c177"}, + {name = "swift", text = "", fg = "#f6c177"}, + {name = "t", text = "", fg = "#31748f"}, + {name = "tbc", text = "󰛓", fg = "#31748f"}, + {name = "tcl", text = "󰛓", fg = "#31748f"}, + {name = "templ", text = "", fg = "#f6c177"}, + {name = "terminal", text = "", fg = "#f6c177"}, + {name = "test.js", text = "", fg = "#f6c177"}, + {name = "test.jsx", text = "", fg = "#31748f"}, + {name = "test.ts", text = "", fg = "#31748f"}, + {name = "test.tsx", text = "", fg = "#31748f"}, + {name = "tex", text = "", fg = "#f6c177"}, + {name = "tf", text = "", fg = "#31748f"}, + {name = "tfvars", text = "", fg = "#31748f"}, + {name = "tgz", text = "", fg = "#f6c177"}, + {name = "tmux", text = "", fg = "#f6c177"}, + {name = "toml", text = "", fg = "#eb6f92"}, + {name = "torrent", text = "", fg = "#f6c177"}, + {name = "tres", text = "", fg = "#21202e"}, + {name = "ts", text = "", fg = "#31748f"}, + {name = "tscn", text = "", fg = "#21202e"}, + {name = "tsconfig", text = "", fg = "#f6c177"}, + {name = "tsx", text = "", fg = "#31748f"}, + {name = "ttf", text = "", fg = "#e0def4"}, + {name = "twig", text = "", fg = "#f6c177"}, + {name = "txt", text = "󰈙", fg = "#f6c177"}, + {name = "txz", text = "", fg = "#f6c177"}, + {name = "typ", text = "", fg = "#31748f"}, + {name = "typoscript", text = "", fg = "#f6c177"}, + {name = "ui", text = "", fg = "#eb6f92"}, + {name = "v", text = "󰍛", fg = "#f6c177"}, + {name = "vala", text = "", fg = "#31748f"}, + {name = "vh", text = "󰍛", fg = "#f6c177"}, + {name = "vhd", text = "󰍛", fg = "#f6c177"}, + {name = "vhdl", text = "󰍛", fg = "#f6c177"}, + {name = "vi", text = "", fg = "#f6c177"}, + {name = "vim", text = "", fg = "#f6c177"}, + {name = "vsh", text = "", fg = "#31748f"}, + {name = "vsix", text = "", fg = "#31748f"}, + {name = "vue", text = "", fg = "#f6c177"}, + {name = "wasm", text = "", fg = "#eb6f92"}, + {name = "wav", text = "", fg = "#31748f"}, + {name = "webm", text = "", fg = "#f6c177"}, + {name = "webmanifest", text = "", fg = "#f6c177"}, + {name = "webp", text = "", fg = "#c4a7e7"}, + {name = "webpack", text = "󰜫", fg = "#31748f"}, + {name = "wma", text = "", fg = "#31748f"}, + {name = "woff", text = "", fg = "#e0def4"}, + {name = "woff2", text = "", fg = "#e0def4"}, + {name = "wrl", text = "󰆧", fg = "#21202e"}, + {name = "wrz", text = "󰆧", fg = "#21202e"}, + {name = "wv", text = "", fg = "#31748f"}, + {name = "wvc", text = "", fg = "#31748f"}, + {name = "x", text = "", fg = "#31748f"}, + {name = "xaml", text = "󰙳", fg = "#31748f"}, + {name = "xcf", text = "", fg = "#21202e"}, + {name = "xcplayground", text = "", fg = "#f6c177"}, + {name = "xcstrings", text = "", fg = "#31748f"}, + {name = "xls", text = "󰈛", fg = "#f6c177"}, + {name = "xlsx", text = "󰈛", fg = "#f6c177"}, + {name = "xm", text = "", fg = "#31748f"}, + {name = "xml", text = "󰗀", fg = "#f6c177"}, + {name = "xpi", text = "", fg = "#eb6f92"}, + {name = "xul", text = "", fg = "#f6c177"}, + {name = "xz", text = "", fg = "#f6c177"}, + {name = "yaml", text = "", fg = "#21202e"}, + {name = "yml", text = "", fg = "#21202e"}, + {name = "zig", text = "", fg = "#f6c177"}, + {name = "zip", text = "", fg = "#f6c177"}, + {name = "zsh", text = "", fg = "#f6c177"}, + {name = "zst", text = "", fg = "#f6c177"}, + {name = "🔥", text = "", fg = "#eb6f92"}, ] conds = [ # Special files @@ -713,4 +698,3 @@ conds = [ {if = "exec", text = ""}, {if = "!dir", text = ""}, ] -# : diff --git a/config/yazi/yazi.toml b/config/yazi/yazi.toml index 2a5eabe0..57c389e6 100644 --- a/config/yazi/yazi.toml +++ b/config/yazi/yazi.toml @@ -56,7 +56,7 @@ play = [ [open] rules = [ # Folder - {name = "*/", use = [ "edit", "open", "reveal" ]}, + {url = "*/", use = [ "edit", "open", "reveal" ]}, # Text {mime = "text/*", use = [ "edit", "reveal" ]}, # Image @@ -71,7 +71,7 @@ rules = [ # Empty file {mime = "inode/empty", use = [ "edit", "reveal" ]}, # Fallback - {name = "*", use = [ "open", "reveal" ]}, + {url = "*", use = [ "open", "reveal" ]}, ] [tasks] @@ -89,14 +89,14 @@ preloaders = [ {mime = "application/pdf", run = "pdf"}, ] previewers = [ - {name = "*/", run = "folder", sync = true}, + {url = "*/", run = "folder", sync = true}, {mime = "text/*", run = "code"}, {mime = "*/{xml,javascript,x-wine-extension-ini}", run = "code"}, {mime = "application/json", run = "code"}, {mime = "image/vnd.djvu", run = "noop"}, {mime = "application/pdf", run = "pdf"}, # Fallback - {name = "*", run = "file"}, + {url = "*", run = "file"}, ] prepend_previewers = [ {mime = "text/csv", run = "miller"}, @@ -104,11 +104,11 @@ prepend_previewers = [ {mime = "{audio,video,image}/*", run = "mediainfo"}, {mime = "application/subrip", run = "mediainfo"}, # rich preview - {name = "*.csv", run = "rich-preview"}, # for csv files - {name = "*.{md,mdx,markdown}", run = "rich-preview"}, # for markdown (.md) files - {name = "*.rst", run = "rich-preview"}, # for restructured text (.rst) files - {name = "*.ipynb", run = "rich-preview"}, # for jupyter notebooks (.ipynb) - {name = "*.json", run = "rich-preview"}, # for json (.json) files + {url = "*.csv", run = "rich-preview"}, # for csv files + {url = "*.{md,mdx,markdown}", run = "rich-preview"}, # for markdown (.md) files + {url = "*.rst", run = "rich-preview"}, # for restructured text (.rst) files + {url = "*.ipynb", run = "rich-preview"}, # for jupyter notebooks (.ipynb) + {url = "*.json", run = "rich-preview"}, # for json (.json) files {mime = "application/bittorrent", run = "torrent-preview"}, # Archive previewer {mime = "application/*zip", run = "ouch"}, @@ -127,16 +127,16 @@ prepend_previewers = [ {mime = "application/oasis.opendocument.*", run = "office"}, {mime = "application/ms-*", run = "office"}, {mime = "application/msword", run = "office"}, - {name = "*.docx", run = "office"}, + {url = "*.docx", run = "office"}, ] append_previewers = [ - {name = "*", run = "hexyl"}, + {url = "*", run = "hexyl"}, ] prepend_fetchers = [ - {id = "git", name = "*", run = "git"}, - {id = "git", name = "*/", run = "git"}, + {id = "git", url = "*", run = "git"}, + {id = "git", url = "*/", run = "git"}, ] [input] diff --git a/config/zsh/completions/_bat.zsh b/config/zsh/completions/_bat.zsh deleted file mode 100644 index 3b3f471e..00000000 --- a/config/zsh/completions/_bat.zsh +++ /dev/null @@ -1,116 +0,0 @@ -#compdef bat - -local curcontext="$curcontext" ret=1 -local -a state state_descr line -typeset -A opt_args - -(( $+functions[_bat_cache_subcommand] )) || -_bat_cache_subcommand() { - local -a args - args=( - '(-b --build -c --clear)'{-b,--build}'[initialize or update the syntax/theme cache]' - '(-b --build -c --clear)'{-c,--clear}'[remove the cached syntax definitions and themes]' - --source='[specify directory to load syntaxes and themes from]:directory:_files -/' - --target='[specify directory to store the cached syntax and theme set in]:directory:_files -/' - --blank'[create completely new syntax and theme sets]' - --acknowledgements'[build acknowledgements.bin]' - '(: -)'{-h,--help}'[show help information]' - ) - - _arguments -S -s $args -} - -(( $+functions[_bat_main] )) || -_bat_main() { - local -a args - args=( - '(-A --show-all)'{-A,--show-all}'[show non-printable characters (space, tab, newline, ..)]' - --nonprintable-notation='[specify how to display non-printable characters when using --show-all]:notation:(caret unicode)' - \*{-p,--plain}'[show plain style (alias for `--style=plain`), repeat twice to disable automatic paging (alias for `--paging=never`)]' - '(-l --language)'{-l+,--language=}'[set the language for syntax highlighting]:language:->languages' - \*{-H+,--highlight-line=}'[highlight specified block of lines]:start\:end' - \*--file-name='[specify the name to display for a file]:name:_files' - '(-d --diff)'--diff'[only show lines that have been added/removed/modified]' - --diff-context='[specify lines of context around added/removed/modified lines when using `--diff`]:lines' - --tabs='[set the tab width]:tab width [4]' - --wrap='[specify the text-wrapping mode]:mode [auto]:(auto never character)' - '!(--wrap)'{-S,--chop-long-lines} - --terminal-width='[explicitly set the width of the terminal instead of determining it automatically]:width' - '(-n --number --diff --diff-context)'{-n,--number}'[show line numbers]' - --color='[specify when to use colors]:when:(auto never always)' - --italic-text='[use italics in output]:when:(always never)' - --decorations='[specify when to show the decorations]:when:(auto never always)' - --paging='[specify when to use the pager]:when:(auto never always)' - '(-m --map-syntax)'{-m+,--map-syntax=}'[map a glob pattern to an existing syntax name]: :->syntax-maps' - '(--theme)'--theme='[set the color theme for syntax highlighting]:theme:->theme_preferences' - '(--theme-dark)'--theme-dark='[set the color theme for syntax highlighting for dark backgrounds]:theme:->themes' - '(--theme-light)'--theme-light='[set the color theme for syntax highlighting for light backgrounds]:theme:->themes' - '(: --list-themes --list-languages -L)'--list-themes'[show all supported highlighting themes]' - --style='[comma-separated list of style elements to display]: : _values "style [default]" - default auto full plain changes header header-filename header-filesize grid rule numbers snip' - \*{-r+,--line-range=}'[only print the specified line range]:start\:end' - '(* -)'{-L,--list-languages}'[display all supported languages]' - -P'[disable paging]' - "--no-config[don't use the configuration file]" - "--no-custom-assets[don't load custom assets]" - '(--no-lessopen)'--lessopen'[enable the $LESSOPEN preprocessor]' - '(--lessopen)'--no-lessopen'[disable the $LESSOPEN preprocessor if enabled (overrides --lessopen)]' - '(* -)'--config-dir"[show bat's configuration directory]" - '(* -)'--config-file'[show path to the configuration file]' - '(* -)'--generate-config-file'[generate a default configuration file]' - '(* -)'--cache-dir"[show bat's cache directory]" - '(* -)'{-h,--help}'[show help information]' - '(* -)'{-V,--version}'[show version information]' - '*: :{ _files || compadd cache }' - ) - - _arguments -S -s $args && ret=0 - - case "$state" in - syntax-maps) - if ! compset -P '*:'; then - _message -e patterns 'glob pattern:language' - return - fi - ;& # fall-through - - languages) - local IFS=$'\n' - local -a languages - languages=( $(bat --list-languages | awk -F':|,' '{ for (i = 1; i <= NF; ++i) printf("%s:%s\n", $i, $1) }') ) - - _describe 'language' languages && ret=0 - ;; - - themes) - local -a themes expl - themes=(${(f)"$(_call_program themes bat --list-themes)"} ) - - _wanted themes expl 'theme' compadd -a themes && ret=0 - ;; - theme_preferences) - local -a themes expl - themes=(auto dark light auto:always auto:system ${(f)"$(_call_program themes bat --list-themes)"} ) - - _wanted themes expl 'theme' compadd -a themes && ret=0 - ;; - esac - - return ret -} - -case $words[2] in - cache) - ## Completion of the 'cache' command itself is removed for better UX - ## See https://github.com/sharkdp/bat/issues/2085#issuecomment-1271646802 - shift words - (( CURRENT-- )) - curcontext="${curcontext%:*}-${words[1]}:" - _bat_cache_subcommand - ;; - - *) - _bat_main - ;; -esac - diff --git a/config/zsh/completions/_deno.zsh b/config/zsh/completions/_deno.zsh deleted file mode 100644 index 805dcf56..00000000 --- a/config/zsh/completions/_deno.zsh +++ /dev/null @@ -1,2343 +0,0 @@ -#compdef deno - -autoload -U is-at-least - -_deno() { - typeset -A opt_args - typeset -a _arguments_options - local ret=1 - - if is-at-least 5.2; then - _arguments_options=(-s -S -C) - else - _arguments_options=(-s -C) - fi - - local context curcontext="$curcontext" state line - _arguments "${_arguments_options[@]}" : \ -'--no-check=[Skip type-checking. If the value of "remote" is supplied, diagnostic errors from remote modules will be ignored]' \ -'--import-map=[Load import map file from local file or remote URL Docs\: https\://docs.deno.com/runtime/manual/basics/import_maps]:FILE:_files' \ -'--node-modules-dir=[Sets the node modules management mode for npm packages]' \ -'--vendor=[Toggles local vendor folder usage for remote modules and a node_modules folder for npm packages]' \ -'-c+[Configure different aspects of deno including TypeScript, linting, and code formatting Typically the configuration file will be called \`deno.json\` or \`deno.jsonc\` and automatically detected; in that case this flag is not necessary. Docs\: https\://docs.deno.com/go/config]:FILE:_files' \ -'--config=[Configure different aspects of deno including TypeScript, linting, and code formatting Typically the configuration file will be called \`deno.json\` or \`deno.jsonc\` and automatically detected; in that case this flag is not necessary. Docs\: https\://docs.deno.com/go/config]:FILE:_files' \ -'*-r+[Reload source code cache (recompile TypeScript) no value Reload everything jsr\:@std/http/file-server,jsr\:@std/assert/assert-equals Reloads specific modules npm\: Reload all npm modules npm\:chalk Reload specific npm module]' \ -'*--reload=[Reload source code cache (recompile TypeScript) no value Reload everything jsr\:@std/http/file-server,jsr\:@std/assert/assert-equals Reloads specific modules npm\: Reload all npm modules npm\:chalk Reload specific npm module]' \ -'--lock=[Check the specified lock file. (If value is not provided, defaults to "./deno.lock")]' \ -'--cert=[Load certificate authority from PEM encoded file]:FILE:_files' \ -'--unsafely-ignore-certificate-errors=[DANGER\: Disables verification of TLS certificates]' \ -'*-R+[Allow file system read access. Optionally specify allowed paths]' \ -'*--allow-read=[Allow file system read access. Optionally specify allowed paths]' \ -'*--deny-read=[Deny file system read access. Optionally specify denied paths]' \ -'*-W+[Allow file system write access. Optionally specify allowed paths]' \ -'*--allow-write=[Allow file system write access. Optionally specify allowed paths]' \ -'*--deny-write=[Deny file system write access. Optionally specify denied paths]' \ -'-N+[Allow network access. Optionally specify allowed IP addresses and host names, with ports as necessary]' \ -'--allow-net=[Allow network access. Optionally specify allowed IP addresses and host names, with ports as necessary]' \ -'--deny-net=[Deny network access. Optionally specify denied IP addresses and host names, with ports as necessary]' \ -'-E+[Allow access to system environment information. Optionally specify accessible environment variables]' \ -'--allow-env=[Allow access to system environment information. Optionally specify accessible environment variables]' \ -'--deny-env=[Deny access to system environment information. Optionally specify accessible environment variables]' \ -'-S+[Allow access to OS information. Optionally allow specific APIs by function name]' \ -'--allow-sys=[Allow access to OS information. Optionally allow specific APIs by function name]' \ -'--deny-sys=[Deny access to OS information. Optionally deny specific APIs by function name]' \ -'--allow-run=[Allow running subprocesses. Optionally specify allowed runnable program names]' \ -'--deny-run=[Deny running subprocesses. Optionally specify denied runnable program names]' \ -'*--allow-ffi=[(Unstable) Allow loading dynamic libraries. Optionally specify allowed directories or files]' \ -'*--deny-ffi=[(Unstable) Deny loading dynamic libraries. Optionally specify denied directories or files]' \ -'-I+[Allow importing from remote hosts. Optionally specify allowed IP addresses and host names, with ports as necessary. Default value\: deno.land\:443,jsr.io\:443,esm.sh\:443,cdn.jsdelivr.net\:443,raw.githubusercontent.com\:443,user.githubusercontent.com\:443]' \ -'--allow-import=[Allow importing from remote hosts. Optionally specify allowed IP addresses and host names, with ports as necessary. Default value\: deno.land\:443,jsr.io\:443,esm.sh\:443,cdn.jsdelivr.net\:443,raw.githubusercontent.com\:443,user.githubusercontent.com\:443]' \ -'--inspect=[Activate inspector on host\:port \[default\: 127.0.0.1\:9229\]]' \ -'--inspect-brk=[Activate inspector on host\:port, wait for debugger to connect and break at the start of user script]' \ -'--inspect-wait=[Activate inspector on host\:port and wait for debugger to connect before running user code]' \ -'*--allow-scripts=[Allow running npm lifecycle scripts for the given packages Note\: Scripts will only be executed when using a node_modules directory (\`--node-modules-dir\`)]' \ -'--frozen=[Error out if lockfile is out of date]' \ -'--location=[Value of globalThis.location used by some web APIs]:HREF:_urls' \ -'--v8-flags=[To see a list of all available flags use --v8-flags=--help Flags can also be set via the DENO_V8_FLAGS environment variable. Any flags set with this flag are appended after the DENO_V8_FLAGS environment variable]' \ -'--seed=[Set the random number generator seed]:NUMBER: ' \ -'--strace-ops=[Trace low-level op calls]' \ -'(--no-check)--check=[Enable type-checking. This subcommand does not type-check by default If the value of "all" is supplied, remote modules will be included. Alternatively, the '\''deno check'\'' subcommand can be used]' \ -'*--watch=[Watch for file changes and restart process automatically. Local files from entry point module graph are watched by default. Additional paths might be watched by passing them as arguments to this flag.]' \ -'(--watch)*--watch-hmr=[Watch for file changes and restart process automatically. Local files from entry point module graph are watched by default. Additional paths might be watched by passing them as arguments to this flag.]' \ -'*--watch-exclude=[Exclude provided files/patterns from watch mode]' \ -'--ext=[Set content type of the supplied file]: :(ts tsx js jsx)' \ -'--env-file=[Load environment variables from local file Only the first environment variable with a given key is used. Existing process environment variables are not overwritten.]' \ -'*-h+[]' \ -'*--help=[]' \ -'-L+[Set log level]: :(trace debug info)' \ -'--log-level=[Set log level]: :(trace debug info)' \ -'--no-remote[Do not resolve remote modules]' \ -'--no-npm[Do not resolve npm modules]' \ -'(-c --config)--no-config[Disable automatic loading of the configuration file]' \ -'(--lock)--no-lock[Disable auto discovery of the lock file]' \ -'(-R --allow-read -W --allow-write -N --allow-net -E --allow-env --allow-run -S --allow-sys --allow-ffi -I --allow-import)-A[Allow all permissions]' \ -'(-R --allow-read -W --allow-write -N --allow-net -E --allow-env --allow-run -S --allow-sys --allow-ffi -I --allow-import)--allow-all[Allow all permissions]' \ -'--allow-hrtime[REMOVED in Deno 2.0]' \ -'--deny-hrtime[REMOVED in Deno 2.0]' \ -'--no-prompt[Always throw if required permission wasn'\''t passed]' \ -'--cached-only[Require that remote dependencies are already cached]' \ -'--enable-testing-features-do-not-use[INTERNAL\: Enable internal features used during integration testing]' \ -'--no-clear-screen[Do not clear terminal screen when under watch mode]' \ -'--no-code-cache[Disable V8 code cache feature]' \ -'--unstable[Enable all unstable features and APIs. Instead of using this flag, consider enabling individual unstable features To view the list of individual unstable feature flags, run this command again with --help=unstable]' \ -'--unstable-bare-node-builtins[Enable unstable bare node builtins feature]' \ -'--unstable-detect-cjs[Reads the package.json type field in a project to treat .js files as .cjs]' \ -'--unstable-byonm[]' \ -'--unstable-sloppy-imports[Enable unstable resolving of specifiers by extension probing, .js to .ts, and directory probing]' \ -'--unstable-broadcast-channel[Enable unstable \`BroadcastChannel\` API]' \ -'--unstable-cron[Enable unstable Deno.cron API]' \ -'--unstable-ffi[Enable unstable FFI APIs]' \ -'--unstable-fs[Enable unstable file system APIs]' \ -'--unstable-http[Enable unstable HTTP APIs]' \ -'--unstable-kv[Enable unstable Key-Value store APIs]' \ -'--unstable-net[Enable unstable net APIs]' \ -'--unstable-process[Enable unstable process APIs]' \ -'--unstable-temporal[Enable unstable Temporal API]' \ -'--unstable-unsafe-proto[Enable unsafe __proto__ support. This is a security risk.]' \ -'--unstable-webgpu[Enable unstable \`WebGPU\` APIs]' \ -'--unstable-worker-options[Enable unstable Web Worker APIs]' \ -'-V[Print version]' \ -'--version[Print version]' \ -'-q[Suppress diagnostic output]' \ -'--quiet[Suppress diagnostic output]' \ -'::script_arg -- Script arg:_files' \ -":: :_deno_commands" \ -"*::: :->deno" \ -&& ret=0 - case $state in - (deno) - words=($line[2] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:deno-command-$line[2]:" - case $line[2] in - (run) -_arguments "${_arguments_options[@]}" : \ -'--no-check=[Skip type-checking. If the value of "remote" is supplied, diagnostic errors from remote modules will be ignored]' \ -'--import-map=[Load import map file from local file or remote URL Docs\: https\://docs.deno.com/runtime/manual/basics/import_maps]:FILE:_files' \ -'--node-modules-dir=[Sets the node modules management mode for npm packages]' \ -'--vendor=[Toggles local vendor folder usage for remote modules and a node_modules folder for npm packages]' \ -'-c+[Configure different aspects of deno including TypeScript, linting, and code formatting Typically the configuration file will be called \`deno.json\` or \`deno.jsonc\` and automatically detected; in that case this flag is not necessary. Docs\: https\://docs.deno.com/go/config]:FILE:_files' \ -'--config=[Configure different aspects of deno including TypeScript, linting, and code formatting Typically the configuration file will be called \`deno.json\` or \`deno.jsonc\` and automatically detected; in that case this flag is not necessary. Docs\: https\://docs.deno.com/go/config]:FILE:_files' \ -'*-r+[Reload source code cache (recompile TypeScript) no value Reload everything jsr\:@std/http/file-server,jsr\:@std/assert/assert-equals Reloads specific modules npm\: Reload all npm modules npm\:chalk Reload specific npm module]' \ -'*--reload=[Reload source code cache (recompile TypeScript) no value Reload everything jsr\:@std/http/file-server,jsr\:@std/assert/assert-equals Reloads specific modules npm\: Reload all npm modules npm\:chalk Reload specific npm module]' \ -'--lock=[Check the specified lock file. (If value is not provided, defaults to "./deno.lock")]' \ -'--cert=[Load certificate authority from PEM encoded file]:FILE:_files' \ -'--unsafely-ignore-certificate-errors=[DANGER\: Disables verification of TLS certificates]' \ -'*-R+[Allow file system read access. Optionally specify allowed paths]' \ -'*--allow-read=[Allow file system read access. Optionally specify allowed paths]' \ -'*--deny-read=[Deny file system read access. Optionally specify denied paths]' \ -'*-W+[Allow file system write access. Optionally specify allowed paths]' \ -'*--allow-write=[Allow file system write access. Optionally specify allowed paths]' \ -'*--deny-write=[Deny file system write access. Optionally specify denied paths]' \ -'-N+[Allow network access. Optionally specify allowed IP addresses and host names, with ports as necessary]' \ -'--allow-net=[Allow network access. Optionally specify allowed IP addresses and host names, with ports as necessary]' \ -'--deny-net=[Deny network access. Optionally specify denied IP addresses and host names, with ports as necessary]' \ -'-E+[Allow access to system environment information. Optionally specify accessible environment variables]' \ -'--allow-env=[Allow access to system environment information. Optionally specify accessible environment variables]' \ -'--deny-env=[Deny access to system environment information. Optionally specify accessible environment variables]' \ -'-S+[Allow access to OS information. Optionally allow specific APIs by function name]' \ -'--allow-sys=[Allow access to OS information. Optionally allow specific APIs by function name]' \ -'--deny-sys=[Deny access to OS information. Optionally deny specific APIs by function name]' \ -'--allow-run=[Allow running subprocesses. Optionally specify allowed runnable program names]' \ -'--deny-run=[Deny running subprocesses. Optionally specify denied runnable program names]' \ -'*--allow-ffi=[(Unstable) Allow loading dynamic libraries. Optionally specify allowed directories or files]' \ -'*--deny-ffi=[(Unstable) Deny loading dynamic libraries. Optionally specify denied directories or files]' \ -'-I+[Allow importing from remote hosts. Optionally specify allowed IP addresses and host names, with ports as necessary. Default value\: deno.land\:443,jsr.io\:443,esm.sh\:443,cdn.jsdelivr.net\:443,raw.githubusercontent.com\:443,user.githubusercontent.com\:443]' \ -'--allow-import=[Allow importing from remote hosts. Optionally specify allowed IP addresses and host names, with ports as necessary. Default value\: deno.land\:443,jsr.io\:443,esm.sh\:443,cdn.jsdelivr.net\:443,raw.githubusercontent.com\:443,user.githubusercontent.com\:443]' \ -'--inspect=[Activate inspector on host\:port \[default\: 127.0.0.1\:9229\]]' \ -'--inspect-brk=[Activate inspector on host\:port, wait for debugger to connect and break at the start of user script]' \ -'--inspect-wait=[Activate inspector on host\:port and wait for debugger to connect before running user code]' \ -'*--allow-scripts=[Allow running npm lifecycle scripts for the given packages Note\: Scripts will only be executed when using a node_modules directory (\`--node-modules-dir\`)]' \ -'--frozen=[Error out if lockfile is out of date]' \ -'--location=[Value of globalThis.location used by some web APIs]:HREF:_urls' \ -'--v8-flags=[To see a list of all available flags use --v8-flags=--help Flags can also be set via the DENO_V8_FLAGS environment variable. Any flags set with this flag are appended after the DENO_V8_FLAGS environment variable]' \ -'--seed=[Set the random number generator seed]:NUMBER: ' \ -'--strace-ops=[Trace low-level op calls]' \ -'(--no-check)--check=[Enable type-checking. This subcommand does not type-check by default If the value of "all" is supplied, remote modules will be included. Alternatively, the '\''deno check'\'' subcommand can be used]' \ -'*--watch=[Watch for file changes and restart process automatically. Local files from entry point module graph are watched by default. Additional paths might be watched by passing them as arguments to this flag.]' \ -'(--watch)*--watch-hmr=[Watch for file changes and restart process automatically. Local files from entry point module graph are watched by default. Additional paths might be watched by passing them as arguments to this flag.]' \ -'*--watch-exclude=[Exclude provided files/patterns from watch mode]' \ -'--ext=[Set content type of the supplied file]: :(ts tsx js jsx)' \ -'--env-file=[Load environment variables from local file Only the first environment variable with a given key is used. Existing process environment variables are not overwritten.]' \ -'*-h+[]' \ -'*--help=[]' \ -'-L+[Set log level]: :(trace debug info)' \ -'--log-level=[Set log level]: :(trace debug info)' \ -'--unstable[Enable all unstable features and APIs. Instead of using this flag, consider enabling individual unstable features To view the list of individual unstable feature flags, run this command again with --help=unstable]' \ -'--unstable-bare-node-builtins[Enable unstable bare node builtins feature]' \ -'--unstable-detect-cjs[Reads the package.json type field in a project to treat .js files as .cjs]' \ -'--unstable-byonm[]' \ -'--unstable-sloppy-imports[Enable unstable resolving of specifiers by extension probing, .js to .ts, and directory probing]' \ -'--unstable-broadcast-channel[Enable unstable \`BroadcastChannel\` API]' \ -'--unstable-cron[Enable unstable Deno.cron API]' \ -'--unstable-ffi[Enable unstable FFI APIs]' \ -'--unstable-fs[Enable unstable file system APIs]' \ -'--unstable-http[Enable unstable HTTP APIs]' \ -'--unstable-kv[Enable unstable Key-Value store APIs]' \ -'--unstable-net[Enable unstable net APIs]' \ -'--unstable-process[Enable unstable process APIs]' \ -'--unstable-temporal[Enable unstable Temporal API]' \ -'--unstable-unsafe-proto[Enable unsafe __proto__ support. This is a security risk.]' \ -'--unstable-webgpu[Enable unstable \`WebGPU\` APIs]' \ -'--unstable-worker-options[Enable unstable Web Worker APIs]' \ -'--no-remote[Do not resolve remote modules]' \ -'--no-npm[Do not resolve npm modules]' \ -'(-c --config)--no-config[Disable automatic loading of the configuration file]' \ -'(--lock)--no-lock[Disable auto discovery of the lock file]' \ -'(-R --allow-read -W --allow-write -N --allow-net -E --allow-env --allow-run -S --allow-sys --allow-ffi -I --allow-import)-A[Allow all permissions]' \ -'(-R --allow-read -W --allow-write -N --allow-net -E --allow-env --allow-run -S --allow-sys --allow-ffi -I --allow-import)--allow-all[Allow all permissions]' \ -'--allow-hrtime[REMOVED in Deno 2.0]' \ -'--deny-hrtime[REMOVED in Deno 2.0]' \ -'--no-prompt[Always throw if required permission wasn'\''t passed]' \ -'--cached-only[Require that remote dependencies are already cached]' \ -'--enable-testing-features-do-not-use[INTERNAL\: Enable internal features used during integration testing]' \ -'--no-clear-screen[Do not clear terminal screen when under watch mode]' \ -'--no-code-cache[Disable V8 code cache feature]' \ -'-q[Suppress diagnostic output]' \ -'--quiet[Suppress diagnostic output]' \ -'*::script_arg -- Script arg:_files' \ -&& ret=0 -;; -(serve) -_arguments "${_arguments_options[@]}" : \ -'--no-check=[Skip type-checking. If the value of "remote" is supplied, diagnostic errors from remote modules will be ignored]' \ -'--import-map=[Load import map file from local file or remote URL Docs\: https\://docs.deno.com/runtime/manual/basics/import_maps]:FILE:_files' \ -'--node-modules-dir=[Sets the node modules management mode for npm packages]' \ -'--vendor=[Toggles local vendor folder usage for remote modules and a node_modules folder for npm packages]' \ -'-c+[Configure different aspects of deno including TypeScript, linting, and code formatting Typically the configuration file will be called \`deno.json\` or \`deno.jsonc\` and automatically detected; in that case this flag is not necessary. Docs\: https\://docs.deno.com/go/config]:FILE:_files' \ -'--config=[Configure different aspects of deno including TypeScript, linting, and code formatting Typically the configuration file will be called \`deno.json\` or \`deno.jsonc\` and automatically detected; in that case this flag is not necessary. Docs\: https\://docs.deno.com/go/config]:FILE:_files' \ -'*-r+[Reload source code cache (recompile TypeScript) no value Reload everything jsr\:@std/http/file-server,jsr\:@std/assert/assert-equals Reloads specific modules npm\: Reload all npm modules npm\:chalk Reload specific npm module]' \ -'*--reload=[Reload source code cache (recompile TypeScript) no value Reload everything jsr\:@std/http/file-server,jsr\:@std/assert/assert-equals Reloads specific modules npm\: Reload all npm modules npm\:chalk Reload specific npm module]' \ -'--lock=[Check the specified lock file. (If value is not provided, defaults to "./deno.lock")]' \ -'--cert=[Load certificate authority from PEM encoded file]:FILE:_files' \ -'--unsafely-ignore-certificate-errors=[DANGER\: Disables verification of TLS certificates]' \ -'*-R+[Allow file system read access. Optionally specify allowed paths]' \ -'*--allow-read=[Allow file system read access. Optionally specify allowed paths]' \ -'*--deny-read=[Deny file system read access. Optionally specify denied paths]' \ -'*-W+[Allow file system write access. Optionally specify allowed paths]' \ -'*--allow-write=[Allow file system write access. Optionally specify allowed paths]' \ -'*--deny-write=[Deny file system write access. Optionally specify denied paths]' \ -'-N+[Allow network access. Optionally specify allowed IP addresses and host names, with ports as necessary]' \ -'--allow-net=[Allow network access. Optionally specify allowed IP addresses and host names, with ports as necessary]' \ -'--deny-net=[Deny network access. Optionally specify denied IP addresses and host names, with ports as necessary]' \ -'-E+[Allow access to system environment information. Optionally specify accessible environment variables]' \ -'--allow-env=[Allow access to system environment information. Optionally specify accessible environment variables]' \ -'--deny-env=[Deny access to system environment information. Optionally specify accessible environment variables]' \ -'-S+[Allow access to OS information. Optionally allow specific APIs by function name]' \ -'--allow-sys=[Allow access to OS information. Optionally allow specific APIs by function name]' \ -'--deny-sys=[Deny access to OS information. Optionally deny specific APIs by function name]' \ -'--allow-run=[Allow running subprocesses. Optionally specify allowed runnable program names]' \ -'--deny-run=[Deny running subprocesses. Optionally specify denied runnable program names]' \ -'*--allow-ffi=[(Unstable) Allow loading dynamic libraries. Optionally specify allowed directories or files]' \ -'*--deny-ffi=[(Unstable) Deny loading dynamic libraries. Optionally specify denied directories or files]' \ -'-I+[Allow importing from remote hosts. Optionally specify allowed IP addresses and host names, with ports as necessary. Default value\: deno.land\:443,jsr.io\:443,esm.sh\:443,cdn.jsdelivr.net\:443,raw.githubusercontent.com\:443,user.githubusercontent.com\:443]' \ -'--allow-import=[Allow importing from remote hosts. Optionally specify allowed IP addresses and host names, with ports as necessary. Default value\: deno.land\:443,jsr.io\:443,esm.sh\:443,cdn.jsdelivr.net\:443,raw.githubusercontent.com\:443,user.githubusercontent.com\:443]' \ -'--inspect=[Activate inspector on host\:port \[default\: 127.0.0.1\:9229\]]' \ -'--inspect-brk=[Activate inspector on host\:port, wait for debugger to connect and break at the start of user script]' \ -'--inspect-wait=[Activate inspector on host\:port and wait for debugger to connect before running user code]' \ -'*--allow-scripts=[Allow running npm lifecycle scripts for the given packages Note\: Scripts will only be executed when using a node_modules directory (\`--node-modules-dir\`)]' \ -'--frozen=[Error out if lockfile is out of date]' \ -'--location=[Value of globalThis.location used by some web APIs]:HREF:_urls' \ -'--v8-flags=[To see a list of all available flags use --v8-flags=--help Flags can also be set via the DENO_V8_FLAGS environment variable. Any flags set with this flag are appended after the DENO_V8_FLAGS environment variable]' \ -'--seed=[Set the random number generator seed]:NUMBER: ' \ -'--strace-ops=[Trace low-level op calls]' \ -'--port=[The TCP port to serve on. Pass 0 to pick a random free port \[default\: 8000\]]: : ' \ -'--host=[The TCP address to serve on, defaulting to 0.0.0.0 (all interfaces)]: : ' \ -'(--no-check)--check=[Enable type-checking. This subcommand does not type-check by default If the value of "all" is supplied, remote modules will be included. Alternatively, the '\''deno check'\'' subcommand can be used]' \ -'*--watch=[Watch for file changes and restart process automatically. Local files from entry point module graph are watched by default. Additional paths might be watched by passing them as arguments to this flag.]' \ -'(--watch)*--watch-hmr=[Watch for file changes and restart process automatically. Local files from entry point module graph are watched by default. Additional paths might be watched by passing them as arguments to this flag.]' \ -'*--watch-exclude=[Exclude provided files/patterns from watch mode]' \ -'--ext=[Set content type of the supplied file]: :(ts tsx js jsx)' \ -'--env-file=[Load environment variables from local file Only the first environment variable with a given key is used. Existing process environment variables are not overwritten.]' \ -'*-h+[]' \ -'*--help=[]' \ -'-L+[Set log level]: :(trace debug info)' \ -'--log-level=[Set log level]: :(trace debug info)' \ -'--unstable[Enable all unstable features and APIs. Instead of using this flag, consider enabling individual unstable features To view the list of individual unstable feature flags, run this command again with --help=unstable]' \ -'--unstable-bare-node-builtins[Enable unstable bare node builtins feature]' \ -'--unstable-detect-cjs[Reads the package.json type field in a project to treat .js files as .cjs]' \ -'--unstable-byonm[]' \ -'--unstable-sloppy-imports[Enable unstable resolving of specifiers by extension probing, .js to .ts, and directory probing]' \ -'--unstable-broadcast-channel[Enable unstable \`BroadcastChannel\` API]' \ -'--unstable-cron[Enable unstable Deno.cron API]' \ -'--unstable-ffi[Enable unstable FFI APIs]' \ -'--unstable-fs[Enable unstable file system APIs]' \ -'--unstable-http[Enable unstable HTTP APIs]' \ -'--unstable-kv[Enable unstable Key-Value store APIs]' \ -'--unstable-net[Enable unstable net APIs]' \ -'--unstable-process[Enable unstable process APIs]' \ -'--unstable-temporal[Enable unstable Temporal API]' \ -'--unstable-unsafe-proto[Enable unsafe __proto__ support. This is a security risk.]' \ -'--unstable-webgpu[Enable unstable \`WebGPU\` APIs]' \ -'--unstable-worker-options[Enable unstable Web Worker APIs]' \ -'--no-remote[Do not resolve remote modules]' \ -'--no-npm[Do not resolve npm modules]' \ -'(-c --config)--no-config[Disable automatic loading of the configuration file]' \ -'(--lock)--no-lock[Disable auto discovery of the lock file]' \ -'(-R --allow-read -W --allow-write -N --allow-net -E --allow-env --allow-run -S --allow-sys --allow-ffi -I --allow-import)-A[Allow all permissions]' \ -'(-R --allow-read -W --allow-write -N --allow-net -E --allow-env --allow-run -S --allow-sys --allow-ffi -I --allow-import)--allow-all[Allow all permissions]' \ -'--allow-hrtime[REMOVED in Deno 2.0]' \ -'--deny-hrtime[REMOVED in Deno 2.0]' \ -'--no-prompt[Always throw if required permission wasn'\''t passed]' \ -'--cached-only[Require that remote dependencies are already cached]' \ -'--enable-testing-features-do-not-use[INTERNAL\: Enable internal features used during integration testing]' \ -'--parallel[Run multiple server workers in parallel. Parallelism defaults to the number of available CPUs or the value of the DENO_JOBS environment variable]' \ -'--no-clear-screen[Do not clear terminal screen when under watch mode]' \ -'--no-code-cache[Disable V8 code cache feature]' \ -'-q[Suppress diagnostic output]' \ -'--quiet[Suppress diagnostic output]' \ -'*::script_arg -- Script arg:_files' \ -&& ret=0 -;; -(add) -_arguments "${_arguments_options[@]}" : \ -'*-h+[]' \ -'*--help=[]' \ -'-L+[Set log level]: :(trace debug info)' \ -'--log-level=[Set log level]: :(trace debug info)' \ -'*--allow-scripts=[Allow running npm lifecycle scripts for the given packages Note\: Scripts will only be executed when using a node_modules directory (\`--node-modules-dir\`)]' \ -'--unstable[Enable all unstable features and APIs. Instead of using this flag, consider enabling individual unstable features To view the list of individual unstable feature flags, run this command again with --help=unstable]' \ -'--unstable-bare-node-builtins[Enable unstable bare node builtins feature]' \ -'--unstable-detect-cjs[Reads the package.json type field in a project to treat .js files as .cjs]' \ -'--unstable-byonm[]' \ -'--unstable-sloppy-imports[Enable unstable resolving of specifiers by extension probing, .js to .ts, and directory probing]' \ -'--unstable-broadcast-channel[Enable unstable \`BroadcastChannel\` API]' \ -'--unstable-cron[Enable unstable Deno.cron API]' \ -'--unstable-ffi[Enable unstable FFI APIs]' \ -'--unstable-fs[Enable unstable file system APIs]' \ -'--unstable-http[Enable unstable HTTP APIs]' \ -'--unstable-kv[Enable unstable Key-Value store APIs]' \ -'--unstable-net[Enable unstable net APIs]' \ -'--unstable-process[Enable unstable process APIs]' \ -'--unstable-temporal[Enable unstable Temporal API]' \ -'--unstable-unsafe-proto[Enable unsafe __proto__ support. This is a security risk.]' \ -'--unstable-webgpu[Enable unstable \`WebGPU\` APIs]' \ -'--unstable-worker-options[Enable unstable Web Worker APIs]' \ -'-q[Suppress diagnostic output]' \ -'--quiet[Suppress diagnostic output]' \ -'-D[Add as a dev dependency]' \ -'--dev[Add as a dev dependency]' \ -'*::packages -- List of packages to add:' \ -&& ret=0 -;; -(remove) -_arguments "${_arguments_options[@]}" : \ -'*-h+[]' \ -'*--help=[]' \ -'-L+[Set log level]: :(trace debug info)' \ -'--log-level=[Set log level]: :(trace debug info)' \ -'--unstable[Enable all unstable features and APIs. Instead of using this flag, consider enabling individual unstable features To view the list of individual unstable feature flags, run this command again with --help=unstable]' \ -'--unstable-bare-node-builtins[Enable unstable bare node builtins feature]' \ -'--unstable-detect-cjs[Reads the package.json type field in a project to treat .js files as .cjs]' \ -'--unstable-byonm[]' \ -'--unstable-sloppy-imports[Enable unstable resolving of specifiers by extension probing, .js to .ts, and directory probing]' \ -'--unstable-broadcast-channel[Enable unstable \`BroadcastChannel\` API]' \ -'--unstable-cron[Enable unstable Deno.cron API]' \ -'--unstable-ffi[Enable unstable FFI APIs]' \ -'--unstable-fs[Enable unstable file system APIs]' \ -'--unstable-http[Enable unstable HTTP APIs]' \ -'--unstable-kv[Enable unstable Key-Value store APIs]' \ -'--unstable-net[Enable unstable net APIs]' \ -'--unstable-process[Enable unstable process APIs]' \ -'--unstable-temporal[Enable unstable Temporal API]' \ -'--unstable-unsafe-proto[Enable unsafe __proto__ support. This is a security risk.]' \ -'--unstable-webgpu[Enable unstable \`WebGPU\` APIs]' \ -'--unstable-worker-options[Enable unstable Web Worker APIs]' \ -'-q[Suppress diagnostic output]' \ -'--quiet[Suppress diagnostic output]' \ -'*::packages -- List of packages to remove:' \ -&& ret=0 -;; -(bench) -_arguments "${_arguments_options[@]}" : \ -'*-h+[]' \ -'*--help=[]' \ -'-L+[Set log level]: :(trace debug info)' \ -'--log-level=[Set log level]: :(trace debug info)' \ -'--no-check=[Skip type-checking. If the value of "remote" is supplied, diagnostic errors from remote modules will be ignored]' \ -'--import-map=[Load import map file from local file or remote URL Docs\: https\://docs.deno.com/runtime/manual/basics/import_maps]:FILE:_files' \ -'--node-modules-dir=[Sets the node modules management mode for npm packages]' \ -'--vendor=[Toggles local vendor folder usage for remote modules and a node_modules folder for npm packages]' \ -'-c+[Configure different aspects of deno including TypeScript, linting, and code formatting Typically the configuration file will be called \`deno.json\` or \`deno.jsonc\` and automatically detected; in that case this flag is not necessary. Docs\: https\://docs.deno.com/go/config]:FILE:_files' \ -'--config=[Configure different aspects of deno including TypeScript, linting, and code formatting Typically the configuration file will be called \`deno.json\` or \`deno.jsonc\` and automatically detected; in that case this flag is not necessary. Docs\: https\://docs.deno.com/go/config]:FILE:_files' \ -'*-r+[Reload source code cache (recompile TypeScript) no value Reload everything jsr\:@std/http/file-server,jsr\:@std/assert/assert-equals Reloads specific modules npm\: Reload all npm modules npm\:chalk Reload specific npm module]' \ -'*--reload=[Reload source code cache (recompile TypeScript) no value Reload everything jsr\:@std/http/file-server,jsr\:@std/assert/assert-equals Reloads specific modules npm\: Reload all npm modules npm\:chalk Reload specific npm module]' \ -'--lock=[Check the specified lock file. (If value is not provided, defaults to "./deno.lock")]' \ -'--cert=[Load certificate authority from PEM encoded file]:FILE:_files' \ -'--unsafely-ignore-certificate-errors=[DANGER\: Disables verification of TLS certificates]' \ -'*-R+[Allow file system read access. Optionally specify allowed paths]' \ -'*--allow-read=[Allow file system read access. Optionally specify allowed paths]' \ -'*--deny-read=[Deny file system read access. Optionally specify denied paths]' \ -'*-W+[Allow file system write access. Optionally specify allowed paths]' \ -'*--allow-write=[Allow file system write access. Optionally specify allowed paths]' \ -'*--deny-write=[Deny file system write access. Optionally specify denied paths]' \ -'-N+[Allow network access. Optionally specify allowed IP addresses and host names, with ports as necessary]' \ -'--allow-net=[Allow network access. Optionally specify allowed IP addresses and host names, with ports as necessary]' \ -'--deny-net=[Deny network access. Optionally specify denied IP addresses and host names, with ports as necessary]' \ -'-E+[Allow access to system environment information. Optionally specify accessible environment variables]' \ -'--allow-env=[Allow access to system environment information. Optionally specify accessible environment variables]' \ -'--deny-env=[Deny access to system environment information. Optionally specify accessible environment variables]' \ -'-S+[Allow access to OS information. Optionally allow specific APIs by function name]' \ -'--allow-sys=[Allow access to OS information. Optionally allow specific APIs by function name]' \ -'--deny-sys=[Deny access to OS information. Optionally deny specific APIs by function name]' \ -'--allow-run=[Allow running subprocesses. Optionally specify allowed runnable program names]' \ -'--deny-run=[Deny running subprocesses. Optionally specify denied runnable program names]' \ -'*--allow-ffi=[(Unstable) Allow loading dynamic libraries. Optionally specify allowed directories or files]' \ -'*--deny-ffi=[(Unstable) Deny loading dynamic libraries. Optionally specify denied directories or files]' \ -'-I+[Allow importing from remote hosts. Optionally specify allowed IP addresses and host names, with ports as necessary. Default value\: deno.land\:443,jsr.io\:443,esm.sh\:443,cdn.jsdelivr.net\:443,raw.githubusercontent.com\:443,user.githubusercontent.com\:443]' \ -'--allow-import=[Allow importing from remote hosts. Optionally specify allowed IP addresses and host names, with ports as necessary. Default value\: deno.land\:443,jsr.io\:443,esm.sh\:443,cdn.jsdelivr.net\:443,raw.githubusercontent.com\:443,user.githubusercontent.com\:443]' \ -'*--allow-scripts=[Allow running npm lifecycle scripts for the given packages Note\: Scripts will only be executed when using a node_modules directory (\`--node-modules-dir\`)]' \ -'--frozen=[Error out if lockfile is out of date]' \ -'--location=[Value of globalThis.location used by some web APIs]:HREF:_urls' \ -'--v8-flags=[To see a list of all available flags use --v8-flags=--help Flags can also be set via the DENO_V8_FLAGS environment variable. Any flags set with this flag are appended after the DENO_V8_FLAGS environment variable]' \ -'--seed=[Set the random number generator seed]:NUMBER: ' \ -'--strace-ops=[Trace low-level op calls]' \ -'(--no-check)--check=[Set type-checking behavior. This subcommand type-checks local modules by default, so adding --check is redundant If the value of "all" is supplied, remote modules will be included. Alternatively, the '\''deno check'\'' subcommand can be used]' \ -'*--ignore=[Ignore files]: : ' \ -'--filter=[Run benchmarks with this string or regexp pattern in the bench name]: : ' \ -'*--watch-exclude=[Exclude provided files/patterns from watch mode]' \ -'--env-file=[Load environment variables from local file Only the first environment variable with a given key is used. Existing process environment variables are not overwritten.]' \ -'--ext=[Set content type of the supplied file]: :(ts tsx js jsx)' \ -'--unstable[Enable all unstable features and APIs. Instead of using this flag, consider enabling individual unstable features To view the list of individual unstable feature flags, run this command again with --help=unstable]' \ -'--unstable-bare-node-builtins[Enable unstable bare node builtins feature]' \ -'--unstable-detect-cjs[Reads the package.json type field in a project to treat .js files as .cjs]' \ -'--unstable-byonm[]' \ -'--unstable-sloppy-imports[Enable unstable resolving of specifiers by extension probing, .js to .ts, and directory probing]' \ -'--unstable-broadcast-channel[Enable unstable \`BroadcastChannel\` API]' \ -'--unstable-cron[Enable unstable Deno.cron API]' \ -'--unstable-ffi[Enable unstable FFI APIs]' \ -'--unstable-fs[Enable unstable file system APIs]' \ -'--unstable-http[Enable unstable HTTP APIs]' \ -'--unstable-kv[Enable unstable Key-Value store APIs]' \ -'--unstable-net[Enable unstable net APIs]' \ -'--unstable-process[Enable unstable process APIs]' \ -'--unstable-temporal[Enable unstable Temporal API]' \ -'--unstable-unsafe-proto[Enable unsafe __proto__ support. This is a security risk.]' \ -'--unstable-webgpu[Enable unstable \`WebGPU\` APIs]' \ -'--unstable-worker-options[Enable unstable Web Worker APIs]' \ -'-q[Suppress diagnostic output]' \ -'--quiet[Suppress diagnostic output]' \ -'--no-remote[Do not resolve remote modules]' \ -'--no-npm[Do not resolve npm modules]' \ -'(-c --config)--no-config[Disable automatic loading of the configuration file]' \ -'(--lock)--no-lock[Disable auto discovery of the lock file]' \ -'(-R --allow-read -W --allow-write -N --allow-net -E --allow-env --allow-run -S --allow-sys --allow-ffi -I --allow-import)-A[Allow all permissions]' \ -'(-R --allow-read -W --allow-write -N --allow-net -E --allow-env --allow-run -S --allow-sys --allow-ffi -I --allow-import)--allow-all[Allow all permissions]' \ -'--allow-hrtime[REMOVED in Deno 2.0]' \ -'--deny-hrtime[REMOVED in Deno 2.0]' \ -'--no-prompt[Always throw if required permission wasn'\''t passed]' \ -'--cached-only[Require that remote dependencies are already cached]' \ -'--enable-testing-features-do-not-use[INTERNAL\: Enable internal features used during integration testing]' \ -'--json[UNSTABLE\: Output benchmark result in JSON format]' \ -'--no-run[Cache bench modules, but don'\''t run benchmarks]' \ -'--watch[Watch for file changes and restart process automatically. Only local files from entry point module graph are watched.]' \ -'--no-clear-screen[Do not clear terminal screen when under watch mode]' \ -'*::files -- List of file names to run:' \ -&& ret=0 -;; -(bundle) -_arguments "${_arguments_options[@]}" : \ -'*-h+[]' \ -'*--help=[]' \ -'-L+[Set log level]: :(trace debug info)' \ -'--log-level=[Set log level]: :(trace debug info)' \ -'--unstable[Enable all unstable features and APIs. Instead of using this flag, consider enabling individual unstable features To view the list of individual unstable feature flags, run this command again with --help=unstable]' \ -'--unstable-bare-node-builtins[Enable unstable bare node builtins feature]' \ -'--unstable-detect-cjs[Reads the package.json type field in a project to treat .js files as .cjs]' \ -'--unstable-byonm[]' \ -'--unstable-sloppy-imports[Enable unstable resolving of specifiers by extension probing, .js to .ts, and directory probing]' \ -'--unstable-broadcast-channel[Enable unstable \`BroadcastChannel\` API]' \ -'--unstable-cron[Enable unstable Deno.cron API]' \ -'--unstable-ffi[Enable unstable FFI APIs]' \ -'--unstable-fs[Enable unstable file system APIs]' \ -'--unstable-http[Enable unstable HTTP APIs]' \ -'--unstable-kv[Enable unstable Key-Value store APIs]' \ -'--unstable-net[Enable unstable net APIs]' \ -'--unstable-process[Enable unstable process APIs]' \ -'--unstable-temporal[Enable unstable Temporal API]' \ -'--unstable-unsafe-proto[Enable unsafe __proto__ support. This is a security risk.]' \ -'--unstable-webgpu[Enable unstable \`WebGPU\` APIs]' \ -'--unstable-worker-options[Enable unstable Web Worker APIs]' \ -'-q[Suppress diagnostic output]' \ -'--quiet[Suppress diagnostic output]' \ -&& ret=0 -;; -(cache) -_arguments "${_arguments_options[@]}" : \ -'*-h+[]' \ -'*--help=[]' \ -'-L+[Set log level]: :(trace debug info)' \ -'--log-level=[Set log level]: :(trace debug info)' \ -'--no-check=[Skip type-checking. If the value of "remote" is supplied, diagnostic errors from remote modules will be ignored]' \ -'--import-map=[Load import map file from local file or remote URL Docs\: https\://docs.deno.com/runtime/manual/basics/import_maps]:FILE:_files' \ -'--node-modules-dir=[Sets the node modules management mode for npm packages]' \ -'--vendor=[Toggles local vendor folder usage for remote modules and a node_modules folder for npm packages]' \ -'-c+[Configure different aspects of deno including TypeScript, linting, and code formatting Typically the configuration file will be called \`deno.json\` or \`deno.jsonc\` and automatically detected; in that case this flag is not necessary. Docs\: https\://docs.deno.com/go/config]:FILE:_files' \ -'--config=[Configure different aspects of deno including TypeScript, linting, and code formatting Typically the configuration file will be called \`deno.json\` or \`deno.jsonc\` and automatically detected; in that case this flag is not necessary. Docs\: https\://docs.deno.com/go/config]:FILE:_files' \ -'*-r+[Reload source code cache (recompile TypeScript) no value Reload everything jsr\:@std/http/file-server,jsr\:@std/assert/assert-equals Reloads specific modules npm\: Reload all npm modules npm\:chalk Reload specific npm module]' \ -'*--reload=[Reload source code cache (recompile TypeScript) no value Reload everything jsr\:@std/http/file-server,jsr\:@std/assert/assert-equals Reloads specific modules npm\: Reload all npm modules npm\:chalk Reload specific npm module]' \ -'--lock=[Check the specified lock file. (If value is not provided, defaults to "./deno.lock")]' \ -'--cert=[Load certificate authority from PEM encoded file]:FILE:_files' \ -'--unsafely-ignore-certificate-errors=[DANGER\: Disables verification of TLS certificates]' \ -'(--no-check)--check=[Enable type-checking. This subcommand does not type-check by default If the value of "all" is supplied, remote modules will be included. Alternatively, the '\''deno check'\'' subcommand can be used]' \ -'--frozen=[Error out if lockfile is out of date]' \ -'*--allow-scripts=[Allow running npm lifecycle scripts for the given packages Note\: Scripts will only be executed when using a node_modules directory (\`--node-modules-dir\`)]' \ -'-I+[Allow importing from remote hosts. Optionally specify allowed IP addresses and host names, with ports as necessary. Default value\: deno.land\:443,jsr.io\:443,esm.sh\:443,cdn.jsdelivr.net\:443,raw.githubusercontent.com\:443,user.githubusercontent.com\:443]' \ -'--allow-import=[Allow importing from remote hosts. Optionally specify allowed IP addresses and host names, with ports as necessary. Default value\: deno.land\:443,jsr.io\:443,esm.sh\:443,cdn.jsdelivr.net\:443,raw.githubusercontent.com\:443,user.githubusercontent.com\:443]' \ -'--unstable[Enable all unstable features and APIs. Instead of using this flag, consider enabling individual unstable features To view the list of individual unstable feature flags, run this command again with --help=unstable]' \ -'--unstable-bare-node-builtins[Enable unstable bare node builtins feature]' \ -'--unstable-detect-cjs[Reads the package.json type field in a project to treat .js files as .cjs]' \ -'--unstable-byonm[]' \ -'--unstable-sloppy-imports[Enable unstable resolving of specifiers by extension probing, .js to .ts, and directory probing]' \ -'--unstable-broadcast-channel[Enable unstable \`BroadcastChannel\` API]' \ -'--unstable-cron[Enable unstable Deno.cron API]' \ -'--unstable-ffi[Enable unstable FFI APIs]' \ -'--unstable-fs[Enable unstable file system APIs]' \ -'--unstable-http[Enable unstable HTTP APIs]' \ -'--unstable-kv[Enable unstable Key-Value store APIs]' \ -'--unstable-net[Enable unstable net APIs]' \ -'--unstable-process[Enable unstable process APIs]' \ -'--unstable-temporal[Enable unstable Temporal API]' \ -'--unstable-unsafe-proto[Enable unsafe __proto__ support. This is a security risk.]' \ -'--unstable-webgpu[Enable unstable \`WebGPU\` APIs]' \ -'--unstable-worker-options[Enable unstable Web Worker APIs]' \ -'-q[Suppress diagnostic output]' \ -'--quiet[Suppress diagnostic output]' \ -'--no-remote[Do not resolve remote modules]' \ -'--no-npm[Do not resolve npm modules]' \ -'(-c --config)--no-config[Disable automatic loading of the configuration file]' \ -'(--lock)--no-lock[Disable auto discovery of the lock file]' \ -'*::file:_files' \ -&& ret=0 -;; -(check) -_arguments "${_arguments_options[@]}" : \ -'*-h+[]' \ -'*--help=[]' \ -'-L+[Set log level]: :(trace debug info)' \ -'--log-level=[Set log level]: :(trace debug info)' \ -'--import-map=[Load import map file from local file or remote URL Docs\: https\://docs.deno.com/runtime/manual/basics/import_maps]:FILE:_files' \ -'--node-modules-dir=[Sets the node modules management mode for npm packages]' \ -'--vendor=[Toggles local vendor folder usage for remote modules and a node_modules folder for npm packages]' \ -'-c+[Configure different aspects of deno including TypeScript, linting, and code formatting Typically the configuration file will be called \`deno.json\` or \`deno.jsonc\` and automatically detected; in that case this flag is not necessary. Docs\: https\://docs.deno.com/go/config]:FILE:_files' \ -'--config=[Configure different aspects of deno including TypeScript, linting, and code formatting Typically the configuration file will be called \`deno.json\` or \`deno.jsonc\` and automatically detected; in that case this flag is not necessary. Docs\: https\://docs.deno.com/go/config]:FILE:_files' \ -'*-r+[Reload source code cache (recompile TypeScript) no value Reload everything jsr\:@std/http/file-server,jsr\:@std/assert/assert-equals Reloads specific modules npm\: Reload all npm modules npm\:chalk Reload specific npm module]' \ -'*--reload=[Reload source code cache (recompile TypeScript) no value Reload everything jsr\:@std/http/file-server,jsr\:@std/assert/assert-equals Reloads specific modules npm\: Reload all npm modules npm\:chalk Reload specific npm module]' \ -'--lock=[Check the specified lock file. (If value is not provided, defaults to "./deno.lock")]' \ -'--cert=[Load certificate authority from PEM encoded file]:FILE:_files' \ -'--unsafely-ignore-certificate-errors=[DANGER\: Disables verification of TLS certificates]' \ -'--frozen=[Error out if lockfile is out of date]' \ -'-I+[Allow importing from remote hosts. Optionally specify allowed IP addresses and host names, with ports as necessary. Default value\: deno.land\:443,jsr.io\:443,esm.sh\:443,cdn.jsdelivr.net\:443,raw.githubusercontent.com\:443,user.githubusercontent.com\:443]' \ -'--allow-import=[Allow importing from remote hosts. Optionally specify allowed IP addresses and host names, with ports as necessary. Default value\: deno.land\:443,jsr.io\:443,esm.sh\:443,cdn.jsdelivr.net\:443,raw.githubusercontent.com\:443,user.githubusercontent.com\:443]' \ -'--unstable[Enable all unstable features and APIs. Instead of using this flag, consider enabling individual unstable features To view the list of individual unstable feature flags, run this command again with --help=unstable]' \ -'--unstable-bare-node-builtins[Enable unstable bare node builtins feature]' \ -'--unstable-detect-cjs[Reads the package.json type field in a project to treat .js files as .cjs]' \ -'--unstable-byonm[]' \ -'--unstable-sloppy-imports[Enable unstable resolving of specifiers by extension probing, .js to .ts, and directory probing]' \ -'--unstable-broadcast-channel[Enable unstable \`BroadcastChannel\` API]' \ -'--unstable-cron[Enable unstable Deno.cron API]' \ -'--unstable-ffi[Enable unstable FFI APIs]' \ -'--unstable-fs[Enable unstable file system APIs]' \ -'--unstable-http[Enable unstable HTTP APIs]' \ -'--unstable-kv[Enable unstable Key-Value store APIs]' \ -'--unstable-net[Enable unstable net APIs]' \ -'--unstable-process[Enable unstable process APIs]' \ -'--unstable-temporal[Enable unstable Temporal API]' \ -'--unstable-unsafe-proto[Enable unsafe __proto__ support. This is a security risk.]' \ -'--unstable-webgpu[Enable unstable \`WebGPU\` APIs]' \ -'--unstable-worker-options[Enable unstable Web Worker APIs]' \ -'-q[Suppress diagnostic output]' \ -'--quiet[Suppress diagnostic output]' \ -'--no-remote[Do not resolve remote modules]' \ -'--no-npm[Do not resolve npm modules]' \ -'(-c --config)--no-config[Disable automatic loading of the configuration file]' \ -'(--lock)--no-lock[Disable auto discovery of the lock file]' \ -'(--no-remote)--all[Type-check all code, including remote modules and npm packages]' \ -'(--no-remote)--remote[Type-check all modules, including remote ones]' \ -'--doc[Type-check code blocks in JSDoc as well as actual code]' \ -'(--doc)--doc-only[Type-check code blocks in JSDoc and Markdown only]' \ -'*::file:_files' \ -&& ret=0 -;; -(clean) -_arguments "${_arguments_options[@]}" : \ -'*-h+[]' \ -'*--help=[]' \ -'-L+[Set log level]: :(trace debug info)' \ -'--log-level=[Set log level]: :(trace debug info)' \ -'--unstable[Enable all unstable features and APIs. Instead of using this flag, consider enabling individual unstable features To view the list of individual unstable feature flags, run this command again with --help=unstable]' \ -'--unstable-bare-node-builtins[Enable unstable bare node builtins feature]' \ -'--unstable-detect-cjs[Reads the package.json type field in a project to treat .js files as .cjs]' \ -'--unstable-byonm[]' \ -'--unstable-sloppy-imports[Enable unstable resolving of specifiers by extension probing, .js to .ts, and directory probing]' \ -'--unstable-broadcast-channel[Enable unstable \`BroadcastChannel\` API]' \ -'--unstable-cron[Enable unstable Deno.cron API]' \ -'--unstable-ffi[Enable unstable FFI APIs]' \ -'--unstable-fs[Enable unstable file system APIs]' \ -'--unstable-http[Enable unstable HTTP APIs]' \ -'--unstable-kv[Enable unstable Key-Value store APIs]' \ -'--unstable-net[Enable unstable net APIs]' \ -'--unstable-process[Enable unstable process APIs]' \ -'--unstable-temporal[Enable unstable Temporal API]' \ -'--unstable-unsafe-proto[Enable unsafe __proto__ support. This is a security risk.]' \ -'--unstable-webgpu[Enable unstable \`WebGPU\` APIs]' \ -'--unstable-worker-options[Enable unstable Web Worker APIs]' \ -'-q[Suppress diagnostic output]' \ -'--quiet[Suppress diagnostic output]' \ -&& ret=0 -;; -(compile) -_arguments "${_arguments_options[@]}" : \ -'*-h+[]' \ -'*--help=[]' \ -'-L+[Set log level]: :(trace debug info)' \ -'--log-level=[Set log level]: :(trace debug info)' \ -'--no-check=[Skip type-checking. If the value of "remote" is supplied, diagnostic errors from remote modules will be ignored]' \ -'--import-map=[Load import map file from local file or remote URL Docs\: https\://docs.deno.com/runtime/manual/basics/import_maps]:FILE:_files' \ -'--node-modules-dir=[Sets the node modules management mode for npm packages]' \ -'--vendor=[Toggles local vendor folder usage for remote modules and a node_modules folder for npm packages]' \ -'-c+[Configure different aspects of deno including TypeScript, linting, and code formatting Typically the configuration file will be called \`deno.json\` or \`deno.jsonc\` and automatically detected; in that case this flag is not necessary. Docs\: https\://docs.deno.com/go/config]:FILE:_files' \ -'--config=[Configure different aspects of deno including TypeScript, linting, and code formatting Typically the configuration file will be called \`deno.json\` or \`deno.jsonc\` and automatically detected; in that case this flag is not necessary. Docs\: https\://docs.deno.com/go/config]:FILE:_files' \ -'*-r+[Reload source code cache (recompile TypeScript) no value Reload everything jsr\:@std/http/file-server,jsr\:@std/assert/assert-equals Reloads specific modules npm\: Reload all npm modules npm\:chalk Reload specific npm module]' \ -'*--reload=[Reload source code cache (recompile TypeScript) no value Reload everything jsr\:@std/http/file-server,jsr\:@std/assert/assert-equals Reloads specific modules npm\: Reload all npm modules npm\:chalk Reload specific npm module]' \ -'--lock=[Check the specified lock file. (If value is not provided, defaults to "./deno.lock")]' \ -'--cert=[Load certificate authority from PEM encoded file]:FILE:_files' \ -'--unsafely-ignore-certificate-errors=[DANGER\: Disables verification of TLS certificates]' \ -'*-R+[Allow file system read access. Optionally specify allowed paths]' \ -'*--allow-read=[Allow file system read access. Optionally specify allowed paths]' \ -'*--deny-read=[Deny file system read access. Optionally specify denied paths]' \ -'*-W+[Allow file system write access. Optionally specify allowed paths]' \ -'*--allow-write=[Allow file system write access. Optionally specify allowed paths]' \ -'*--deny-write=[Deny file system write access. Optionally specify denied paths]' \ -'-N+[Allow network access. Optionally specify allowed IP addresses and host names, with ports as necessary]' \ -'--allow-net=[Allow network access. Optionally specify allowed IP addresses and host names, with ports as necessary]' \ -'--deny-net=[Deny network access. Optionally specify denied IP addresses and host names, with ports as necessary]' \ -'-E+[Allow access to system environment information. Optionally specify accessible environment variables]' \ -'--allow-env=[Allow access to system environment information. Optionally specify accessible environment variables]' \ -'--deny-env=[Deny access to system environment information. Optionally specify accessible environment variables]' \ -'-S+[Allow access to OS information. Optionally allow specific APIs by function name]' \ -'--allow-sys=[Allow access to OS information. Optionally allow specific APIs by function name]' \ -'--deny-sys=[Deny access to OS information. Optionally deny specific APIs by function name]' \ -'--allow-run=[Allow running subprocesses. Optionally specify allowed runnable program names]' \ -'--deny-run=[Deny running subprocesses. Optionally specify denied runnable program names]' \ -'*--allow-ffi=[(Unstable) Allow loading dynamic libraries. Optionally specify allowed directories or files]' \ -'*--deny-ffi=[(Unstable) Deny loading dynamic libraries. Optionally specify denied directories or files]' \ -'-I+[Allow importing from remote hosts. Optionally specify allowed IP addresses and host names, with ports as necessary. Default value\: deno.land\:443,jsr.io\:443,esm.sh\:443,cdn.jsdelivr.net\:443,raw.githubusercontent.com\:443,user.githubusercontent.com\:443]' \ -'--allow-import=[Allow importing from remote hosts. Optionally specify allowed IP addresses and host names, with ports as necessary. Default value\: deno.land\:443,jsr.io\:443,esm.sh\:443,cdn.jsdelivr.net\:443,raw.githubusercontent.com\:443,user.githubusercontent.com\:443]' \ -'*--allow-scripts=[Allow running npm lifecycle scripts for the given packages Note\: Scripts will only be executed when using a node_modules directory (\`--node-modules-dir\`)]' \ -'--frozen=[Error out if lockfile is out of date]' \ -'--location=[Value of globalThis.location used by some web APIs]:HREF:_urls' \ -'--v8-flags=[To see a list of all available flags use --v8-flags=--help Flags can also be set via the DENO_V8_FLAGS environment variable. Any flags set with this flag are appended after the DENO_V8_FLAGS environment variable]' \ -'--seed=[Set the random number generator seed]:NUMBER: ' \ -'--strace-ops=[Trace low-level op calls]' \ -'(--no-check)--check=[Set type-checking behavior. This subcommand type-checks local modules by default, so adding --check is redundant If the value of "all" is supplied, remote modules will be included. Alternatively, the '\''deno check'\'' subcommand can be used]' \ -'*--include=[Includes an additional module in the compiled executable'\''s module graph. Use this flag if a dynamically imported module or a web worker main module fails to load in the executable. This flag can be passed multiple times, to include multiple additional modules.]: :_files' \ -'-o+[Output file (defaults to \$PWD/)]: :_files' \ -'--output=[Output file (defaults to \$PWD/)]: :_files' \ -'--target=[Target OS architecture]: :(x86_64-unknown-linux-gnu aarch64-unknown-linux-gnu x86_64-pc-windows-msvc x86_64-apple-darwin aarch64-apple-darwin)' \ -'--icon=[Set the icon of the executable on Windows (.ico)]: : ' \ -'--ext=[Set content type of the supplied file]: :(ts tsx js jsx)' \ -'--env-file=[Load environment variables from local file Only the first environment variable with a given key is used. Existing process environment variables are not overwritten.]' \ -'--unstable[Enable all unstable features and APIs. Instead of using this flag, consider enabling individual unstable features To view the list of individual unstable feature flags, run this command again with --help=unstable]' \ -'--unstable-bare-node-builtins[Enable unstable bare node builtins feature]' \ -'--unstable-detect-cjs[Reads the package.json type field in a project to treat .js files as .cjs]' \ -'--unstable-byonm[]' \ -'--unstable-sloppy-imports[Enable unstable resolving of specifiers by extension probing, .js to .ts, and directory probing]' \ -'--unstable-broadcast-channel[Enable unstable \`BroadcastChannel\` API]' \ -'--unstable-cron[Enable unstable Deno.cron API]' \ -'--unstable-ffi[Enable unstable FFI APIs]' \ -'--unstable-fs[Enable unstable file system APIs]' \ -'--unstable-http[Enable unstable HTTP APIs]' \ -'--unstable-kv[Enable unstable Key-Value store APIs]' \ -'--unstable-net[Enable unstable net APIs]' \ -'--unstable-process[Enable unstable process APIs]' \ -'--unstable-temporal[Enable unstable Temporal API]' \ -'--unstable-unsafe-proto[Enable unsafe __proto__ support. This is a security risk.]' \ -'--unstable-webgpu[Enable unstable \`WebGPU\` APIs]' \ -'--unstable-worker-options[Enable unstable Web Worker APIs]' \ -'-q[Suppress diagnostic output]' \ -'--quiet[Suppress diagnostic output]' \ -'--no-remote[Do not resolve remote modules]' \ -'--no-npm[Do not resolve npm modules]' \ -'(-c --config)--no-config[Disable automatic loading of the configuration file]' \ -'(--lock)--no-lock[Disable auto discovery of the lock file]' \ -'(-R --allow-read -W --allow-write -N --allow-net -E --allow-env --allow-run -S --allow-sys --allow-ffi -I --allow-import)-A[Allow all permissions]' \ -'(-R --allow-read -W --allow-write -N --allow-net -E --allow-env --allow-run -S --allow-sys --allow-ffi -I --allow-import)--allow-all[Allow all permissions]' \ -'--allow-hrtime[REMOVED in Deno 2.0]' \ -'--deny-hrtime[REMOVED in Deno 2.0]' \ -'--no-prompt[Always throw if required permission wasn'\''t passed]' \ -'--cached-only[Require that remote dependencies are already cached]' \ -'--enable-testing-features-do-not-use[INTERNAL\: Enable internal features used during integration testing]' \ -'--no-terminal[Hide terminal on Windows]' \ -'*::script_arg -- Script arg:_files' \ -&& ret=0 -;; -(completions) -_arguments "${_arguments_options[@]}" : \ -'*-h+[]' \ -'*--help=[]' \ -'-L+[Set log level]: :(trace debug info)' \ -'--log-level=[Set log level]: :(trace debug info)' \ -'--unstable[Enable all unstable features and APIs. Instead of using this flag, consider enabling individual unstable features To view the list of individual unstable feature flags, run this command again with --help=unstable]' \ -'--unstable-bare-node-builtins[Enable unstable bare node builtins feature]' \ -'--unstable-detect-cjs[Reads the package.json type field in a project to treat .js files as .cjs]' \ -'--unstable-byonm[]' \ -'--unstable-sloppy-imports[Enable unstable resolving of specifiers by extension probing, .js to .ts, and directory probing]' \ -'--unstable-broadcast-channel[Enable unstable \`BroadcastChannel\` API]' \ -'--unstable-cron[Enable unstable Deno.cron API]' \ -'--unstable-ffi[Enable unstable FFI APIs]' \ -'--unstable-fs[Enable unstable file system APIs]' \ -'--unstable-http[Enable unstable HTTP APIs]' \ -'--unstable-kv[Enable unstable Key-Value store APIs]' \ -'--unstable-net[Enable unstable net APIs]' \ -'--unstable-process[Enable unstable process APIs]' \ -'--unstable-temporal[Enable unstable Temporal API]' \ -'--unstable-unsafe-proto[Enable unsafe __proto__ support. This is a security risk.]' \ -'--unstable-webgpu[Enable unstable \`WebGPU\` APIs]' \ -'--unstable-worker-options[Enable unstable Web Worker APIs]' \ -'-q[Suppress diagnostic output]' \ -'--quiet[Suppress diagnostic output]' \ -'::shell:(bash fish powershell zsh fig)' \ -&& ret=0 -;; -(coverage) -_arguments "${_arguments_options[@]}" : \ -'*-h+[]' \ -'*--help=[]' \ -'-L+[Set log level]: :(trace debug info)' \ -'--log-level=[Set log level]: :(trace debug info)' \ -'*--ignore=[Ignore coverage files]: :_files' \ -'*--include=[Include source files in the report]:regex: ' \ -'*--exclude=[Exclude source files from the report]:regex: ' \ -'--output=[Exports the coverage report in lcov format to the given file. If no --output arg is specified then the report is written to stdout.]: :_files' \ -'--unstable[Enable all unstable features and APIs. Instead of using this flag, consider enabling individual unstable features To view the list of individual unstable feature flags, run this command again with --help=unstable]' \ -'--unstable-bare-node-builtins[Enable unstable bare node builtins feature]' \ -'--unstable-detect-cjs[Reads the package.json type field in a project to treat .js files as .cjs]' \ -'--unstable-byonm[]' \ -'--unstable-sloppy-imports[Enable unstable resolving of specifiers by extension probing, .js to .ts, and directory probing]' \ -'--unstable-broadcast-channel[Enable unstable \`BroadcastChannel\` API]' \ -'--unstable-cron[Enable unstable Deno.cron API]' \ -'--unstable-ffi[Enable unstable FFI APIs]' \ -'--unstable-fs[Enable unstable file system APIs]' \ -'--unstable-http[Enable unstable HTTP APIs]' \ -'--unstable-kv[Enable unstable Key-Value store APIs]' \ -'--unstable-net[Enable unstable net APIs]' \ -'--unstable-process[Enable unstable process APIs]' \ -'--unstable-temporal[Enable unstable Temporal API]' \ -'--unstable-unsafe-proto[Enable unsafe __proto__ support. This is a security risk.]' \ -'--unstable-webgpu[Enable unstable \`WebGPU\` APIs]' \ -'--unstable-worker-options[Enable unstable Web Worker APIs]' \ -'-q[Suppress diagnostic output]' \ -'--quiet[Suppress diagnostic output]' \ -'--lcov[Output coverage report in lcov format]' \ -'--html[Output coverage report in HTML format in the given directory]' \ -'--detailed[Output coverage report in detailed format in the terminal]' \ -'*::files:_files' \ -&& ret=0 -;; -(doc) -_arguments "${_arguments_options[@]}" : \ -'*-h+[]' \ -'*--help=[]' \ -'-L+[Set log level]: :(trace debug info)' \ -'--log-level=[Set log level]: :(trace debug info)' \ -'--import-map=[Load import map file from local file or remote URL Docs\: https\://docs.deno.com/runtime/manual/basics/import_maps]:FILE:_files' \ -'*-r+[Reload source code cache (recompile TypeScript) no value Reload everything jsr\:@std/http/file-server,jsr\:@std/assert/assert-equals Reloads specific modules npm\: Reload all npm modules npm\:chalk Reload specific npm module]' \ -'*--reload=[Reload source code cache (recompile TypeScript) no value Reload everything jsr\:@std/http/file-server,jsr\:@std/assert/assert-equals Reloads specific modules npm\: Reload all npm modules npm\:chalk Reload specific npm module]' \ -'--lock=[Check the specified lock file. (If value is not provided, defaults to "./deno.lock")]' \ -'-I+[Allow importing from remote hosts. Optionally specify allowed IP addresses and host names, with ports as necessary. Default value\: deno.land\:443,jsr.io\:443,esm.sh\:443,cdn.jsdelivr.net\:443,raw.githubusercontent.com\:443,user.githubusercontent.com\:443]' \ -'--allow-import=[Allow importing from remote hosts. Optionally specify allowed IP addresses and host names, with ports as necessary. Default value\: deno.land\:443,jsr.io\:443,esm.sh\:443,cdn.jsdelivr.net\:443,raw.githubusercontent.com\:443,user.githubusercontent.com\:443]' \ -'--name=[The name that will be used in the docs (ie for breadcrumbs)]: : ' \ -'--category-docs=[Path to a JSON file keyed by category and an optional value of a markdown doc]: : ' \ -'--symbol-redirect-map=[Path to a JSON file keyed by file, with an inner map of symbol to an external link]: : ' \ -'--default-symbol-map=[Uses the provided mapping of default name to wanted name for usage blocks]: : ' \ -'--output=[Directory for HTML documentation output]: :_files -/' \ -'(--json --lint --html)--filter=[Dot separated path to symbol]: : ' \ -'--unstable[Enable all unstable features and APIs. Instead of using this flag, consider enabling individual unstable features To view the list of individual unstable feature flags, run this command again with --help=unstable]' \ -'--unstable-bare-node-builtins[Enable unstable bare node builtins feature]' \ -'--unstable-detect-cjs[Reads the package.json type field in a project to treat .js files as .cjs]' \ -'--unstable-byonm[]' \ -'--unstable-sloppy-imports[Enable unstable resolving of specifiers by extension probing, .js to .ts, and directory probing]' \ -'--unstable-broadcast-channel[Enable unstable \`BroadcastChannel\` API]' \ -'--unstable-cron[Enable unstable Deno.cron API]' \ -'--unstable-ffi[Enable unstable FFI APIs]' \ -'--unstable-fs[Enable unstable file system APIs]' \ -'--unstable-http[Enable unstable HTTP APIs]' \ -'--unstable-kv[Enable unstable Key-Value store APIs]' \ -'--unstable-net[Enable unstable net APIs]' \ -'--unstable-process[Enable unstable process APIs]' \ -'--unstable-temporal[Enable unstable Temporal API]' \ -'--unstable-unsafe-proto[Enable unsafe __proto__ support. This is a security risk.]' \ -'--unstable-webgpu[Enable unstable \`WebGPU\` APIs]' \ -'--unstable-worker-options[Enable unstable Web Worker APIs]' \ -'-q[Suppress diagnostic output]' \ -'--quiet[Suppress diagnostic output]' \ -'(--lock)--no-lock[Disable auto discovery of the lock file]' \ -'--no-npm[Do not resolve npm modules]' \ -'--no-remote[Do not resolve remote modules]' \ -'--json[Output documentation in JSON format]' \ -'(--json)--html[Output documentation in HTML format]' \ -'--strip-trailing-html[Remove trailing .html from various links. Will still generate files with a .html extension]' \ -'--private[Output private documentation]' \ -'--lint[Output documentation diagnostics.]' \ -'*::source_file:_files' \ -&& ret=0 -;; -(eval) -_arguments "${_arguments_options[@]}" : \ -'*-h+[]' \ -'*--help=[]' \ -'-L+[Set log level]: :(trace debug info)' \ -'--log-level=[Set log level]: :(trace debug info)' \ -'--no-check=[Skip type-checking. If the value of "remote" is supplied, diagnostic errors from remote modules will be ignored]' \ -'--import-map=[Load import map file from local file or remote URL Docs\: https\://docs.deno.com/runtime/manual/basics/import_maps]:FILE:_files' \ -'--node-modules-dir=[Sets the node modules management mode for npm packages]' \ -'--vendor=[Toggles local vendor folder usage for remote modules and a node_modules folder for npm packages]' \ -'-c+[Configure different aspects of deno including TypeScript, linting, and code formatting Typically the configuration file will be called \`deno.json\` or \`deno.jsonc\` and automatically detected; in that case this flag is not necessary. Docs\: https\://docs.deno.com/go/config]:FILE:_files' \ -'--config=[Configure different aspects of deno including TypeScript, linting, and code formatting Typically the configuration file will be called \`deno.json\` or \`deno.jsonc\` and automatically detected; in that case this flag is not necessary. Docs\: https\://docs.deno.com/go/config]:FILE:_files' \ -'*-r+[Reload source code cache (recompile TypeScript) no value Reload everything jsr\:@std/http/file-server,jsr\:@std/assert/assert-equals Reloads specific modules npm\: Reload all npm modules npm\:chalk Reload specific npm module]' \ -'*--reload=[Reload source code cache (recompile TypeScript) no value Reload everything jsr\:@std/http/file-server,jsr\:@std/assert/assert-equals Reloads specific modules npm\: Reload all npm modules npm\:chalk Reload specific npm module]' \ -'--lock=[Check the specified lock file. (If value is not provided, defaults to "./deno.lock")]' \ -'--cert=[Load certificate authority from PEM encoded file]:FILE:_files' \ -'--unsafely-ignore-certificate-errors=[DANGER\: Disables verification of TLS certificates]' \ -'--inspect=[Activate inspector on host\:port \[default\: 127.0.0.1\:9229\]]' \ -'--inspect-brk=[Activate inspector on host\:port, wait for debugger to connect and break at the start of user script]' \ -'--inspect-wait=[Activate inspector on host\:port and wait for debugger to connect before running user code]' \ -'*--allow-scripts=[Allow running npm lifecycle scripts for the given packages Note\: Scripts will only be executed when using a node_modules directory (\`--node-modules-dir\`)]' \ -'--frozen=[Error out if lockfile is out of date]' \ -'--location=[Value of globalThis.location used by some web APIs]:HREF:_urls' \ -'--v8-flags=[To see a list of all available flags use --v8-flags=--help Flags can also be set via the DENO_V8_FLAGS environment variable. Any flags set with this flag are appended after the DENO_V8_FLAGS environment variable]' \ -'--seed=[Set the random number generator seed]:NUMBER: ' \ -'--strace-ops=[Trace low-level op calls]' \ -'(--no-check)--check=[Enable type-checking. This subcommand does not type-check by default If the value of "all" is supplied, remote modules will be included. Alternatively, the '\''deno check'\'' subcommand can be used]' \ -'--ext=[Set content type of the supplied file]: :(ts tsx js jsx)' \ -'--env-file=[Load environment variables from local file Only the first environment variable with a given key is used. Existing process environment variables are not overwritten.]' \ -'--unstable[Enable all unstable features and APIs. Instead of using this flag, consider enabling individual unstable features To view the list of individual unstable feature flags, run this command again with --help=unstable]' \ -'--unstable-bare-node-builtins[Enable unstable bare node builtins feature]' \ -'--unstable-detect-cjs[Reads the package.json type field in a project to treat .js files as .cjs]' \ -'--unstable-byonm[]' \ -'--unstable-sloppy-imports[Enable unstable resolving of specifiers by extension probing, .js to .ts, and directory probing]' \ -'--unstable-broadcast-channel[Enable unstable \`BroadcastChannel\` API]' \ -'--unstable-cron[Enable unstable Deno.cron API]' \ -'--unstable-ffi[Enable unstable FFI APIs]' \ -'--unstable-fs[Enable unstable file system APIs]' \ -'--unstable-http[Enable unstable HTTP APIs]' \ -'--unstable-kv[Enable unstable Key-Value store APIs]' \ -'--unstable-net[Enable unstable net APIs]' \ -'--unstable-process[Enable unstable process APIs]' \ -'--unstable-temporal[Enable unstable Temporal API]' \ -'--unstable-unsafe-proto[Enable unsafe __proto__ support. This is a security risk.]' \ -'--unstable-webgpu[Enable unstable \`WebGPU\` APIs]' \ -'--unstable-worker-options[Enable unstable Web Worker APIs]' \ -'-q[Suppress diagnostic output]' \ -'--quiet[Suppress diagnostic output]' \ -'--no-remote[Do not resolve remote modules]' \ -'--no-npm[Do not resolve npm modules]' \ -'(-c --config)--no-config[Disable automatic loading of the configuration file]' \ -'(--lock)--no-lock[Disable auto discovery of the lock file]' \ -'--cached-only[Require that remote dependencies are already cached]' \ -'--enable-testing-features-do-not-use[INTERNAL\: Enable internal features used during integration testing]' \ -'-p[print result to stdout]' \ -'--print[print result to stdout]' \ -'*::code_arg -- Code to evaluate:' \ -&& ret=0 -;; -(fmt) -_arguments "${_arguments_options[@]}" : \ -'*-h+[]' \ -'*--help=[]' \ -'-L+[Set log level]: :(trace debug info)' \ -'--log-level=[Set log level]: :(trace debug info)' \ -'-c+[Configure different aspects of deno including TypeScript, linting, and code formatting Typically the configuration file will be called \`deno.json\` or \`deno.jsonc\` and automatically detected; in that case this flag is not necessary. Docs\: https\://docs.deno.com/go/config]:FILE:_files' \ -'--config=[Configure different aspects of deno including TypeScript, linting, and code formatting Typically the configuration file will be called \`deno.json\` or \`deno.jsonc\` and automatically detected; in that case this flag is not necessary. Docs\: https\://docs.deno.com/go/config]:FILE:_files' \ -'--ext=[Set content type of the supplied file]: :(ts tsx js jsx md json jsonc css scss sass less html svelte vue astro yml yaml ipynb)' \ -'*--ignore=[Ignore formatting particular source files]: :_files' \ -'*--watch-exclude=[Exclude provided files/patterns from watch mode]' \ -'--use-tabs=[Use tabs instead of spaces for indentation \[default\: false\]]' \ -'--line-width=[Define maximum line width \[default\: 80\]]: : ' \ -'--indent-width=[Define indentation width \[default\: 2\]]: : ' \ -'--single-quote=[Use single quotes \[default\: false\]]' \ -'--prose-wrap=[Define how prose should be wrapped \[default\: always\]]: :(always never preserve)' \ -'--no-semicolons=[Don'\''t use semicolons except where necessary \[default\: false\]]' \ -'--unstable[Enable all unstable features and APIs. Instead of using this flag, consider enabling individual unstable features To view the list of individual unstable feature flags, run this command again with --help=unstable]' \ -'--unstable-bare-node-builtins[Enable unstable bare node builtins feature]' \ -'--unstable-detect-cjs[Reads the package.json type field in a project to treat .js files as .cjs]' \ -'--unstable-byonm[]' \ -'--unstable-sloppy-imports[Enable unstable resolving of specifiers by extension probing, .js to .ts, and directory probing]' \ -'--unstable-broadcast-channel[Enable unstable \`BroadcastChannel\` API]' \ -'--unstable-cron[Enable unstable Deno.cron API]' \ -'--unstable-ffi[Enable unstable FFI APIs]' \ -'--unstable-fs[Enable unstable file system APIs]' \ -'--unstable-http[Enable unstable HTTP APIs]' \ -'--unstable-kv[Enable unstable Key-Value store APIs]' \ -'--unstable-net[Enable unstable net APIs]' \ -'--unstable-process[Enable unstable process APIs]' \ -'--unstable-temporal[Enable unstable Temporal API]' \ -'--unstable-unsafe-proto[Enable unsafe __proto__ support. This is a security risk.]' \ -'--unstable-webgpu[Enable unstable \`WebGPU\` APIs]' \ -'--unstable-worker-options[Enable unstable Web Worker APIs]' \ -'-q[Suppress diagnostic output]' \ -'--quiet[Suppress diagnostic output]' \ -'(-c --config)--no-config[Disable automatic loading of the configuration file]' \ -'--check[Check if the source files are formatted]' \ -'--watch[Watch for file changes and restart process automatically. Only local files from entry point module graph are watched.]' \ -'--no-clear-screen[Do not clear terminal screen when under watch mode]' \ -'--unstable-css[Enable formatting CSS, SCSS, Sass and Less files]' \ -'--unstable-html[Enable formatting HTML files]' \ -'--unstable-component[Enable formatting Svelte, Vue, Astro and Angular files]' \ -'--unstable-yaml[Enable formatting YAML files]' \ -'*::files:_files' \ -&& ret=0 -;; -(init) -_arguments "${_arguments_options[@]}" : \ -'*-h+[]' \ -'*--help=[]' \ -'-L+[Set log level]: :(trace debug info)' \ -'--log-level=[Set log level]: :(trace debug info)' \ -'--unstable[Enable all unstable features and APIs. Instead of using this flag, consider enabling individual unstable features To view the list of individual unstable feature flags, run this command again with --help=unstable]' \ -'--unstable-bare-node-builtins[Enable unstable bare node builtins feature]' \ -'--unstable-detect-cjs[Reads the package.json type field in a project to treat .js files as .cjs]' \ -'--unstable-byonm[]' \ -'--unstable-sloppy-imports[Enable unstable resolving of specifiers by extension probing, .js to .ts, and directory probing]' \ -'--unstable-broadcast-channel[Enable unstable \`BroadcastChannel\` API]' \ -'--unstable-cron[Enable unstable Deno.cron API]' \ -'--unstable-ffi[Enable unstable FFI APIs]' \ -'--unstable-fs[Enable unstable file system APIs]' \ -'--unstable-http[Enable unstable HTTP APIs]' \ -'--unstable-kv[Enable unstable Key-Value store APIs]' \ -'--unstable-net[Enable unstable net APIs]' \ -'--unstable-process[Enable unstable process APIs]' \ -'--unstable-temporal[Enable unstable Temporal API]' \ -'--unstable-unsafe-proto[Enable unsafe __proto__ support. This is a security risk.]' \ -'--unstable-webgpu[Enable unstable \`WebGPU\` APIs]' \ -'--unstable-worker-options[Enable unstable Web Worker APIs]' \ -'-q[Suppress diagnostic output]' \ -'--quiet[Suppress diagnostic output]' \ -'--lib[Generate an example library project]' \ -'(--lib)--serve[Generate an example project for \`deno serve\`]' \ -'::dir:_files -/' \ -&& ret=0 -;; -(info) -_arguments "${_arguments_options[@]}" : \ -'-I+[Allow importing from remote hosts. Optionally specify allowed IP addresses and host names, with ports as necessary. Default value\: deno.land\:443,jsr.io\:443,esm.sh\:443,cdn.jsdelivr.net\:443,raw.githubusercontent.com\:443,user.githubusercontent.com\:443]' \ -'--allow-import=[Allow importing from remote hosts. Optionally specify allowed IP addresses and host names, with ports as necessary. Default value\: deno.land\:443,jsr.io\:443,esm.sh\:443,cdn.jsdelivr.net\:443,raw.githubusercontent.com\:443,user.githubusercontent.com\:443]' \ -'*-h+[]' \ -'*--help=[]' \ -'-L+[Set log level]: :(trace debug info)' \ -'--log-level=[Set log level]: :(trace debug info)' \ -'*-r+[Reload source code cache (recompile TypeScript) no value Reload everything jsr\:@std/http/file-server,jsr\:@std/assert/assert-equals Reloads specific modules npm\: Reload all npm modules npm\:chalk Reload specific npm module]' \ -'*--reload=[Reload source code cache (recompile TypeScript) no value Reload everything jsr\:@std/http/file-server,jsr\:@std/assert/assert-equals Reloads specific modules npm\: Reload all npm modules npm\:chalk Reload specific npm module]' \ -'--cert=[Load certificate authority from PEM encoded file]:FILE:_files' \ -'--unsafely-ignore-certificate-errors=[DANGER\: Disables verification of TLS certificates]' \ -'()--location=[Show files used for origin bound APIs like the Web Storage API when running a script with --location=]:HREF:_urls' \ -'--no-check=[Skip type-checking. If the value of "remote" is supplied, diagnostic errors from remote modules will be ignored]' \ -'--lock=[Check the specified lock file. (If value is not provided, defaults to "./deno.lock")]' \ -'-c+[Configure different aspects of deno including TypeScript, linting, and code formatting Typically the configuration file will be called \`deno.json\` or \`deno.jsonc\` and automatically detected; in that case this flag is not necessary. Docs\: https\://docs.deno.com/go/config]:FILE:_files' \ -'--config=[Configure different aspects of deno including TypeScript, linting, and code formatting Typically the configuration file will be called \`deno.json\` or \`deno.jsonc\` and automatically detected; in that case this flag is not necessary. Docs\: https\://docs.deno.com/go/config]:FILE:_files' \ -'--import-map=[Load import map file from local file or remote URL Docs\: https\://docs.deno.com/runtime/manual/basics/import_maps]:FILE:_files' \ -'--node-modules-dir=[Sets the node modules management mode for npm packages]' \ -'--vendor=[Toggles local vendor folder usage for remote modules and a node_modules folder for npm packages]' \ -'--unstable[Enable all unstable features and APIs. Instead of using this flag, consider enabling individual unstable features To view the list of individual unstable feature flags, run this command again with --help=unstable]' \ -'--unstable-bare-node-builtins[Enable unstable bare node builtins feature]' \ -'--unstable-detect-cjs[Reads the package.json type field in a project to treat .js files as .cjs]' \ -'--unstable-byonm[]' \ -'--unstable-sloppy-imports[Enable unstable resolving of specifiers by extension probing, .js to .ts, and directory probing]' \ -'--unstable-broadcast-channel[Enable unstable \`BroadcastChannel\` API]' \ -'--unstable-cron[Enable unstable Deno.cron API]' \ -'--unstable-ffi[Enable unstable FFI APIs]' \ -'--unstable-fs[Enable unstable file system APIs]' \ -'--unstable-http[Enable unstable HTTP APIs]' \ -'--unstable-kv[Enable unstable Key-Value store APIs]' \ -'--unstable-net[Enable unstable net APIs]' \ -'--unstable-process[Enable unstable process APIs]' \ -'--unstable-temporal[Enable unstable Temporal API]' \ -'--unstable-unsafe-proto[Enable unsafe __proto__ support. This is a security risk.]' \ -'--unstable-webgpu[Enable unstable \`WebGPU\` APIs]' \ -'--unstable-worker-options[Enable unstable Web Worker APIs]' \ -'-q[Suppress diagnostic output]' \ -'--quiet[Suppress diagnostic output]' \ -'(-c --config)--no-config[Disable automatic loading of the configuration file]' \ -'--no-remote[Do not resolve remote modules]' \ -'--no-npm[Do not resolve npm modules]' \ -'(--lock)--no-lock[Disable auto discovery of the lock file]' \ -'--json[UNSTABLE\: Outputs the information in JSON format]' \ -'::file:_files' \ -&& ret=0 -;; -(install) -_arguments "${_arguments_options[@]}" : \ -'*-h+[]' \ -'*--help=[]' \ -'-L+[Set log level]: :(trace debug info)' \ -'--log-level=[Set log level]: :(trace debug info)' \ -'--no-check=[Skip type-checking. If the value of "remote" is supplied, diagnostic errors from remote modules will be ignored]' \ -'--import-map=[Load import map file from local file or remote URL Docs\: https\://docs.deno.com/runtime/manual/basics/import_maps]:FILE:_files' \ -'--node-modules-dir=[Sets the node modules management mode for npm packages]' \ -'--vendor=[Toggles local vendor folder usage for remote modules and a node_modules folder for npm packages]' \ -'-c+[Configure different aspects of deno including TypeScript, linting, and code formatting Typically the configuration file will be called \`deno.json\` or \`deno.jsonc\` and automatically detected; in that case this flag is not necessary. Docs\: https\://docs.deno.com/go/config]:FILE:_files' \ -'--config=[Configure different aspects of deno including TypeScript, linting, and code formatting Typically the configuration file will be called \`deno.json\` or \`deno.jsonc\` and automatically detected; in that case this flag is not necessary. Docs\: https\://docs.deno.com/go/config]:FILE:_files' \ -'*-r+[Reload source code cache (recompile TypeScript) no value Reload everything jsr\:@std/http/file-server,jsr\:@std/assert/assert-equals Reloads specific modules npm\: Reload all npm modules npm\:chalk Reload specific npm module]' \ -'*--reload=[Reload source code cache (recompile TypeScript) no value Reload everything jsr\:@std/http/file-server,jsr\:@std/assert/assert-equals Reloads specific modules npm\: Reload all npm modules npm\:chalk Reload specific npm module]' \ -'--lock=[Check the specified lock file. (If value is not provided, defaults to "./deno.lock")]' \ -'--cert=[Load certificate authority from PEM encoded file]:FILE:_files' \ -'--unsafely-ignore-certificate-errors=[DANGER\: Disables verification of TLS certificates]' \ -'--inspect=[Activate inspector on host\:port \[default\: 127.0.0.1\:9229\]]' \ -'--inspect-brk=[Activate inspector on host\:port, wait for debugger to connect and break at the start of user script]' \ -'--inspect-wait=[Activate inspector on host\:port and wait for debugger to connect before running user code]' \ -'--frozen=[Error out if lockfile is out of date]' \ -'--location=[Value of globalThis.location used by some web APIs]:HREF:_urls' \ -'--v8-flags=[To see a list of all available flags use --v8-flags=--help Flags can also be set via the DENO_V8_FLAGS environment variable. Any flags set with this flag are appended after the DENO_V8_FLAGS environment variable]' \ -'--seed=[Set the random number generator seed]:NUMBER: ' \ -'--strace-ops=[Trace low-level op calls]' \ -'*-R+[Allow file system read access. Optionally specify allowed paths]' \ -'*--allow-read=[Allow file system read access. Optionally specify allowed paths]' \ -'*--deny-read=[Deny file system read access. Optionally specify denied paths]' \ -'*-W+[Allow file system write access. Optionally specify allowed paths]' \ -'*--allow-write=[Allow file system write access. Optionally specify allowed paths]' \ -'*--deny-write=[Deny file system write access. Optionally specify denied paths]' \ -'-N+[Allow network access. Optionally specify allowed IP addresses and host names, with ports as necessary]' \ -'--allow-net=[Allow network access. Optionally specify allowed IP addresses and host names, with ports as necessary]' \ -'--deny-net=[Deny network access. Optionally specify denied IP addresses and host names, with ports as necessary]' \ -'-E+[Allow access to system environment information. Optionally specify accessible environment variables]' \ -'--allow-env=[Allow access to system environment information. Optionally specify accessible environment variables]' \ -'--deny-env=[Deny access to system environment information. Optionally specify accessible environment variables]' \ -'-S+[Allow access to OS information. Optionally allow specific APIs by function name]' \ -'--allow-sys=[Allow access to OS information. Optionally allow specific APIs by function name]' \ -'--deny-sys=[Deny access to OS information. Optionally deny specific APIs by function name]' \ -'--allow-run=[Allow running subprocesses. Optionally specify allowed runnable program names]' \ -'--deny-run=[Deny running subprocesses. Optionally specify denied runnable program names]' \ -'*--allow-ffi=[(Unstable) Allow loading dynamic libraries. Optionally specify allowed directories or files]' \ -'*--deny-ffi=[(Unstable) Deny loading dynamic libraries. Optionally specify denied directories or files]' \ -'-I+[Allow importing from remote hosts. Optionally specify allowed IP addresses and host names, with ports as necessary. Default value\: deno.land\:443,jsr.io\:443,esm.sh\:443,cdn.jsdelivr.net\:443,raw.githubusercontent.com\:443,user.githubusercontent.com\:443]' \ -'--allow-import=[Allow importing from remote hosts. Optionally specify allowed IP addresses and host names, with ports as necessary. Default value\: deno.land\:443,jsr.io\:443,esm.sh\:443,cdn.jsdelivr.net\:443,raw.githubusercontent.com\:443,user.githubusercontent.com\:443]' \ -'(--no-check)--check=[Set type-checking behavior. This subcommand type-checks local modules by default, so adding --check is redundant If the value of "all" is supplied, remote modules will be included. Alternatively, the '\''deno check'\'' subcommand can be used]' \ -'*--allow-scripts=[Allow running npm lifecycle scripts for the given packages Note\: Scripts will only be executed when using a node_modules directory (\`--node-modules-dir\`)]' \ -'-n+[Executable file name]: : ' \ -'--name=[Executable file name]: : ' \ -'--root=[Installation root]: :_files -/' \ -'--env-file=[Load environment variables from local file Only the first environment variable with a given key is used. Existing process environment variables are not overwritten.]' \ -'--unstable[Enable all unstable features and APIs. Instead of using this flag, consider enabling individual unstable features To view the list of individual unstable feature flags, run this command again with --help=unstable]' \ -'--unstable-bare-node-builtins[Enable unstable bare node builtins feature]' \ -'--unstable-detect-cjs[Reads the package.json type field in a project to treat .js files as .cjs]' \ -'--unstable-byonm[]' \ -'--unstable-sloppy-imports[Enable unstable resolving of specifiers by extension probing, .js to .ts, and directory probing]' \ -'--unstable-broadcast-channel[Enable unstable \`BroadcastChannel\` API]' \ -'--unstable-cron[Enable unstable Deno.cron API]' \ -'--unstable-ffi[Enable unstable FFI APIs]' \ -'--unstable-fs[Enable unstable file system APIs]' \ -'--unstable-http[Enable unstable HTTP APIs]' \ -'--unstable-kv[Enable unstable Key-Value store APIs]' \ -'--unstable-net[Enable unstable net APIs]' \ -'--unstable-process[Enable unstable process APIs]' \ -'--unstable-temporal[Enable unstable Temporal API]' \ -'--unstable-unsafe-proto[Enable unsafe __proto__ support. This is a security risk.]' \ -'--unstable-webgpu[Enable unstable \`WebGPU\` APIs]' \ -'--unstable-worker-options[Enable unstable Web Worker APIs]' \ -'-q[Suppress diagnostic output]' \ -'--quiet[Suppress diagnostic output]' \ -'--no-remote[Do not resolve remote modules]' \ -'--no-npm[Do not resolve npm modules]' \ -'(-c --config)--no-config[Disable automatic loading of the configuration file]' \ -'(--lock)--no-lock[Disable auto discovery of the lock file]' \ -'--cached-only[Require that remote dependencies are already cached]' \ -'--enable-testing-features-do-not-use[INTERNAL\: Enable internal features used during integration testing]' \ -'(-R --allow-read -W --allow-write -N --allow-net -E --allow-env --allow-run -S --allow-sys --allow-ffi -I --allow-import)-A[Allow all permissions]' \ -'(-R --allow-read -W --allow-write -N --allow-net -E --allow-env --allow-run -S --allow-sys --allow-ffi -I --allow-import)--allow-all[Allow all permissions]' \ -'--allow-hrtime[REMOVED in Deno 2.0]' \ -'--deny-hrtime[REMOVED in Deno 2.0]' \ -'--no-prompt[Always throw if required permission wasn'\''t passed]' \ -'-f[Forcefully overwrite existing installation]' \ -'--force[Forcefully overwrite existing installation]' \ -'-g[Install a package or script as a globally available executable]' \ -'--global[Install a package or script as a globally available executable]' \ -'(-g --global)-e[Install dependents of the specified entrypoint(s)]' \ -'(-g --global)--entrypoint[Install dependents of the specified entrypoint(s)]' \ -'(-e --entrypoint -g --global)-D[Add as a dev dependency]' \ -'(-e --entrypoint -g --global)--dev[Add as a dev dependency]' \ -'*::cmd:_files' \ -&& ret=0 -;; -(i) -_arguments "${_arguments_options[@]}" : \ -'*-h+[]' \ -'*--help=[]' \ -'-L+[Set log level]: :(trace debug info)' \ -'--log-level=[Set log level]: :(trace debug info)' \ -'--no-check=[Skip type-checking. If the value of "remote" is supplied, diagnostic errors from remote modules will be ignored]' \ -'--import-map=[Load import map file from local file or remote URL Docs\: https\://docs.deno.com/runtime/manual/basics/import_maps]:FILE:_files' \ -'--node-modules-dir=[Sets the node modules management mode for npm packages]' \ -'--vendor=[Toggles local vendor folder usage for remote modules and a node_modules folder for npm packages]' \ -'-c+[Configure different aspects of deno including TypeScript, linting, and code formatting Typically the configuration file will be called \`deno.json\` or \`deno.jsonc\` and automatically detected; in that case this flag is not necessary. Docs\: https\://docs.deno.com/go/config]:FILE:_files' \ -'--config=[Configure different aspects of deno including TypeScript, linting, and code formatting Typically the configuration file will be called \`deno.json\` or \`deno.jsonc\` and automatically detected; in that case this flag is not necessary. Docs\: https\://docs.deno.com/go/config]:FILE:_files' \ -'*-r+[Reload source code cache (recompile TypeScript) no value Reload everything jsr\:@std/http/file-server,jsr\:@std/assert/assert-equals Reloads specific modules npm\: Reload all npm modules npm\:chalk Reload specific npm module]' \ -'*--reload=[Reload source code cache (recompile TypeScript) no value Reload everything jsr\:@std/http/file-server,jsr\:@std/assert/assert-equals Reloads specific modules npm\: Reload all npm modules npm\:chalk Reload specific npm module]' \ -'--lock=[Check the specified lock file. (If value is not provided, defaults to "./deno.lock")]' \ -'--cert=[Load certificate authority from PEM encoded file]:FILE:_files' \ -'--unsafely-ignore-certificate-errors=[DANGER\: Disables verification of TLS certificates]' \ -'--inspect=[Activate inspector on host\:port \[default\: 127.0.0.1\:9229\]]' \ -'--inspect-brk=[Activate inspector on host\:port, wait for debugger to connect and break at the start of user script]' \ -'--inspect-wait=[Activate inspector on host\:port and wait for debugger to connect before running user code]' \ -'--frozen=[Error out if lockfile is out of date]' \ -'--location=[Value of globalThis.location used by some web APIs]:HREF:_urls' \ -'--v8-flags=[To see a list of all available flags use --v8-flags=--help Flags can also be set via the DENO_V8_FLAGS environment variable. Any flags set with this flag are appended after the DENO_V8_FLAGS environment variable]' \ -'--seed=[Set the random number generator seed]:NUMBER: ' \ -'--strace-ops=[Trace low-level op calls]' \ -'*-R+[Allow file system read access. Optionally specify allowed paths]' \ -'*--allow-read=[Allow file system read access. Optionally specify allowed paths]' \ -'*--deny-read=[Deny file system read access. Optionally specify denied paths]' \ -'*-W+[Allow file system write access. Optionally specify allowed paths]' \ -'*--allow-write=[Allow file system write access. Optionally specify allowed paths]' \ -'*--deny-write=[Deny file system write access. Optionally specify denied paths]' \ -'-N+[Allow network access. Optionally specify allowed IP addresses and host names, with ports as necessary]' \ -'--allow-net=[Allow network access. Optionally specify allowed IP addresses and host names, with ports as necessary]' \ -'--deny-net=[Deny network access. Optionally specify denied IP addresses and host names, with ports as necessary]' \ -'-E+[Allow access to system environment information. Optionally specify accessible environment variables]' \ -'--allow-env=[Allow access to system environment information. Optionally specify accessible environment variables]' \ -'--deny-env=[Deny access to system environment information. Optionally specify accessible environment variables]' \ -'-S+[Allow access to OS information. Optionally allow specific APIs by function name]' \ -'--allow-sys=[Allow access to OS information. Optionally allow specific APIs by function name]' \ -'--deny-sys=[Deny access to OS information. Optionally deny specific APIs by function name]' \ -'--allow-run=[Allow running subprocesses. Optionally specify allowed runnable program names]' \ -'--deny-run=[Deny running subprocesses. Optionally specify denied runnable program names]' \ -'*--allow-ffi=[(Unstable) Allow loading dynamic libraries. Optionally specify allowed directories or files]' \ -'*--deny-ffi=[(Unstable) Deny loading dynamic libraries. Optionally specify denied directories or files]' \ -'-I+[Allow importing from remote hosts. Optionally specify allowed IP addresses and host names, with ports as necessary. Default value\: deno.land\:443,jsr.io\:443,esm.sh\:443,cdn.jsdelivr.net\:443,raw.githubusercontent.com\:443,user.githubusercontent.com\:443]' \ -'--allow-import=[Allow importing from remote hosts. Optionally specify allowed IP addresses and host names, with ports as necessary. Default value\: deno.land\:443,jsr.io\:443,esm.sh\:443,cdn.jsdelivr.net\:443,raw.githubusercontent.com\:443,user.githubusercontent.com\:443]' \ -'(--no-check)--check=[Set type-checking behavior. This subcommand type-checks local modules by default, so adding --check is redundant If the value of "all" is supplied, remote modules will be included. Alternatively, the '\''deno check'\'' subcommand can be used]' \ -'*--allow-scripts=[Allow running npm lifecycle scripts for the given packages Note\: Scripts will only be executed when using a node_modules directory (\`--node-modules-dir\`)]' \ -'-n+[Executable file name]: : ' \ -'--name=[Executable file name]: : ' \ -'--root=[Installation root]: :_files -/' \ -'--env-file=[Load environment variables from local file Only the first environment variable with a given key is used. Existing process environment variables are not overwritten.]' \ -'--unstable[Enable all unstable features and APIs. Instead of using this flag, consider enabling individual unstable features To view the list of individual unstable feature flags, run this command again with --help=unstable]' \ -'--unstable-bare-node-builtins[Enable unstable bare node builtins feature]' \ -'--unstable-detect-cjs[Reads the package.json type field in a project to treat .js files as .cjs]' \ -'--unstable-byonm[]' \ -'--unstable-sloppy-imports[Enable unstable resolving of specifiers by extension probing, .js to .ts, and directory probing]' \ -'--unstable-broadcast-channel[Enable unstable \`BroadcastChannel\` API]' \ -'--unstable-cron[Enable unstable Deno.cron API]' \ -'--unstable-ffi[Enable unstable FFI APIs]' \ -'--unstable-fs[Enable unstable file system APIs]' \ -'--unstable-http[Enable unstable HTTP APIs]' \ -'--unstable-kv[Enable unstable Key-Value store APIs]' \ -'--unstable-net[Enable unstable net APIs]' \ -'--unstable-process[Enable unstable process APIs]' \ -'--unstable-temporal[Enable unstable Temporal API]' \ -'--unstable-unsafe-proto[Enable unsafe __proto__ support. This is a security risk.]' \ -'--unstable-webgpu[Enable unstable \`WebGPU\` APIs]' \ -'--unstable-worker-options[Enable unstable Web Worker APIs]' \ -'-q[Suppress diagnostic output]' \ -'--quiet[Suppress diagnostic output]' \ -'--no-remote[Do not resolve remote modules]' \ -'--no-npm[Do not resolve npm modules]' \ -'(-c --config)--no-config[Disable automatic loading of the configuration file]' \ -'(--lock)--no-lock[Disable auto discovery of the lock file]' \ -'--cached-only[Require that remote dependencies are already cached]' \ -'--enable-testing-features-do-not-use[INTERNAL\: Enable internal features used during integration testing]' \ -'(-R --allow-read -W --allow-write -N --allow-net -E --allow-env --allow-run -S --allow-sys --allow-ffi -I --allow-import)-A[Allow all permissions]' \ -'(-R --allow-read -W --allow-write -N --allow-net -E --allow-env --allow-run -S --allow-sys --allow-ffi -I --allow-import)--allow-all[Allow all permissions]' \ -'--allow-hrtime[REMOVED in Deno 2.0]' \ -'--deny-hrtime[REMOVED in Deno 2.0]' \ -'--no-prompt[Always throw if required permission wasn'\''t passed]' \ -'-f[Forcefully overwrite existing installation]' \ -'--force[Forcefully overwrite existing installation]' \ -'-g[Install a package or script as a globally available executable]' \ -'--global[Install a package or script as a globally available executable]' \ -'(-g --global)-e[Install dependents of the specified entrypoint(s)]' \ -'(-g --global)--entrypoint[Install dependents of the specified entrypoint(s)]' \ -'(-e --entrypoint -g --global)-D[Add as a dev dependency]' \ -'(-e --entrypoint -g --global)--dev[Add as a dev dependency]' \ -'*::cmd:_files' \ -&& ret=0 -;; -(json_reference) -_arguments "${_arguments_options[@]}" : \ -'*-h+[]' \ -'*--help=[]' \ -'-L+[Set log level]: :(trace debug info)' \ -'--log-level=[Set log level]: :(trace debug info)' \ -'-q[Suppress diagnostic output]' \ -'--quiet[Suppress diagnostic output]' \ -&& ret=0 -;; -(jupyter) -_arguments "${_arguments_options[@]}" : \ -'(--install)--conn=[Path to JSON file describing connection parameters, provided by Jupyter]: :_files' \ -'*-h+[]' \ -'*--help=[]' \ -'-L+[Set log level]: :(trace debug info)' \ -'--log-level=[Set log level]: :(trace debug info)' \ -'--unstable[Enable all unstable features and APIs. Instead of using this flag, consider enabling individual unstable features To view the list of individual unstable feature flags, run this command again with --help=unstable]' \ -'--unstable-bare-node-builtins[Enable unstable bare node builtins feature]' \ -'--unstable-detect-cjs[Reads the package.json type field in a project to treat .js files as .cjs]' \ -'--unstable-byonm[]' \ -'--unstable-sloppy-imports[Enable unstable resolving of specifiers by extension probing, .js to .ts, and directory probing]' \ -'--unstable-broadcast-channel[Enable unstable \`BroadcastChannel\` API]' \ -'--unstable-cron[Enable unstable Deno.cron API]' \ -'--unstable-ffi[Enable unstable FFI APIs]' \ -'--unstable-fs[Enable unstable file system APIs]' \ -'--unstable-http[Enable unstable HTTP APIs]' \ -'--unstable-kv[Enable unstable Key-Value store APIs]' \ -'--unstable-net[Enable unstable net APIs]' \ -'--unstable-process[Enable unstable process APIs]' \ -'--unstable-temporal[Enable unstable Temporal API]' \ -'--unstable-unsafe-proto[Enable unsafe __proto__ support. This is a security risk.]' \ -'--unstable-webgpu[Enable unstable \`WebGPU\` APIs]' \ -'--unstable-worker-options[Enable unstable Web Worker APIs]' \ -'(--kernel)--install[Installs kernelspec, requires '\''jupyter'\'' command to be available.]' \ -'(--install)--kernel[Start the kernel]' \ -'-q[Suppress diagnostic output]' \ -'--quiet[Suppress diagnostic output]' \ -&& ret=0 -;; -(uninstall) -_arguments "${_arguments_options[@]}" : \ -'*-h+[]' \ -'*--help=[]' \ -'-L+[Set log level]: :(trace debug info)' \ -'--log-level=[Set log level]: :(trace debug info)' \ -'--root=[Installation root]: :_files -/' \ -'--unstable[Enable all unstable features and APIs. Instead of using this flag, consider enabling individual unstable features To view the list of individual unstable feature flags, run this command again with --help=unstable]' \ -'--unstable-bare-node-builtins[Enable unstable bare node builtins feature]' \ -'--unstable-detect-cjs[Reads the package.json type field in a project to treat .js files as .cjs]' \ -'--unstable-byonm[]' \ -'--unstable-sloppy-imports[Enable unstable resolving of specifiers by extension probing, .js to .ts, and directory probing]' \ -'--unstable-broadcast-channel[Enable unstable \`BroadcastChannel\` API]' \ -'--unstable-cron[Enable unstable Deno.cron API]' \ -'--unstable-ffi[Enable unstable FFI APIs]' \ -'--unstable-fs[Enable unstable file system APIs]' \ -'--unstable-http[Enable unstable HTTP APIs]' \ -'--unstable-kv[Enable unstable Key-Value store APIs]' \ -'--unstable-net[Enable unstable net APIs]' \ -'--unstable-process[Enable unstable process APIs]' \ -'--unstable-temporal[Enable unstable Temporal API]' \ -'--unstable-unsafe-proto[Enable unsafe __proto__ support. This is a security risk.]' \ -'--unstable-webgpu[Enable unstable \`WebGPU\` APIs]' \ -'--unstable-worker-options[Enable unstable Web Worker APIs]' \ -'-q[Suppress diagnostic output]' \ -'--quiet[Suppress diagnostic output]' \ -'-g[Remove globally installed package or module]' \ -'--global[Remove globally installed package or module]' \ -'::name-or-package:' \ -'*::additional-packages -- List of additional packages to remove:' \ -&& ret=0 -;; -(lsp) -_arguments "${_arguments_options[@]}" : \ -'*-h+[]' \ -'*--help=[]' \ -'-L+[Set log level]: :(trace debug info)' \ -'--log-level=[Set log level]: :(trace debug info)' \ -'-q[Suppress diagnostic output]' \ -'--quiet[Suppress diagnostic output]' \ -&& ret=0 -;; -(lint) -_arguments "${_arguments_options[@]}" : \ -'*-h+[]' \ -'*--help=[]' \ -'-L+[Set log level]: :(trace debug info)' \ -'--log-level=[Set log level]: :(trace debug info)' \ -'--ext=[Specify the file extension to lint when reading from stdin.For example, use \`jsx\` to lint JSX files or \`tsx\` for TSX files.This argument is necessary because stdin input does not automatically infer the file type.Example usage\: \`cat file.jsx | deno lint - --ext=jsx\`.]:EXT: ' \ -'*--rules-tags=[Use set of rules with a tag]: : ' \ -'(--rules)--rules-include=[Include lint rules]: : ' \ -'(--rules)--rules-exclude=[Exclude lint rules]: : ' \ -'-c+[Configure different aspects of deno including TypeScript, linting, and code formatting Typically the configuration file will be called \`deno.json\` or \`deno.jsonc\` and automatically detected; in that case this flag is not necessary. Docs\: https\://docs.deno.com/go/config]:FILE:_files' \ -'--config=[Configure different aspects of deno including TypeScript, linting, and code formatting Typically the configuration file will be called \`deno.json\` or \`deno.jsonc\` and automatically detected; in that case this flag is not necessary. Docs\: https\://docs.deno.com/go/config]:FILE:_files' \ -'*--ignore=[Ignore linting particular source files]: :_files' \ -'*--watch-exclude=[Exclude provided files/patterns from watch mode]' \ -'--unstable[Enable all unstable features and APIs. Instead of using this flag, consider enabling individual unstable features To view the list of individual unstable feature flags, run this command again with --help=unstable]' \ -'--unstable-bare-node-builtins[Enable unstable bare node builtins feature]' \ -'--unstable-detect-cjs[Reads the package.json type field in a project to treat .js files as .cjs]' \ -'--unstable-byonm[]' \ -'--unstable-sloppy-imports[Enable unstable resolving of specifiers by extension probing, .js to .ts, and directory probing]' \ -'--unstable-broadcast-channel[Enable unstable \`BroadcastChannel\` API]' \ -'--unstable-cron[Enable unstable Deno.cron API]' \ -'--unstable-ffi[Enable unstable FFI APIs]' \ -'--unstable-fs[Enable unstable file system APIs]' \ -'--unstable-http[Enable unstable HTTP APIs]' \ -'--unstable-kv[Enable unstable Key-Value store APIs]' \ -'--unstable-net[Enable unstable net APIs]' \ -'--unstable-process[Enable unstable process APIs]' \ -'--unstable-temporal[Enable unstable Temporal API]' \ -'--unstable-unsafe-proto[Enable unsafe __proto__ support. This is a security risk.]' \ -'--unstable-webgpu[Enable unstable \`WebGPU\` APIs]' \ -'--unstable-worker-options[Enable unstable Web Worker APIs]' \ -'-q[Suppress diagnostic output]' \ -'--quiet[Suppress diagnostic output]' \ -'--fix[Fix any linting errors for rules that support it]' \ -'--rules[List available rules]' \ -'(-c --config)--no-config[Disable automatic loading of the configuration file]' \ -'--json[Output lint result in JSON format]' \ -'(--json)--compact[Output lint result in compact format]' \ -'--watch[Watch for file changes and restart process automatically. Only local files from entry point module graph are watched.]' \ -'--no-clear-screen[Do not clear terminal screen when under watch mode]' \ -'*::files:_files' \ -&& ret=0 -;; -(publish) -_arguments "${_arguments_options[@]}" : \ -'*-h+[]' \ -'*--help=[]' \ -'-L+[Set log level]: :(trace debug info)' \ -'--log-level=[Set log level]: :(trace debug info)' \ -'--token=[The API token to use when publishing. If unset, interactive authentication is be used]: : ' \ -'-c+[Configure different aspects of deno including TypeScript, linting, and code formatting Typically the configuration file will be called \`deno.json\` or \`deno.jsonc\` and automatically detected; in that case this flag is not necessary. Docs\: https\://docs.deno.com/go/config]:FILE:_files' \ -'--config=[Configure different aspects of deno including TypeScript, linting, and code formatting Typically the configuration file will be called \`deno.json\` or \`deno.jsonc\` and automatically detected; in that case this flag is not necessary. Docs\: https\://docs.deno.com/go/config]:FILE:_files' \ -'(--no-check)--check=[Set type-checking behavior. This subcommand type-checks local modules by default, so adding --check is redundant If the value of "all" is supplied, remote modules will be included. Alternatively, the '\''deno check'\'' subcommand can be used]' \ -'--no-check=[Skip type-checking. If the value of "remote" is supplied, diagnostic errors from remote modules will be ignored]' \ -'--unstable[Enable all unstable features and APIs. Instead of using this flag, consider enabling individual unstable features To view the list of individual unstable feature flags, run this command again with --help=unstable]' \ -'--unstable-bare-node-builtins[Enable unstable bare node builtins feature]' \ -'--unstable-detect-cjs[Reads the package.json type field in a project to treat .js files as .cjs]' \ -'--unstable-byonm[]' \ -'--unstable-sloppy-imports[Enable unstable resolving of specifiers by extension probing, .js to .ts, and directory probing]' \ -'--unstable-broadcast-channel[Enable unstable \`BroadcastChannel\` API]' \ -'--unstable-cron[Enable unstable Deno.cron API]' \ -'--unstable-ffi[Enable unstable FFI APIs]' \ -'--unstable-fs[Enable unstable file system APIs]' \ -'--unstable-http[Enable unstable HTTP APIs]' \ -'--unstable-kv[Enable unstable Key-Value store APIs]' \ -'--unstable-net[Enable unstable net APIs]' \ -'--unstable-process[Enable unstable process APIs]' \ -'--unstable-temporal[Enable unstable Temporal API]' \ -'--unstable-unsafe-proto[Enable unsafe __proto__ support. This is a security risk.]' \ -'--unstable-webgpu[Enable unstable \`WebGPU\` APIs]' \ -'--unstable-worker-options[Enable unstable Web Worker APIs]' \ -'-q[Suppress diagnostic output]' \ -'--quiet[Suppress diagnostic output]' \ -'(-c --config)--no-config[Disable automatic loading of the configuration file]' \ -'--dry-run[Prepare the package for publishing performing all checks and validations without uploading]' \ -'--allow-slow-types[Allow publishing with slow types]' \ -'--allow-dirty[Allow publishing if the repository has uncommitted changed]' \ -'--no-provenance[Disable provenance attestation. Enabled by default on Github actions, publicly links the package to where it was built and published from.]' \ -&& ret=0 -;; -(repl) -_arguments "${_arguments_options[@]}" : \ -'--env-file=[Load environment variables from local file Only the first environment variable with a given key is used. Existing process environment variables are not overwritten.]' \ -'*-h+[]' \ -'*--help=[]' \ -'-L+[Set log level]: :(trace debug info)' \ -'--log-level=[Set log level]: :(trace debug info)' \ -'--import-map=[Load import map file from local file or remote URL Docs\: https\://docs.deno.com/runtime/manual/basics/import_maps]:FILE:_files' \ -'--node-modules-dir=[Sets the node modules management mode for npm packages]' \ -'--vendor=[Toggles local vendor folder usage for remote modules and a node_modules folder for npm packages]' \ -'-c+[Configure different aspects of deno including TypeScript, linting, and code formatting Typically the configuration file will be called \`deno.json\` or \`deno.jsonc\` and automatically detected; in that case this flag is not necessary. Docs\: https\://docs.deno.com/go/config]:FILE:_files' \ -'--config=[Configure different aspects of deno including TypeScript, linting, and code formatting Typically the configuration file will be called \`deno.json\` or \`deno.jsonc\` and automatically detected; in that case this flag is not necessary. Docs\: https\://docs.deno.com/go/config]:FILE:_files' \ -'*-r+[Reload source code cache (recompile TypeScript) no value Reload everything jsr\:@std/http/file-server,jsr\:@std/assert/assert-equals Reloads specific modules npm\: Reload all npm modules npm\:chalk Reload specific npm module]' \ -'*--reload=[Reload source code cache (recompile TypeScript) no value Reload everything jsr\:@std/http/file-server,jsr\:@std/assert/assert-equals Reloads specific modules npm\: Reload all npm modules npm\:chalk Reload specific npm module]' \ -'--lock=[Check the specified lock file. (If value is not provided, defaults to "./deno.lock")]' \ -'--cert=[Load certificate authority from PEM encoded file]:FILE:_files' \ -'--unsafely-ignore-certificate-errors=[DANGER\: Disables verification of TLS certificates]' \ -'--inspect=[Activate inspector on host\:port \[default\: 127.0.0.1\:9229\]]' \ -'--inspect-brk=[Activate inspector on host\:port, wait for debugger to connect and break at the start of user script]' \ -'--inspect-wait=[Activate inspector on host\:port and wait for debugger to connect before running user code]' \ -'*-R+[Allow file system read access. Optionally specify allowed paths]' \ -'*--allow-read=[Allow file system read access. Optionally specify allowed paths]' \ -'*--deny-read=[Deny file system read access. Optionally specify denied paths]' \ -'*-W+[Allow file system write access. Optionally specify allowed paths]' \ -'*--allow-write=[Allow file system write access. Optionally specify allowed paths]' \ -'*--deny-write=[Deny file system write access. Optionally specify denied paths]' \ -'-N+[Allow network access. Optionally specify allowed IP addresses and host names, with ports as necessary]' \ -'--allow-net=[Allow network access. Optionally specify allowed IP addresses and host names, with ports as necessary]' \ -'--deny-net=[Deny network access. Optionally specify denied IP addresses and host names, with ports as necessary]' \ -'-E+[Allow access to system environment information. Optionally specify accessible environment variables]' \ -'--allow-env=[Allow access to system environment information. Optionally specify accessible environment variables]' \ -'--deny-env=[Deny access to system environment information. Optionally specify accessible environment variables]' \ -'-S+[Allow access to OS information. Optionally allow specific APIs by function name]' \ -'--allow-sys=[Allow access to OS information. Optionally allow specific APIs by function name]' \ -'--deny-sys=[Deny access to OS information. Optionally deny specific APIs by function name]' \ -'--allow-run=[Allow running subprocesses. Optionally specify allowed runnable program names]' \ -'--deny-run=[Deny running subprocesses. Optionally specify denied runnable program names]' \ -'*--allow-ffi=[(Unstable) Allow loading dynamic libraries. Optionally specify allowed directories or files]' \ -'*--deny-ffi=[(Unstable) Deny loading dynamic libraries. Optionally specify denied directories or files]' \ -'-I+[Allow importing from remote hosts. Optionally specify allowed IP addresses and host names, with ports as necessary. Default value\: deno.land\:443,jsr.io\:443,esm.sh\:443,cdn.jsdelivr.net\:443,raw.githubusercontent.com\:443,user.githubusercontent.com\:443]' \ -'--allow-import=[Allow importing from remote hosts. Optionally specify allowed IP addresses and host names, with ports as necessary. Default value\: deno.land\:443,jsr.io\:443,esm.sh\:443,cdn.jsdelivr.net\:443,raw.githubusercontent.com\:443,user.githubusercontent.com\:443]' \ -'--frozen=[Error out if lockfile is out of date]' \ -'--location=[Value of globalThis.location used by some web APIs]:HREF:_urls' \ -'--v8-flags=[To see a list of all available flags use --v8-flags=--help Flags can also be set via the DENO_V8_FLAGS environment variable. Any flags set with this flag are appended after the DENO_V8_FLAGS environment variable]' \ -'--seed=[Set the random number generator seed]:NUMBER: ' \ -'--strace-ops=[Trace low-level op calls]' \ -'*--eval-file=[Evaluates the provided file(s) as scripts when the REPL starts. Accepts file paths and URLs]: :_files' \ -'--eval=[Evaluates the provided code when the REPL starts]:code: ' \ -'--unstable[Enable all unstable features and APIs. Instead of using this flag, consider enabling individual unstable features To view the list of individual unstable feature flags, run this command again with --help=unstable]' \ -'--unstable-bare-node-builtins[Enable unstable bare node builtins feature]' \ -'--unstable-detect-cjs[Reads the package.json type field in a project to treat .js files as .cjs]' \ -'--unstable-byonm[]' \ -'--unstable-sloppy-imports[Enable unstable resolving of specifiers by extension probing, .js to .ts, and directory probing]' \ -'--unstable-broadcast-channel[Enable unstable \`BroadcastChannel\` API]' \ -'--unstable-cron[Enable unstable Deno.cron API]' \ -'--unstable-ffi[Enable unstable FFI APIs]' \ -'--unstable-fs[Enable unstable file system APIs]' \ -'--unstable-http[Enable unstable HTTP APIs]' \ -'--unstable-kv[Enable unstable Key-Value store APIs]' \ -'--unstable-net[Enable unstable net APIs]' \ -'--unstable-process[Enable unstable process APIs]' \ -'--unstable-temporal[Enable unstable Temporal API]' \ -'--unstable-unsafe-proto[Enable unsafe __proto__ support. This is a security risk.]' \ -'--unstable-webgpu[Enable unstable \`WebGPU\` APIs]' \ -'--unstable-worker-options[Enable unstable Web Worker APIs]' \ -'-q[Suppress diagnostic output]' \ -'--quiet[Suppress diagnostic output]' \ -'--no-remote[Do not resolve remote modules]' \ -'--no-npm[Do not resolve npm modules]' \ -'(-c --config)--no-config[Disable automatic loading of the configuration file]' \ -'(--lock)--no-lock[Disable auto discovery of the lock file]' \ -'(-R --allow-read -W --allow-write -N --allow-net -E --allow-env --allow-run -S --allow-sys --allow-ffi -I --allow-import)-A[Allow all permissions]' \ -'(-R --allow-read -W --allow-write -N --allow-net -E --allow-env --allow-run -S --allow-sys --allow-ffi -I --allow-import)--allow-all[Allow all permissions]' \ -'--allow-hrtime[REMOVED in Deno 2.0]' \ -'--deny-hrtime[REMOVED in Deno 2.0]' \ -'--no-prompt[Always throw if required permission wasn'\''t passed]' \ -'--cached-only[Require that remote dependencies are already cached]' \ -'--enable-testing-features-do-not-use[INTERNAL\: Enable internal features used during integration testing]' \ -'*::args:' \ -&& ret=0 -;; -(task) -_arguments "${_arguments_options[@]}" : \ -'*-h+[]' \ -'*--help=[]' \ -'-L+[Set log level]: :(trace debug info)' \ -'--log-level=[Set log level]: :(trace debug info)' \ -'-c+[Configure different aspects of deno including TypeScript, linting, and code formatting Typically the configuration file will be called \`deno.json\` or \`deno.jsonc\` and automatically detected; in that case this flag is not necessary. Docs\: https\://docs.deno.com/go/config]:FILE:_files' \ -'--config=[Configure different aspects of deno including TypeScript, linting, and code formatting Typically the configuration file will be called \`deno.json\` or \`deno.jsonc\` and automatically detected; in that case this flag is not necessary. Docs\: https\://docs.deno.com/go/config]:FILE:_files' \ -'--cwd=[Specify the directory to run the task in]:DIR:_files -/' \ -'--node-modules-dir=[Sets the node modules management mode for npm packages]' \ -'--unstable[Enable all unstable features and APIs. Instead of using this flag, consider enabling individual unstable features To view the list of individual unstable feature flags, run this command again with --help=unstable]' \ -'--unstable-bare-node-builtins[Enable unstable bare node builtins feature]' \ -'--unstable-detect-cjs[Reads the package.json type field in a project to treat .js files as .cjs]' \ -'--unstable-byonm[]' \ -'--unstable-sloppy-imports[Enable unstable resolving of specifiers by extension probing, .js to .ts, and directory probing]' \ -'--unstable-broadcast-channel[Enable unstable \`BroadcastChannel\` API]' \ -'--unstable-cron[Enable unstable Deno.cron API]' \ -'--unstable-ffi[Enable unstable FFI APIs]' \ -'--unstable-fs[Enable unstable file system APIs]' \ -'--unstable-http[Enable unstable HTTP APIs]' \ -'--unstable-kv[Enable unstable Key-Value store APIs]' \ -'--unstable-net[Enable unstable net APIs]' \ -'--unstable-process[Enable unstable process APIs]' \ -'--unstable-temporal[Enable unstable Temporal API]' \ -'--unstable-unsafe-proto[Enable unsafe __proto__ support. This is a security risk.]' \ -'--unstable-webgpu[Enable unstable \`WebGPU\` APIs]' \ -'--unstable-worker-options[Enable unstable Web Worker APIs]' \ -'-q[Suppress diagnostic output]' \ -'--quiet[Suppress diagnostic output]' \ -&& ret=0 -;; -(test) -_arguments "${_arguments_options[@]}" : \ -'*-h+[]' \ -'*--help=[]' \ -'-L+[Set log level]: :(trace debug info)' \ -'--log-level=[Set log level]: :(trace debug info)' \ -'--no-check=[Skip type-checking. If the value of "remote" is supplied, diagnostic errors from remote modules will be ignored]' \ -'--import-map=[Load import map file from local file or remote URL Docs\: https\://docs.deno.com/runtime/manual/basics/import_maps]:FILE:_files' \ -'--node-modules-dir=[Sets the node modules management mode for npm packages]' \ -'--vendor=[Toggles local vendor folder usage for remote modules and a node_modules folder for npm packages]' \ -'-c+[Configure different aspects of deno including TypeScript, linting, and code formatting Typically the configuration file will be called \`deno.json\` or \`deno.jsonc\` and automatically detected; in that case this flag is not necessary. Docs\: https\://docs.deno.com/go/config]:FILE:_files' \ -'--config=[Configure different aspects of deno including TypeScript, linting, and code formatting Typically the configuration file will be called \`deno.json\` or \`deno.jsonc\` and automatically detected; in that case this flag is not necessary. Docs\: https\://docs.deno.com/go/config]:FILE:_files' \ -'*-r+[Reload source code cache (recompile TypeScript) no value Reload everything jsr\:@std/http/file-server,jsr\:@std/assert/assert-equals Reloads specific modules npm\: Reload all npm modules npm\:chalk Reload specific npm module]' \ -'*--reload=[Reload source code cache (recompile TypeScript) no value Reload everything jsr\:@std/http/file-server,jsr\:@std/assert/assert-equals Reloads specific modules npm\: Reload all npm modules npm\:chalk Reload specific npm module]' \ -'--lock=[Check the specified lock file. (If value is not provided, defaults to "./deno.lock")]' \ -'--cert=[Load certificate authority from PEM encoded file]:FILE:_files' \ -'--unsafely-ignore-certificate-errors=[DANGER\: Disables verification of TLS certificates]' \ -'*-R+[Allow file system read access. Optionally specify allowed paths]' \ -'*--allow-read=[Allow file system read access. Optionally specify allowed paths]' \ -'*--deny-read=[Deny file system read access. Optionally specify denied paths]' \ -'*-W+[Allow file system write access. Optionally specify allowed paths]' \ -'*--allow-write=[Allow file system write access. Optionally specify allowed paths]' \ -'*--deny-write=[Deny file system write access. Optionally specify denied paths]' \ -'-N+[Allow network access. Optionally specify allowed IP addresses and host names, with ports as necessary]' \ -'--allow-net=[Allow network access. Optionally specify allowed IP addresses and host names, with ports as necessary]' \ -'--deny-net=[Deny network access. Optionally specify denied IP addresses and host names, with ports as necessary]' \ -'-E+[Allow access to system environment information. Optionally specify accessible environment variables]' \ -'--allow-env=[Allow access to system environment information. Optionally specify accessible environment variables]' \ -'--deny-env=[Deny access to system environment information. Optionally specify accessible environment variables]' \ -'-S+[Allow access to OS information. Optionally allow specific APIs by function name]' \ -'--allow-sys=[Allow access to OS information. Optionally allow specific APIs by function name]' \ -'--deny-sys=[Deny access to OS information. Optionally deny specific APIs by function name]' \ -'--allow-run=[Allow running subprocesses. Optionally specify allowed runnable program names]' \ -'--deny-run=[Deny running subprocesses. Optionally specify denied runnable program names]' \ -'*--allow-ffi=[(Unstable) Allow loading dynamic libraries. Optionally specify allowed directories or files]' \ -'*--deny-ffi=[(Unstable) Deny loading dynamic libraries. Optionally specify denied directories or files]' \ -'-I+[Allow importing from remote hosts. Optionally specify allowed IP addresses and host names, with ports as necessary. Default value\: deno.land\:443,jsr.io\:443,esm.sh\:443,cdn.jsdelivr.net\:443,raw.githubusercontent.com\:443,user.githubusercontent.com\:443]' \ -'--allow-import=[Allow importing from remote hosts. Optionally specify allowed IP addresses and host names, with ports as necessary. Default value\: deno.land\:443,jsr.io\:443,esm.sh\:443,cdn.jsdelivr.net\:443,raw.githubusercontent.com\:443,user.githubusercontent.com\:443]' \ -'--inspect=[Activate inspector on host\:port \[default\: 127.0.0.1\:9229\]]' \ -'--inspect-brk=[Activate inspector on host\:port, wait for debugger to connect and break at the start of user script]' \ -'--inspect-wait=[Activate inspector on host\:port and wait for debugger to connect before running user code]' \ -'*--allow-scripts=[Allow running npm lifecycle scripts for the given packages Note\: Scripts will only be executed when using a node_modules directory (\`--node-modules-dir\`)]' \ -'--frozen=[Error out if lockfile is out of date]' \ -'--location=[Value of globalThis.location used by some web APIs]:HREF:_urls' \ -'--v8-flags=[To see a list of all available flags use --v8-flags=--help Flags can also be set via the DENO_V8_FLAGS environment variable. Any flags set with this flag are appended after the DENO_V8_FLAGS environment variable]' \ -'--seed=[Set the random number generator seed]:NUMBER: ' \ -'--strace-ops=[Trace low-level op calls]' \ -'(--no-check)--check=[Set type-checking behavior. This subcommand type-checks local modules by default, so adding --check is redundant If the value of "all" is supplied, remote modules will be included. Alternatively, the '\''deno check'\'' subcommand can be used]' \ -'*--ignore=[Ignore files]: :_files' \ -'--fail-fast=[Stop after N errors. Defaults to stopping after first failure]' \ -'--filter=[Run tests with this string or regexp pattern in the test name]: : ' \ -'--shuffle=[Shuffle the order in which the tests are run]' \ -'(--inspect --inspect-wait --inspect-brk)--coverage=[Collect coverage profile data into DIR. If DIR is not specified, it uses '\''coverage/'\'']' \ -'(--no-run --coverage)*--watch=[Watch for file changes and restart process automatically. Local files from entry point module graph are watched by default. Additional paths might be watched by passing them as arguments to this flag.]' \ -'*--watch-exclude=[Exclude provided files/patterns from watch mode]' \ -'--junit-path=[Write a JUnit XML test report to PATH. Use '\''-'\'' to write to stdout which is the default when PATH is not provided]:PATH:_files' \ -'--reporter=[Select reporter to use. Default to '\''pretty'\'']: :(pretty dot junit tap)' \ -'--env-file=[Load environment variables from local file Only the first environment variable with a given key is used. Existing process environment variables are not overwritten.]' \ -'--ext=[Set content type of the supplied file]: :(ts tsx js jsx)' \ -'--unstable[Enable all unstable features and APIs. Instead of using this flag, consider enabling individual unstable features To view the list of individual unstable feature flags, run this command again with --help=unstable]' \ -'--unstable-bare-node-builtins[Enable unstable bare node builtins feature]' \ -'--unstable-detect-cjs[Reads the package.json type field in a project to treat .js files as .cjs]' \ -'--unstable-byonm[]' \ -'--unstable-sloppy-imports[Enable unstable resolving of specifiers by extension probing, .js to .ts, and directory probing]' \ -'--unstable-broadcast-channel[Enable unstable \`BroadcastChannel\` API]' \ -'--unstable-cron[Enable unstable Deno.cron API]' \ -'--unstable-ffi[Enable unstable FFI APIs]' \ -'--unstable-fs[Enable unstable file system APIs]' \ -'--unstable-http[Enable unstable HTTP APIs]' \ -'--unstable-kv[Enable unstable Key-Value store APIs]' \ -'--unstable-net[Enable unstable net APIs]' \ -'--unstable-process[Enable unstable process APIs]' \ -'--unstable-temporal[Enable unstable Temporal API]' \ -'--unstable-unsafe-proto[Enable unsafe __proto__ support. This is a security risk.]' \ -'--unstable-webgpu[Enable unstable \`WebGPU\` APIs]' \ -'--unstable-worker-options[Enable unstable Web Worker APIs]' \ -'-q[Suppress diagnostic output]' \ -'--quiet[Suppress diagnostic output]' \ -'--no-remote[Do not resolve remote modules]' \ -'--no-npm[Do not resolve npm modules]' \ -'(-c --config)--no-config[Disable automatic loading of the configuration file]' \ -'(--lock)--no-lock[Disable auto discovery of the lock file]' \ -'(-R --allow-read -W --allow-write -N --allow-net -E --allow-env --allow-run -S --allow-sys --allow-ffi -I --allow-import)-A[Allow all permissions]' \ -'(-R --allow-read -W --allow-write -N --allow-net -E --allow-env --allow-run -S --allow-sys --allow-ffi -I --allow-import)--allow-all[Allow all permissions]' \ -'--allow-hrtime[REMOVED in Deno 2.0]' \ -'--deny-hrtime[REMOVED in Deno 2.0]' \ -'--no-prompt[Always throw if required permission wasn'\''t passed]' \ -'--cached-only[Require that remote dependencies are already cached]' \ -'--enable-testing-features-do-not-use[INTERNAL\: Enable internal features used during integration testing]' \ -'--no-run[Cache test modules, but don'\''t run tests]' \ -'--trace-leaks[Enable tracing of leaks. Useful when debugging leaking ops in test, but impacts test execution time]' \ -'--doc[Evaluate code blocks in JSDoc and Markdown]' \ -'--permit-no-files[Don'\''t return an error code if no test files were found]' \ -'--clean[Empty the temporary coverage profile data directory before running tests. Note\: running multiple \`deno test --clean\` calls in series or parallel for the same coverage directory may cause race conditions.]' \ -'--parallel[Run test modules in parallel. Parallelism defaults to the number of available CPUs or the value of the DENO_JOBS environment variable]' \ -'--no-clear-screen[Do not clear terminal screen when under watch mode]' \ -'--hide-stacktraces[Hide stack traces for errors in failure test results.]' \ -'*::files -- List of file names to run:_files' \ -&& ret=0 -;; -(types) -_arguments "${_arguments_options[@]}" : \ -'*-h+[]' \ -'*--help=[]' \ -'-L+[Set log level]: :(trace debug info)' \ -'--log-level=[Set log level]: :(trace debug info)' \ -'--unstable[Enable all unstable features and APIs. Instead of using this flag, consider enabling individual unstable features To view the list of individual unstable feature flags, run this command again with --help=unstable]' \ -'--unstable-bare-node-builtins[Enable unstable bare node builtins feature]' \ -'--unstable-detect-cjs[Reads the package.json type field in a project to treat .js files as .cjs]' \ -'--unstable-byonm[]' \ -'--unstable-sloppy-imports[Enable unstable resolving of specifiers by extension probing, .js to .ts, and directory probing]' \ -'--unstable-broadcast-channel[Enable unstable \`BroadcastChannel\` API]' \ -'--unstable-cron[Enable unstable Deno.cron API]' \ -'--unstable-ffi[Enable unstable FFI APIs]' \ -'--unstable-fs[Enable unstable file system APIs]' \ -'--unstable-http[Enable unstable HTTP APIs]' \ -'--unstable-kv[Enable unstable Key-Value store APIs]' \ -'--unstable-net[Enable unstable net APIs]' \ -'--unstable-process[Enable unstable process APIs]' \ -'--unstable-temporal[Enable unstable Temporal API]' \ -'--unstable-unsafe-proto[Enable unsafe __proto__ support. This is a security risk.]' \ -'--unstable-webgpu[Enable unstable \`WebGPU\` APIs]' \ -'--unstable-worker-options[Enable unstable Web Worker APIs]' \ -'-q[Suppress diagnostic output]' \ -'--quiet[Suppress diagnostic output]' \ -&& ret=0 -;; -(upgrade) -_arguments "${_arguments_options[@]}" : \ -'*-h+[]' \ -'*--help=[]' \ -'-L+[Set log level]: :(trace debug info)' \ -'--log-level=[Set log level]: :(trace debug info)' \ -'--version=[The version to upgrade to]: : ' \ -'--output=[The path to output the updated version to]: :_files' \ -'--cert=[Load certificate authority from PEM encoded file]:FILE:_files' \ -'--unsafely-ignore-certificate-errors=[DANGER\: Disables verification of TLS certificates]' \ -'--unstable[Enable all unstable features and APIs. Instead of using this flag, consider enabling individual unstable features To view the list of individual unstable feature flags, run this command again with --help=unstable]' \ -'--unstable-bare-node-builtins[Enable unstable bare node builtins feature]' \ -'--unstable-detect-cjs[Reads the package.json type field in a project to treat .js files as .cjs]' \ -'--unstable-byonm[]' \ -'--unstable-sloppy-imports[Enable unstable resolving of specifiers by extension probing, .js to .ts, and directory probing]' \ -'--unstable-broadcast-channel[Enable unstable \`BroadcastChannel\` API]' \ -'--unstable-cron[Enable unstable Deno.cron API]' \ -'--unstable-ffi[Enable unstable FFI APIs]' \ -'--unstable-fs[Enable unstable file system APIs]' \ -'--unstable-http[Enable unstable HTTP APIs]' \ -'--unstable-kv[Enable unstable Key-Value store APIs]' \ -'--unstable-net[Enable unstable net APIs]' \ -'--unstable-process[Enable unstable process APIs]' \ -'--unstable-temporal[Enable unstable Temporal API]' \ -'--unstable-unsafe-proto[Enable unsafe __proto__ support. This is a security risk.]' \ -'--unstable-webgpu[Enable unstable \`WebGPU\` APIs]' \ -'--unstable-worker-options[Enable unstable Web Worker APIs]' \ -'-q[Suppress diagnostic output]' \ -'--quiet[Suppress diagnostic output]' \ -'--dry-run[Perform all checks without replacing old exe]' \ -'-f[Replace current exe even if not out-of-date]' \ -'--force[Replace current exe even if not out-of-date]' \ -'--canary[Upgrade to canary builds]' \ -'(--canary --version)--rc[Upgrade to a release candidate]' \ -'::version-or-hash-or-channel -- Version (v1.46.0), channel (rc, canary) or commit hash (9bc2dd29ad6ba334fd57a20114e367d3c04763d4):' \ -&& ret=0 -;; -(vendor) -_arguments "${_arguments_options[@]}" : \ -'*-h+[]' \ -'*--help=[]' \ -'-L+[Set log level]: :(trace debug info)' \ -'--log-level=[Set log level]: :(trace debug info)' \ -'--unstable[Enable all unstable features and APIs. Instead of using this flag, consider enabling individual unstable features To view the list of individual unstable feature flags, run this command again with --help=unstable]' \ -'--unstable-bare-node-builtins[Enable unstable bare node builtins feature]' \ -'--unstable-detect-cjs[Reads the package.json type field in a project to treat .js files as .cjs]' \ -'--unstable-byonm[]' \ -'--unstable-sloppy-imports[Enable unstable resolving of specifiers by extension probing, .js to .ts, and directory probing]' \ -'--unstable-broadcast-channel[Enable unstable \`BroadcastChannel\` API]' \ -'--unstable-cron[Enable unstable Deno.cron API]' \ -'--unstable-ffi[Enable unstable FFI APIs]' \ -'--unstable-fs[Enable unstable file system APIs]' \ -'--unstable-http[Enable unstable HTTP APIs]' \ -'--unstable-kv[Enable unstable Key-Value store APIs]' \ -'--unstable-net[Enable unstable net APIs]' \ -'--unstable-process[Enable unstable process APIs]' \ -'--unstable-temporal[Enable unstable Temporal API]' \ -'--unstable-unsafe-proto[Enable unsafe __proto__ support. This is a security risk.]' \ -'--unstable-webgpu[Enable unstable \`WebGPU\` APIs]' \ -'--unstable-worker-options[Enable unstable Web Worker APIs]' \ -'-q[Suppress diagnostic output]' \ -'--quiet[Suppress diagnostic output]' \ -&& ret=0 -;; -(help) -_arguments "${_arguments_options[@]}" : \ -'*-h+[]' \ -'*--help=[]' \ -'-L+[Set log level]: :(trace debug info)' \ -'--log-level=[Set log level]: :(trace debug info)' \ -'--unstable[Enable all unstable features and APIs. Instead of using this flag, consider enabling individual unstable features To view the list of individual unstable feature flags, run this command again with --help=unstable]' \ -'--unstable-bare-node-builtins[Enable unstable bare node builtins feature]' \ -'--unstable-detect-cjs[Reads the package.json type field in a project to treat .js files as .cjs]' \ -'--unstable-byonm[]' \ -'--unstable-sloppy-imports[Enable unstable resolving of specifiers by extension probing, .js to .ts, and directory probing]' \ -'--unstable-broadcast-channel[Enable unstable \`BroadcastChannel\` API]' \ -'--unstable-cron[Enable unstable Deno.cron API]' \ -'--unstable-ffi[Enable unstable FFI APIs]' \ -'--unstable-fs[Enable unstable file system APIs]' \ -'--unstable-http[Enable unstable HTTP APIs]' \ -'--unstable-kv[Enable unstable Key-Value store APIs]' \ -'--unstable-net[Enable unstable net APIs]' \ -'--unstable-process[Enable unstable process APIs]' \ -'--unstable-temporal[Enable unstable Temporal API]' \ -'--unstable-unsafe-proto[Enable unsafe __proto__ support. This is a security risk.]' \ -'--unstable-webgpu[Enable unstable \`WebGPU\` APIs]' \ -'--unstable-worker-options[Enable unstable Web Worker APIs]' \ -'-q[Suppress diagnostic output]' \ -'--quiet[Suppress diagnostic output]' \ -":: :_deno__help_commands" \ -"*::: :->help" \ -&& ret=0 - - case $state in - (help) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:deno-help-command-$line[1]:" - case $line[1] in - (run) -_arguments "${_arguments_options[@]}" : \ -'*-h+[]' \ -'*--help=[]' \ -'-L+[Set log level]: :(trace debug info)' \ -'--log-level=[Set log level]: :(trace debug info)' \ -'-q[Suppress diagnostic output]' \ -'--quiet[Suppress diagnostic output]' \ -&& ret=0 -;; -(serve) -_arguments "${_arguments_options[@]}" : \ -'*-h+[]' \ -'*--help=[]' \ -'-L+[Set log level]: :(trace debug info)' \ -'--log-level=[Set log level]: :(trace debug info)' \ -'-q[Suppress diagnostic output]' \ -'--quiet[Suppress diagnostic output]' \ -&& ret=0 -;; -(add) -_arguments "${_arguments_options[@]}" : \ -'*-h+[]' \ -'*--help=[]' \ -'-L+[Set log level]: :(trace debug info)' \ -'--log-level=[Set log level]: :(trace debug info)' \ -'-q[Suppress diagnostic output]' \ -'--quiet[Suppress diagnostic output]' \ -&& ret=0 -;; -(remove) -_arguments "${_arguments_options[@]}" : \ -'*-h+[]' \ -'*--help=[]' \ -'-L+[Set log level]: :(trace debug info)' \ -'--log-level=[Set log level]: :(trace debug info)' \ -'-q[Suppress diagnostic output]' \ -'--quiet[Suppress diagnostic output]' \ -&& ret=0 -;; -(bench) -_arguments "${_arguments_options[@]}" : \ -'*-h+[]' \ -'*--help=[]' \ -'-L+[Set log level]: :(trace debug info)' \ -'--log-level=[Set log level]: :(trace debug info)' \ -'-q[Suppress diagnostic output]' \ -'--quiet[Suppress diagnostic output]' \ -&& ret=0 -;; -(bundle) -_arguments "${_arguments_options[@]}" : \ -'*-h+[]' \ -'*--help=[]' \ -'-L+[Set log level]: :(trace debug info)' \ -'--log-level=[Set log level]: :(trace debug info)' \ -'-q[Suppress diagnostic output]' \ -'--quiet[Suppress diagnostic output]' \ -&& ret=0 -;; -(cache) -_arguments "${_arguments_options[@]}" : \ -'*-h+[]' \ -'*--help=[]' \ -'-L+[Set log level]: :(trace debug info)' \ -'--log-level=[Set log level]: :(trace debug info)' \ -'-q[Suppress diagnostic output]' \ -'--quiet[Suppress diagnostic output]' \ -&& ret=0 -;; -(check) -_arguments "${_arguments_options[@]}" : \ -'*-h+[]' \ -'*--help=[]' \ -'-L+[Set log level]: :(trace debug info)' \ -'--log-level=[Set log level]: :(trace debug info)' \ -'-q[Suppress diagnostic output]' \ -'--quiet[Suppress diagnostic output]' \ -&& ret=0 -;; -(clean) -_arguments "${_arguments_options[@]}" : \ -'*-h+[]' \ -'*--help=[]' \ -'-L+[Set log level]: :(trace debug info)' \ -'--log-level=[Set log level]: :(trace debug info)' \ -'-q[Suppress diagnostic output]' \ -'--quiet[Suppress diagnostic output]' \ -&& ret=0 -;; -(compile) -_arguments "${_arguments_options[@]}" : \ -'*-h+[]' \ -'*--help=[]' \ -'-L+[Set log level]: :(trace debug info)' \ -'--log-level=[Set log level]: :(trace debug info)' \ -'-q[Suppress diagnostic output]' \ -'--quiet[Suppress diagnostic output]' \ -&& ret=0 -;; -(completions) -_arguments "${_arguments_options[@]}" : \ -'*-h+[]' \ -'*--help=[]' \ -'-L+[Set log level]: :(trace debug info)' \ -'--log-level=[Set log level]: :(trace debug info)' \ -'-q[Suppress diagnostic output]' \ -'--quiet[Suppress diagnostic output]' \ -&& ret=0 -;; -(coverage) -_arguments "${_arguments_options[@]}" : \ -'*-h+[]' \ -'*--help=[]' \ -'-L+[Set log level]: :(trace debug info)' \ -'--log-level=[Set log level]: :(trace debug info)' \ -'-q[Suppress diagnostic output]' \ -'--quiet[Suppress diagnostic output]' \ -&& ret=0 -;; -(doc) -_arguments "${_arguments_options[@]}" : \ -'*-h+[]' \ -'*--help=[]' \ -'-L+[Set log level]: :(trace debug info)' \ -'--log-level=[Set log level]: :(trace debug info)' \ -'-q[Suppress diagnostic output]' \ -'--quiet[Suppress diagnostic output]' \ -&& ret=0 -;; -(eval) -_arguments "${_arguments_options[@]}" : \ -'*-h+[]' \ -'*--help=[]' \ -'-L+[Set log level]: :(trace debug info)' \ -'--log-level=[Set log level]: :(trace debug info)' \ -'-q[Suppress diagnostic output]' \ -'--quiet[Suppress diagnostic output]' \ -&& ret=0 -;; -(fmt) -_arguments "${_arguments_options[@]}" : \ -'*-h+[]' \ -'*--help=[]' \ -'-L+[Set log level]: :(trace debug info)' \ -'--log-level=[Set log level]: :(trace debug info)' \ -'-q[Suppress diagnostic output]' \ -'--quiet[Suppress diagnostic output]' \ -&& ret=0 -;; -(init) -_arguments "${_arguments_options[@]}" : \ -'*-h+[]' \ -'*--help=[]' \ -'-L+[Set log level]: :(trace debug info)' \ -'--log-level=[Set log level]: :(trace debug info)' \ -'-q[Suppress diagnostic output]' \ -'--quiet[Suppress diagnostic output]' \ -&& ret=0 -;; -(info) -_arguments "${_arguments_options[@]}" : \ -'*-h+[]' \ -'*--help=[]' \ -'-L+[Set log level]: :(trace debug info)' \ -'--log-level=[Set log level]: :(trace debug info)' \ -'-q[Suppress diagnostic output]' \ -'--quiet[Suppress diagnostic output]' \ -&& ret=0 -;; -(install) -_arguments "${_arguments_options[@]}" : \ -'*-h+[]' \ -'*--help=[]' \ -'-L+[Set log level]: :(trace debug info)' \ -'--log-level=[Set log level]: :(trace debug info)' \ -'-q[Suppress diagnostic output]' \ -'--quiet[Suppress diagnostic output]' \ -&& ret=0 -;; -(json_reference) -_arguments "${_arguments_options[@]}" : \ -'*-h+[]' \ -'*--help=[]' \ -'-L+[Set log level]: :(trace debug info)' \ -'--log-level=[Set log level]: :(trace debug info)' \ -'-q[Suppress diagnostic output]' \ -'--quiet[Suppress diagnostic output]' \ -&& ret=0 -;; -(jupyter) -_arguments "${_arguments_options[@]}" : \ -'*-h+[]' \ -'*--help=[]' \ -'-L+[Set log level]: :(trace debug info)' \ -'--log-level=[Set log level]: :(trace debug info)' \ -'-q[Suppress diagnostic output]' \ -'--quiet[Suppress diagnostic output]' \ -&& ret=0 -;; -(uninstall) -_arguments "${_arguments_options[@]}" : \ -'*-h+[]' \ -'*--help=[]' \ -'-L+[Set log level]: :(trace debug info)' \ -'--log-level=[Set log level]: :(trace debug info)' \ -'-q[Suppress diagnostic output]' \ -'--quiet[Suppress diagnostic output]' \ -&& ret=0 -;; -(lsp) -_arguments "${_arguments_options[@]}" : \ -'*-h+[]' \ -'*--help=[]' \ -'-L+[Set log level]: :(trace debug info)' \ -'--log-level=[Set log level]: :(trace debug info)' \ -'-q[Suppress diagnostic output]' \ -'--quiet[Suppress diagnostic output]' \ -&& ret=0 -;; -(lint) -_arguments "${_arguments_options[@]}" : \ -'*-h+[]' \ -'*--help=[]' \ -'-L+[Set log level]: :(trace debug info)' \ -'--log-level=[Set log level]: :(trace debug info)' \ -'-q[Suppress diagnostic output]' \ -'--quiet[Suppress diagnostic output]' \ -&& ret=0 -;; -(publish) -_arguments "${_arguments_options[@]}" : \ -'*-h+[]' \ -'*--help=[]' \ -'-L+[Set log level]: :(trace debug info)' \ -'--log-level=[Set log level]: :(trace debug info)' \ -'-q[Suppress diagnostic output]' \ -'--quiet[Suppress diagnostic output]' \ -&& ret=0 -;; -(repl) -_arguments "${_arguments_options[@]}" : \ -'*-h+[]' \ -'*--help=[]' \ -'-L+[Set log level]: :(trace debug info)' \ -'--log-level=[Set log level]: :(trace debug info)' \ -'-q[Suppress diagnostic output]' \ -'--quiet[Suppress diagnostic output]' \ -&& ret=0 -;; -(task) -_arguments "${_arguments_options[@]}" : \ -'*-h+[]' \ -'*--help=[]' \ -'-L+[Set log level]: :(trace debug info)' \ -'--log-level=[Set log level]: :(trace debug info)' \ -'-q[Suppress diagnostic output]' \ -'--quiet[Suppress diagnostic output]' \ -&& ret=0 -;; -(test) -_arguments "${_arguments_options[@]}" : \ -'*-h+[]' \ -'*--help=[]' \ -'-L+[Set log level]: :(trace debug info)' \ -'--log-level=[Set log level]: :(trace debug info)' \ -'-q[Suppress diagnostic output]' \ -'--quiet[Suppress diagnostic output]' \ -&& ret=0 -;; -(types) -_arguments "${_arguments_options[@]}" : \ -'*-h+[]' \ -'*--help=[]' \ -'-L+[Set log level]: :(trace debug info)' \ -'--log-level=[Set log level]: :(trace debug info)' \ -'-q[Suppress diagnostic output]' \ -'--quiet[Suppress diagnostic output]' \ -&& ret=0 -;; -(upgrade) -_arguments "${_arguments_options[@]}" : \ -'*-h+[]' \ -'*--help=[]' \ -'-L+[Set log level]: :(trace debug info)' \ -'--log-level=[Set log level]: :(trace debug info)' \ -'-q[Suppress diagnostic output]' \ -'--quiet[Suppress diagnostic output]' \ -&& ret=0 -;; -(vendor) -_arguments "${_arguments_options[@]}" : \ -'*-h+[]' \ -'*--help=[]' \ -'-L+[Set log level]: :(trace debug info)' \ -'--log-level=[Set log level]: :(trace debug info)' \ -'-q[Suppress diagnostic output]' \ -'--quiet[Suppress diagnostic output]' \ -&& ret=0 -;; - esac - ;; -esac -;; - esac - ;; -esac -} - -(( $+functions[_deno_commands] )) || -_deno_commands() { - local commands; commands=( -'run:Run a JavaScript or TypeScript program, or a task or script. By default all programs are run in sandbox without access to disk, network or ability to spawn subprocesses. deno run https\://examples.deno.land/hello-world.ts Grant permission to read from disk and listen to network\: deno run --allow-read --allow-net jsr\:@std/http/file-server Grant permission to read allow-listed files from disk\: deno run --allow-read=/etc jsr\:@std/http/file-server Grant all permissions\: deno run -A jsr\:@std/http/file-server Specifying the filename '\''-'\'' to read the file from stdin. curl https\://examples.deno.land/hello-world.ts | deno run - Read more\: https\://docs.deno.com/go/run' \ -'serve:Run a server defined in a main module The serve command uses the default exports of the main module to determine which servers to start. Start a server defined in server.ts\: deno serve server.ts Start a server defined in server.ts, watching for changes and running on port 5050\: deno serve --watch --port 5050 server.ts Read more\: https\://docs.deno.com/go/serve' \ -'add:Add dependencies to your configuration file. deno add jsr\:@std/path You can add multiple dependencies at once\: deno add jsr\:@std/path jsr\:@std/assert' \ -'remove:Remove dependencies from the configuration file. deno remove @std/path You can remove multiple dependencies at once\: deno remove @std/path @std/assert ' \ -'bench:Run benchmarks using Deno'\''s built-in bench tool. Evaluate the given files, run all benches declared with '\''Deno.bench()'\'' and report results to standard output\: deno bench src/fetch_bench.ts src/signal_bench.ts If you specify a directory instead of a file, the path is expanded to all contained files matching the glob {*_,*.,}bench.{js,mjs,ts,mts,jsx,tsx}\: deno bench src/ Read more\: https\://docs.deno.com/go/bench' \ -'bundle:⚠️ \`deno bundle\` was removed in Deno 2. See the Deno 1.x to 2.x Migration Guide for migration instructions\: https\://docs.deno.com/runtime/manual/advanced/migrate_deprecations' \ -'cache:Cache and compile remote dependencies. Download and compile a module with all of its static dependencies and save them in the local cache, without running any code\: deno cache jsr\:@std/http/file-server Future runs of this module will trigger no downloads or compilation unless --reload is specified Read more\: https\://docs.deno.com/go/cache' \ -'check:Download and type-check without execution. deno check jsr\:@std/http/file-server Unless --reload is specified, this command will not re-download already cached dependencies Read more\: https\://docs.deno.com/go/check' \ -'clean:Remove the cache directory (\$DENO_DIR)' \ -'compile:Compiles the given script into a self contained executable. deno compile --allow-read --allow-net jsr\:@std/http/file-server deno compile --output file_server jsr\:@std/http/file-server Any flags specified which affect runtime behavior will be applied to the resulting binary. This allows distribution of a Deno application to systems that do not have Deno installed. Under the hood, it bundles a slimmed down version of the Deno runtime along with your JavaScript or TypeScript code. Cross-compiling to different target architectures is supported using the --target flag. On the first invocation with deno will download the proper binary and cache it in \$DENO_DIR. Read more\: https\://docs.deno.com/go/compile ' \ -'completions:Output shell completion script to standard output. deno completions bash > /usr/local/etc/bash_completion.d/deno.bash source /usr/local/etc/bash_completion.d/deno.bash' \ -'coverage:Print coverage reports from coverage profiles. Collect a coverage profile with deno test\: deno test --coverage=cov_profile Print a report to stdout\: deno coverage cov_profile Include urls that start with the file schema and exclude files ending with test.ts and test.js, for an url to match it must match the include pattern and not match the exclude pattern\: deno coverage --include="^file\:" --exclude="test\\.(ts|js)" cov_profile Write a report using the lcov format\: deno coverage --lcov --output=cov.lcov cov_profile/ Generate html reports from lcov\: genhtml -o html_cov cov.lcov Read more\: https\://docs.deno.com/go/coverage' \ -'doc:Show documentation for a module. Output documentation to standard output\: deno doc ./path/to/module.ts Output documentation in HTML format\: deno doc --html --name="My library" ./path/to/module.ts Lint a module for documentation diagnostics\: deno doc --lint ./path/to/module.ts Target a specific symbol\: deno doc ./path/to/module.ts MyClass.someField Show documentation for runtime built-ins\: deno doc deno doc --filter Deno.Listener Read more\: https\://docs.deno.com/go/doc' \ -'eval:Evaluate JavaScript from the command line. deno eval "console.log('\''hello world'\'')" To evaluate as TypeScript\: deno eval --ext=ts "const v\: string = '\''hello'\''; console.log(v)" This command has implicit access to all permissions. Read more\: https\://docs.deno.com/go/eval' \ -'fmt:Auto-format various file types. deno fmt myfile1.ts myfile2.ts Supported file types are\: JavaScript, TypeScript, Markdown, JSON(C) and Jupyter Notebooks Supported file types which are behind corresponding unstable flags (see formatting options)\: HTML, CSS, SCSS, SASS, LESS, YAML, Svelte, Vue, Astro and Angular Format stdin and write to stdout\: cat file.ts | deno fmt - Check if the files are formatted\: deno fmt --check Ignore formatting code by preceding it with an ignore comment\: // deno-fmt-ignore Ignore formatting a file by adding an ignore comment at the top of the file\: // deno-fmt-ignore-file Read more\: https\://docs.deno.com/go/fmt' \ -'init:scaffolds a basic Deno project with a script, test, and configuration file' \ -'info:Show information about a module or the cache directories. Get information about a module\: deno info jsr\:@std/http/file-server The following information is shown\: local\: Local path of the file type\: JavaScript, TypeScript, or JSON emit\: Local path of compiled source code (TypeScript only) dependencies\: Dependency tree of the source file Read more\: https\://docs.deno.com/go/info' \ -'install:Installs dependencies either in the local project or globally to a bin directory. Local installation Add dependencies to the local project'\''s configuration (deno.json / package.json) and installs them in the package cache. If no dependency is specified, installs all dependencies listed in the config file. If the --entrypoint flag is passed, installs the dependencies of the specified entrypoint(s). deno install deno install jsr\:@std/bytes deno install npm\:chalk deno install --entrypoint entry1.ts entry2.ts Global installation If the --global flag is set, installs a script as an executable in the installation root'\''s bin directory. deno install --global --allow-net --allow-read jsr\:@std/http/file-server deno install -g https\://examples.deno.land/color-logging.ts To change the executable name, use -n/--name\: deno install -g --allow-net --allow-read -n serve jsr\:@std/http/file-server The executable name is inferred by default\: - Attempt to take the file stem of the URL path. The above example would become file_server. - If the file stem is something generic like main, mod, index or cli, and the path has no parent, take the file name of the parent path. Otherwise settle with the generic name. - If the resulting name has an @... suffix, strip it. To change the installation root, use --root\: deno install -g --allow-net --allow-read --root /usr/local jsr\:@std/http/file-server The installation root is determined, in order of precedence\: - --root option - DENO_INSTALL_ROOT environment variable - \$HOME/.deno These must be added to the path manually if required.' \ -'i:Installs dependencies either in the local project or globally to a bin directory. Local installation Add dependencies to the local project'\''s configuration (deno.json / package.json) and installs them in the package cache. If no dependency is specified, installs all dependencies listed in the config file. If the --entrypoint flag is passed, installs the dependencies of the specified entrypoint(s). deno install deno install jsr\:@std/bytes deno install npm\:chalk deno install --entrypoint entry1.ts entry2.ts Global installation If the --global flag is set, installs a script as an executable in the installation root'\''s bin directory. deno install --global --allow-net --allow-read jsr\:@std/http/file-server deno install -g https\://examples.deno.land/color-logging.ts To change the executable name, use -n/--name\: deno install -g --allow-net --allow-read -n serve jsr\:@std/http/file-server The executable name is inferred by default\: - Attempt to take the file stem of the URL path. The above example would become file_server. - If the file stem is something generic like main, mod, index or cli, and the path has no parent, take the file name of the parent path. Otherwise settle with the generic name. - If the resulting name has an @... suffix, strip it. To change the installation root, use --root\: deno install -g --allow-net --allow-read --root /usr/local jsr\:@std/http/file-server The installation root is determined, in order of precedence\: - --root option - DENO_INSTALL_ROOT environment variable - \$HOME/.deno These must be added to the path manually if required.' \ -'json_reference:' \ -'jupyter:Deno kernel for Jupyter notebooks' \ -'uninstall:Uninstalls a dependency or an executable script in the installation root'\''s bin directory. deno uninstall @std/dotenv chalk deno uninstall --global file_server To change the installation root, use --root flag\: deno uninstall --global --root /usr/local serve The installation root is determined, in order of precedence\: - --root option - DENO_INSTALL_ROOT environment variable - \$HOME/.deno' \ -'lsp:The '\''deno lsp'\'' subcommand provides a way for code editors and IDEs to interact with Deno using the Language Server Protocol. Usually humans do not use this subcommand directly. For example, '\''deno lsp'\'' can provide IDEs with go-to-definition support and automatic code formatting. How to connect various editors and IDEs to '\''deno lsp'\''\: https\://docs.deno.com/go/lsp' \ -'lint:Lint JavaScript/TypeScript source code. deno lint deno lint myfile1.ts myfile2.js Print result as JSON\: deno lint --json Read from stdin\: cat file.ts | deno lint - cat file.ts | deno lint --json - List available rules\: deno lint --rules To ignore specific diagnostics, you can write an ignore comment on the preceding line with a rule name (or multiple)\: // deno-lint-ignore no-explicit-any // deno-lint-ignore require-await no-empty To ignore linting on an entire file, you can add an ignore comment at the top of the file\: // deno-lint-ignore-file Read more\: https\://docs.deno.com/go/lint ' \ -'publish:Publish the current working directory'\''s package or workspace to JSR' \ -'repl:Starts a read-eval-print-loop, which lets you interactively build up program state in the global context. It is especially useful for quick prototyping and checking snippets of code. TypeScript is supported, however it is not type-checked, only transpiled.' \ -'task:Run a task defined in the configuration file. deno task build List all available tasks\: deno task' \ -'test:Run tests using Deno'\''s built-in test runner. Evaluate the given modules, run all tests declared with Deno.test() and report results to standard output\: deno test src/fetch_test.ts src/signal_test.ts Directory arguments are expanded to all contained files matching the glob {*_,*.,}test.{js,mjs,ts,mts,jsx,tsx} or **/__tests__/**\: deno test src/ Read more\: https\://docs.deno.com/go/test' \ -'types:Print runtime TypeScript declarations. deno types > lib.deno.d.ts The declaration file could be saved and used for typing information.' \ -'upgrade:Upgrade deno executable to the given version. Latest deno upgrade Specific version deno upgrade 1.45.0 deno upgrade 1.46.0-rc.1 deno upgrade 9bc2dd29ad6ba334fd57a20114e367d3c04763d4 Channel deno upgrade stable deno upgrade rc deno upgrade canary The version is downloaded from https\://dl.deno.land and is used to replace the current executable. If you want to not replace the current Deno executable but instead download an update to a different location, use the --output flag\: deno upgrade --output \$HOME/my_deno Read more\: https\://docs.deno.com/go/upgrade' \ -'vendor:⚠️ \`deno vendor\` was removed in Deno 2. See the Deno 1.x to 2.x Migration Guide for migration instructions\: https\://docs.deno.com/runtime/manual/advanced/migrate_deprecations' \ -'help:' \ - ) - _describe -t commands 'deno commands' commands "$@" -} -(( $+functions[_deno__add_commands] )) || -_deno__add_commands() { - local commands; commands=() - _describe -t commands 'deno add commands' commands "$@" -} -(( $+functions[_deno__bench_commands] )) || -_deno__bench_commands() { - local commands; commands=() - _describe -t commands 'deno bench commands' commands "$@" -} -(( $+functions[_deno__bundle_commands] )) || -_deno__bundle_commands() { - local commands; commands=() - _describe -t commands 'deno bundle commands' commands "$@" -} -(( $+functions[_deno__cache_commands] )) || -_deno__cache_commands() { - local commands; commands=() - _describe -t commands 'deno cache commands' commands "$@" -} -(( $+functions[_deno__check_commands] )) || -_deno__check_commands() { - local commands; commands=() - _describe -t commands 'deno check commands' commands "$@" -} -(( $+functions[_deno__clean_commands] )) || -_deno__clean_commands() { - local commands; commands=() - _describe -t commands 'deno clean commands' commands "$@" -} -(( $+functions[_deno__compile_commands] )) || -_deno__compile_commands() { - local commands; commands=() - _describe -t commands 'deno compile commands' commands "$@" -} -(( $+functions[_deno__completions_commands] )) || -_deno__completions_commands() { - local commands; commands=() - _describe -t commands 'deno completions commands' commands "$@" -} -(( $+functions[_deno__coverage_commands] )) || -_deno__coverage_commands() { - local commands; commands=() - _describe -t commands 'deno coverage commands' commands "$@" -} -(( $+functions[_deno__doc_commands] )) || -_deno__doc_commands() { - local commands; commands=() - _describe -t commands 'deno doc commands' commands "$@" -} -(( $+functions[_deno__eval_commands] )) || -_deno__eval_commands() { - local commands; commands=() - _describe -t commands 'deno eval commands' commands "$@" -} -(( $+functions[_deno__fmt_commands] )) || -_deno__fmt_commands() { - local commands; commands=() - _describe -t commands 'deno fmt commands' commands "$@" -} -(( $+functions[_deno__help_commands] )) || -_deno__help_commands() { - local commands; commands=( -'run:' \ -'serve:' \ -'add:' \ -'remove:' \ -'bench:' \ -'bundle:' \ -'cache:' \ -'check:' \ -'clean:' \ -'compile:' \ -'completions:' \ -'coverage:' \ -'doc:' \ -'eval:' \ -'fmt:' \ -'init:' \ -'info:' \ -'install:' \ -'json_reference:' \ -'jupyter:' \ -'uninstall:' \ -'lsp:' \ -'lint:' \ -'publish:' \ -'repl:' \ -'task:' \ -'test:' \ -'types:' \ -'upgrade:' \ -'vendor:' \ - ) - _describe -t commands 'deno help commands' commands "$@" -} -(( $+functions[_deno__help__add_commands] )) || -_deno__help__add_commands() { - local commands; commands=() - _describe -t commands 'deno help add commands' commands "$@" -} -(( $+functions[_deno__help__bench_commands] )) || -_deno__help__bench_commands() { - local commands; commands=() - _describe -t commands 'deno help bench commands' commands "$@" -} -(( $+functions[_deno__help__bundle_commands] )) || -_deno__help__bundle_commands() { - local commands; commands=() - _describe -t commands 'deno help bundle commands' commands "$@" -} -(( $+functions[_deno__help__cache_commands] )) || -_deno__help__cache_commands() { - local commands; commands=() - _describe -t commands 'deno help cache commands' commands "$@" -} -(( $+functions[_deno__help__check_commands] )) || -_deno__help__check_commands() { - local commands; commands=() - _describe -t commands 'deno help check commands' commands "$@" -} -(( $+functions[_deno__help__clean_commands] )) || -_deno__help__clean_commands() { - local commands; commands=() - _describe -t commands 'deno help clean commands' commands "$@" -} -(( $+functions[_deno__help__compile_commands] )) || -_deno__help__compile_commands() { - local commands; commands=() - _describe -t commands 'deno help compile commands' commands "$@" -} -(( $+functions[_deno__help__completions_commands] )) || -_deno__help__completions_commands() { - local commands; commands=() - _describe -t commands 'deno help completions commands' commands "$@" -} -(( $+functions[_deno__help__coverage_commands] )) || -_deno__help__coverage_commands() { - local commands; commands=() - _describe -t commands 'deno help coverage commands' commands "$@" -} -(( $+functions[_deno__help__doc_commands] )) || -_deno__help__doc_commands() { - local commands; commands=() - _describe -t commands 'deno help doc commands' commands "$@" -} -(( $+functions[_deno__help__eval_commands] )) || -_deno__help__eval_commands() { - local commands; commands=() - _describe -t commands 'deno help eval commands' commands "$@" -} -(( $+functions[_deno__help__fmt_commands] )) || -_deno__help__fmt_commands() { - local commands; commands=() - _describe -t commands 'deno help fmt commands' commands "$@" -} -(( $+functions[_deno__help__info_commands] )) || -_deno__help__info_commands() { - local commands; commands=() - _describe -t commands 'deno help info commands' commands "$@" -} -(( $+functions[_deno__help__init_commands] )) || -_deno__help__init_commands() { - local commands; commands=() - _describe -t commands 'deno help init commands' commands "$@" -} -(( $+functions[_deno__help__install_commands] )) || -_deno__help__install_commands() { - local commands; commands=() - _describe -t commands 'deno help install commands' commands "$@" -} -(( $+functions[_deno__help__json_reference_commands] )) || -_deno__help__json_reference_commands() { - local commands; commands=() - _describe -t commands 'deno help json_reference commands' commands "$@" -} -(( $+functions[_deno__help__jupyter_commands] )) || -_deno__help__jupyter_commands() { - local commands; commands=() - _describe -t commands 'deno help jupyter commands' commands "$@" -} -(( $+functions[_deno__help__lint_commands] )) || -_deno__help__lint_commands() { - local commands; commands=() - _describe -t commands 'deno help lint commands' commands "$@" -} -(( $+functions[_deno__help__lsp_commands] )) || -_deno__help__lsp_commands() { - local commands; commands=() - _describe -t commands 'deno help lsp commands' commands "$@" -} -(( $+functions[_deno__help__publish_commands] )) || -_deno__help__publish_commands() { - local commands; commands=() - _describe -t commands 'deno help publish commands' commands "$@" -} -(( $+functions[_deno__help__remove_commands] )) || -_deno__help__remove_commands() { - local commands; commands=() - _describe -t commands 'deno help remove commands' commands "$@" -} -(( $+functions[_deno__help__repl_commands] )) || -_deno__help__repl_commands() { - local commands; commands=() - _describe -t commands 'deno help repl commands' commands "$@" -} -(( $+functions[_deno__help__run_commands] )) || -_deno__help__run_commands() { - local commands; commands=() - _describe -t commands 'deno help run commands' commands "$@" -} -(( $+functions[_deno__help__serve_commands] )) || -_deno__help__serve_commands() { - local commands; commands=() - _describe -t commands 'deno help serve commands' commands "$@" -} -(( $+functions[_deno__help__task_commands] )) || -_deno__help__task_commands() { - local commands; commands=() - _describe -t commands 'deno help task commands' commands "$@" -} -(( $+functions[_deno__help__test_commands] )) || -_deno__help__test_commands() { - local commands; commands=() - _describe -t commands 'deno help test commands' commands "$@" -} -(( $+functions[_deno__help__types_commands] )) || -_deno__help__types_commands() { - local commands; commands=() - _describe -t commands 'deno help types commands' commands "$@" -} -(( $+functions[_deno__help__uninstall_commands] )) || -_deno__help__uninstall_commands() { - local commands; commands=() - _describe -t commands 'deno help uninstall commands' commands "$@" -} -(( $+functions[_deno__help__upgrade_commands] )) || -_deno__help__upgrade_commands() { - local commands; commands=() - _describe -t commands 'deno help upgrade commands' commands "$@" -} -(( $+functions[_deno__help__vendor_commands] )) || -_deno__help__vendor_commands() { - local commands; commands=() - _describe -t commands 'deno help vendor commands' commands "$@" -} -(( $+functions[_deno__info_commands] )) || -_deno__info_commands() { - local commands; commands=() - _describe -t commands 'deno info commands' commands "$@" -} -(( $+functions[_deno__init_commands] )) || -_deno__init_commands() { - local commands; commands=() - _describe -t commands 'deno init commands' commands "$@" -} -(( $+functions[_deno__install_commands] )) || -_deno__install_commands() { - local commands; commands=() - _describe -t commands 'deno install commands' commands "$@" -} -(( $+functions[_deno__json_reference_commands] )) || -_deno__json_reference_commands() { - local commands; commands=() - _describe -t commands 'deno json_reference commands' commands "$@" -} -(( $+functions[_deno__jupyter_commands] )) || -_deno__jupyter_commands() { - local commands; commands=() - _describe -t commands 'deno jupyter commands' commands "$@" -} -(( $+functions[_deno__lint_commands] )) || -_deno__lint_commands() { - local commands; commands=() - _describe -t commands 'deno lint commands' commands "$@" -} -(( $+functions[_deno__lsp_commands] )) || -_deno__lsp_commands() { - local commands; commands=() - _describe -t commands 'deno lsp commands' commands "$@" -} -(( $+functions[_deno__publish_commands] )) || -_deno__publish_commands() { - local commands; commands=() - _describe -t commands 'deno publish commands' commands "$@" -} -(( $+functions[_deno__remove_commands] )) || -_deno__remove_commands() { - local commands; commands=() - _describe -t commands 'deno remove commands' commands "$@" -} -(( $+functions[_deno__repl_commands] )) || -_deno__repl_commands() { - local commands; commands=() - _describe -t commands 'deno repl commands' commands "$@" -} -(( $+functions[_deno__run_commands] )) || -_deno__run_commands() { - local commands; commands=() - _describe -t commands 'deno run commands' commands "$@" -} -(( $+functions[_deno__serve_commands] )) || -_deno__serve_commands() { - local commands; commands=() - _describe -t commands 'deno serve commands' commands "$@" -} -(( $+functions[_deno__task_commands] )) || -_deno__task_commands() { - local commands; commands=() - _describe -t commands 'deno task commands' commands "$@" -} -(( $+functions[_deno__test_commands] )) || -_deno__test_commands() { - local commands; commands=() - _describe -t commands 'deno test commands' commands "$@" -} -(( $+functions[_deno__types_commands] )) || -_deno__types_commands() { - local commands; commands=() - _describe -t commands 'deno types commands' commands "$@" -} -(( $+functions[_deno__uninstall_commands] )) || -_deno__uninstall_commands() { - local commands; commands=() - _describe -t commands 'deno uninstall commands' commands "$@" -} -(( $+functions[_deno__upgrade_commands] )) || -_deno__upgrade_commands() { - local commands; commands=() - _describe -t commands 'deno upgrade commands' commands "$@" -} -(( $+functions[_deno__vendor_commands] )) || -_deno__vendor_commands() { - local commands; commands=() - _describe -t commands 'deno vendor commands' commands "$@" -} - -if [ "$funcstack[1]" = "_deno" ]; then - _deno "$@" -else - compdef _deno deno -fi diff --git a/config/zsh/completions/_sqlx.zsh b/config/zsh/completions/_sqlx.zsh deleted file mode 100644 index 125ef564..00000000 --- a/config/zsh/completions/_sqlx.zsh +++ /dev/null @@ -1,635 +0,0 @@ -#compdef sqlx - -autoload -U is-at-least - -_sqlx() { - typeset -A opt_args - typeset -a _arguments_options - local ret=1 - - if is-at-least 5.2; then - _arguments_options=(-s -S -C) - else - _arguments_options=(-s -C) - fi - - local context curcontext="$curcontext" state line - _arguments "${_arguments_options[@]}" : \ -'-h[Print help]' \ -'--help[Print help]' \ -":: :_sqlx_commands" \ -"*::: :->sqlx-cli" \ -&& ret=0 - case $state in - (sqlx-cli) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:sqlx-command-$line[1]:" - case $line[1] in - (database) -_arguments "${_arguments_options[@]}" : \ -'-h[Print help]' \ -'--help[Print help]' \ -":: :_sqlx__database_commands" \ -"*::: :->database" \ -&& ret=0 - - case $state in - (database) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:sqlx-database-command-$line[1]:" - case $line[1] in - (create) -_arguments "${_arguments_options[@]}" : \ -'-D+[Location of the DB, by default will be read from the DATABASE_URL env var or \`.env\` files]:DATABASE_URL:_default' \ -'--database-url=[Location of the DB, by default will be read from the DATABASE_URL env var or \`.env\` files]:DATABASE_URL:_default' \ -'--connect-timeout=[The maximum time, in seconds, to try connecting to the database server before returning an error]:CONNECT_TIMEOUT:_default' \ -'--no-dotenv[Do not automatically load \`.env\` files]' \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(drop) -_arguments "${_arguments_options[@]}" : \ -'-D+[Location of the DB, by default will be read from the DATABASE_URL env var or \`.env\` files]:DATABASE_URL:_default' \ -'--database-url=[Location of the DB, by default will be read from the DATABASE_URL env var or \`.env\` files]:DATABASE_URL:_default' \ -'--connect-timeout=[The maximum time, in seconds, to try connecting to the database server before returning an error]:CONNECT_TIMEOUT:_default' \ -'-y[Automatic confirmation. Without this option, you will be prompted before dropping your database]' \ -'--no-dotenv[Do not automatically load \`.env\` files]' \ -'-f[PostgreSQL only\: force drops the database]' \ -'--force[PostgreSQL only\: force drops the database]' \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(reset) -_arguments "${_arguments_options[@]}" : \ -'--source=[Path to folder containing migrations]:SOURCE:_default' \ -'-D+[Location of the DB, by default will be read from the DATABASE_URL env var or \`.env\` files]:DATABASE_URL:_default' \ -'--database-url=[Location of the DB, by default will be read from the DATABASE_URL env var or \`.env\` files]:DATABASE_URL:_default' \ -'--connect-timeout=[The maximum time, in seconds, to try connecting to the database server before returning an error]:CONNECT_TIMEOUT:_default' \ -'-y[Automatic confirmation. Without this option, you will be prompted before dropping your database]' \ -'--no-dotenv[Do not automatically load \`.env\` files]' \ -'-f[PostgreSQL only\: force drops the database]' \ -'--force[PostgreSQL only\: force drops the database]' \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(setup) -_arguments "${_arguments_options[@]}" : \ -'--source=[Path to folder containing migrations]:SOURCE:_default' \ -'-D+[Location of the DB, by default will be read from the DATABASE_URL env var or \`.env\` files]:DATABASE_URL:_default' \ -'--database-url=[Location of the DB, by default will be read from the DATABASE_URL env var or \`.env\` files]:DATABASE_URL:_default' \ -'--connect-timeout=[The maximum time, in seconds, to try connecting to the database server before returning an error]:CONNECT_TIMEOUT:_default' \ -'--no-dotenv[Do not automatically load \`.env\` files]' \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(help) -_arguments "${_arguments_options[@]}" : \ -":: :_sqlx__database__help_commands" \ -"*::: :->help" \ -&& ret=0 - - case $state in - (help) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:sqlx-database-help-command-$line[1]:" - case $line[1] in - (create) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(drop) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(reset) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(setup) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(help) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; - esac - ;; -esac -;; - esac - ;; -esac -;; -(prepare) -_arguments "${_arguments_options[@]}" : \ -'-D+[Location of the DB, by default will be read from the DATABASE_URL env var or \`.env\` files]:DATABASE_URL:_default' \ -'--database-url=[Location of the DB, by default will be read from the DATABASE_URL env var or \`.env\` files]:DATABASE_URL:_default' \ -'--connect-timeout=[The maximum time, in seconds, to try connecting to the database server before returning an error]:CONNECT_TIMEOUT:_default' \ -'--check[Run in '\''check'\'' mode. Exits with 0 if the query metadata is up-to-date. Exits with 1 if the query metadata needs updating]' \ -'--all[Prepare query macros in dependencies that exist outside the current crate or workspace]' \ -'--workspace[Generate a single workspace-level \`.sqlx\` folder]' \ -'--no-dotenv[Do not automatically load \`.env\` files]' \ -'-h[Print help (see more with '\''--help'\'')]' \ -'--help[Print help (see more with '\''--help'\'')]' \ -'*::args -- Arguments to be passed to `cargo rustc ...`:_default' \ -&& ret=0 -;; -(migrate) -_arguments "${_arguments_options[@]}" : \ -'-h[Print help]' \ -'--help[Print help]' \ -":: :_sqlx__migrate_commands" \ -"*::: :->migrate" \ -&& ret=0 - - case $state in - (migrate) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:sqlx-migrate-command-$line[1]:" - case $line[1] in - (add) -_arguments "${_arguments_options[@]}" : \ -'--source=[Path to folder containing migrations]:SOURCE:_default' \ -'-r[If true, creates a pair of up and down migration files with same version else creates a single sql file]' \ -'-t[If set, use timestamp versioning for the new migration. Conflicts with \`--sequential\`]' \ -'--timestamp[If set, use timestamp versioning for the new migration. Conflicts with \`--sequential\`]' \ -'(-t --timestamp)-s[If set, use sequential versioning for the new migration. Conflicts with \`--timestamp\`]' \ -'(-t --timestamp)--sequential[If set, use sequential versioning for the new migration. Conflicts with \`--timestamp\`]' \ -'-h[Print help (see more with '\''--help'\'')]' \ -'--help[Print help (see more with '\''--help'\'')]' \ -':description:_default' \ -&& ret=0 -;; -(run) -_arguments "${_arguments_options[@]}" : \ -'--source=[Path to folder containing migrations]:SOURCE:_default' \ -'-D+[Location of the DB, by default will be read from the DATABASE_URL env var or \`.env\` files]:DATABASE_URL:_default' \ -'--database-url=[Location of the DB, by default will be read from the DATABASE_URL env var or \`.env\` files]:DATABASE_URL:_default' \ -'--connect-timeout=[The maximum time, in seconds, to try connecting to the database server before returning an error]:CONNECT_TIMEOUT:_default' \ -'--target-version=[Apply migrations up to the specified version. If unspecified, apply all pending migrations. If already at the target version, then no-op]:TARGET_VERSION:_default' \ -'--dry-run[List all the migrations to be run without applying]' \ -'--ignore-missing[Ignore applied migrations that are missing in the resolved migrations]' \ -'--no-dotenv[Do not automatically load \`.env\` files]' \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(revert) -_arguments "${_arguments_options[@]}" : \ -'--source=[Path to folder containing migrations]:SOURCE:_default' \ -'-D+[Location of the DB, by default will be read from the DATABASE_URL env var or \`.env\` files]:DATABASE_URL:_default' \ -'--database-url=[Location of the DB, by default will be read from the DATABASE_URL env var or \`.env\` files]:DATABASE_URL:_default' \ -'--connect-timeout=[The maximum time, in seconds, to try connecting to the database server before returning an error]:CONNECT_TIMEOUT:_default' \ -'--target-version=[Revert migrations down to the specified version. If unspecified, revert only the last migration. Set to 0 to revert all migrations. If already at the target version, then no-op]:TARGET_VERSION:_default' \ -'--dry-run[List the migration to be reverted without applying]' \ -'--ignore-missing[Ignore applied migrations that are missing in the resolved migrations]' \ -'--no-dotenv[Do not automatically load \`.env\` files]' \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(info) -_arguments "${_arguments_options[@]}" : \ -'--source=[Path to folder containing migrations]:SOURCE:_default' \ -'-D+[Location of the DB, by default will be read from the DATABASE_URL env var or \`.env\` files]:DATABASE_URL:_default' \ -'--database-url=[Location of the DB, by default will be read from the DATABASE_URL env var or \`.env\` files]:DATABASE_URL:_default' \ -'--connect-timeout=[The maximum time, in seconds, to try connecting to the database server before returning an error]:CONNECT_TIMEOUT:_default' \ -'--no-dotenv[Do not automatically load \`.env\` files]' \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(build-script) -_arguments "${_arguments_options[@]}" : \ -'--source=[Path to folder containing migrations]:SOURCE:_default' \ -'--force[Overwrite the build script if it already exists]' \ -'-h[Print help (see more with '\''--help'\'')]' \ -'--help[Print help (see more with '\''--help'\'')]' \ -&& ret=0 -;; -(help) -_arguments "${_arguments_options[@]}" : \ -":: :_sqlx__migrate__help_commands" \ -"*::: :->help" \ -&& ret=0 - - case $state in - (help) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:sqlx-migrate-help-command-$line[1]:" - case $line[1] in - (add) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(run) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(revert) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(info) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(build-script) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(help) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; - esac - ;; -esac -;; - esac - ;; -esac -;; -(completions) -_arguments "${_arguments_options[@]}" : \ -'-h[Print help]' \ -'--help[Print help]' \ -':shell:(bash elvish fish powershell zsh)' \ -&& ret=0 -;; -(help) -_arguments "${_arguments_options[@]}" : \ -":: :_sqlx__help_commands" \ -"*::: :->help" \ -&& ret=0 - - case $state in - (help) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:sqlx-help-command-$line[1]:" - case $line[1] in - (database) -_arguments "${_arguments_options[@]}" : \ -":: :_sqlx__help__database_commands" \ -"*::: :->database" \ -&& ret=0 - - case $state in - (database) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:sqlx-help-database-command-$line[1]:" - case $line[1] in - (create) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(drop) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(reset) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(setup) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; - esac - ;; -esac -;; -(prepare) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(migrate) -_arguments "${_arguments_options[@]}" : \ -":: :_sqlx__help__migrate_commands" \ -"*::: :->migrate" \ -&& ret=0 - - case $state in - (migrate) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:sqlx-help-migrate-command-$line[1]:" - case $line[1] in - (add) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(run) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(revert) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(info) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(build-script) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; - esac - ;; -esac -;; -(completions) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(help) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; - esac - ;; -esac -;; - esac - ;; -esac -} - -(( $+functions[_sqlx_commands] )) || -_sqlx_commands() { - local commands; commands=( -'database:Group of commands for creating and dropping your database' \ -'prepare:Generate query metadata to support offline compile-time verification' \ -'migrate:Group of commands for creating and running migrations' \ -'completions:Generate shell completions for the specified shell' \ -'help:Print this message or the help of the given subcommand(s)' \ - ) - _describe -t commands 'sqlx commands' commands "$@" -} -(( $+functions[_sqlx__completions_commands] )) || -_sqlx__completions_commands() { - local commands; commands=() - _describe -t commands 'sqlx completions commands' commands "$@" -} -(( $+functions[_sqlx__database_commands] )) || -_sqlx__database_commands() { - local commands; commands=( -'create:Creates the database specified in your DATABASE_URL' \ -'drop:Drops the database specified in your DATABASE_URL' \ -'reset:Drops the database specified in your DATABASE_URL, re-creates it, and runs any pending migrations' \ -'setup:Creates the database specified in your DATABASE_URL and runs any pending migrations' \ -'help:Print this message or the help of the given subcommand(s)' \ - ) - _describe -t commands 'sqlx database commands' commands "$@" -} -(( $+functions[_sqlx__database__create_commands] )) || -_sqlx__database__create_commands() { - local commands; commands=() - _describe -t commands 'sqlx database create commands' commands "$@" -} -(( $+functions[_sqlx__database__drop_commands] )) || -_sqlx__database__drop_commands() { - local commands; commands=() - _describe -t commands 'sqlx database drop commands' commands "$@" -} -(( $+functions[_sqlx__database__help_commands] )) || -_sqlx__database__help_commands() { - local commands; commands=( -'create:Creates the database specified in your DATABASE_URL' \ -'drop:Drops the database specified in your DATABASE_URL' \ -'reset:Drops the database specified in your DATABASE_URL, re-creates it, and runs any pending migrations' \ -'setup:Creates the database specified in your DATABASE_URL and runs any pending migrations' \ -'help:Print this message or the help of the given subcommand(s)' \ - ) - _describe -t commands 'sqlx database help commands' commands "$@" -} -(( $+functions[_sqlx__database__help__create_commands] )) || -_sqlx__database__help__create_commands() { - local commands; commands=() - _describe -t commands 'sqlx database help create commands' commands "$@" -} -(( $+functions[_sqlx__database__help__drop_commands] )) || -_sqlx__database__help__drop_commands() { - local commands; commands=() - _describe -t commands 'sqlx database help drop commands' commands "$@" -} -(( $+functions[_sqlx__database__help__help_commands] )) || -_sqlx__database__help__help_commands() { - local commands; commands=() - _describe -t commands 'sqlx database help help commands' commands "$@" -} -(( $+functions[_sqlx__database__help__reset_commands] )) || -_sqlx__database__help__reset_commands() { - local commands; commands=() - _describe -t commands 'sqlx database help reset commands' commands "$@" -} -(( $+functions[_sqlx__database__help__setup_commands] )) || -_sqlx__database__help__setup_commands() { - local commands; commands=() - _describe -t commands 'sqlx database help setup commands' commands "$@" -} -(( $+functions[_sqlx__database__reset_commands] )) || -_sqlx__database__reset_commands() { - local commands; commands=() - _describe -t commands 'sqlx database reset commands' commands "$@" -} -(( $+functions[_sqlx__database__setup_commands] )) || -_sqlx__database__setup_commands() { - local commands; commands=() - _describe -t commands 'sqlx database setup commands' commands "$@" -} -(( $+functions[_sqlx__help_commands] )) || -_sqlx__help_commands() { - local commands; commands=( -'database:Group of commands for creating and dropping your database' \ -'prepare:Generate query metadata to support offline compile-time verification' \ -'migrate:Group of commands for creating and running migrations' \ -'completions:Generate shell completions for the specified shell' \ -'help:Print this message or the help of the given subcommand(s)' \ - ) - _describe -t commands 'sqlx help commands' commands "$@" -} -(( $+functions[_sqlx__help__completions_commands] )) || -_sqlx__help__completions_commands() { - local commands; commands=() - _describe -t commands 'sqlx help completions commands' commands "$@" -} -(( $+functions[_sqlx__help__database_commands] )) || -_sqlx__help__database_commands() { - local commands; commands=( -'create:Creates the database specified in your DATABASE_URL' \ -'drop:Drops the database specified in your DATABASE_URL' \ -'reset:Drops the database specified in your DATABASE_URL, re-creates it, and runs any pending migrations' \ -'setup:Creates the database specified in your DATABASE_URL and runs any pending migrations' \ - ) - _describe -t commands 'sqlx help database commands' commands "$@" -} -(( $+functions[_sqlx__help__database__create_commands] )) || -_sqlx__help__database__create_commands() { - local commands; commands=() - _describe -t commands 'sqlx help database create commands' commands "$@" -} -(( $+functions[_sqlx__help__database__drop_commands] )) || -_sqlx__help__database__drop_commands() { - local commands; commands=() - _describe -t commands 'sqlx help database drop commands' commands "$@" -} -(( $+functions[_sqlx__help__database__reset_commands] )) || -_sqlx__help__database__reset_commands() { - local commands; commands=() - _describe -t commands 'sqlx help database reset commands' commands "$@" -} -(( $+functions[_sqlx__help__database__setup_commands] )) || -_sqlx__help__database__setup_commands() { - local commands; commands=() - _describe -t commands 'sqlx help database setup commands' commands "$@" -} -(( $+functions[_sqlx__help__help_commands] )) || -_sqlx__help__help_commands() { - local commands; commands=() - _describe -t commands 'sqlx help help commands' commands "$@" -} -(( $+functions[_sqlx__help__migrate_commands] )) || -_sqlx__help__migrate_commands() { - local commands; commands=( -'add:Create a new migration with the given description' \ -'run:Run all pending migrations' \ -'revert:Revert the latest migration with a down file' \ -'info:List all available migrations' \ -'build-script:Generate a \`build.rs\` to trigger recompilation when a new migration is added' \ - ) - _describe -t commands 'sqlx help migrate commands' commands "$@" -} -(( $+functions[_sqlx__help__migrate__add_commands] )) || -_sqlx__help__migrate__add_commands() { - local commands; commands=() - _describe -t commands 'sqlx help migrate add commands' commands "$@" -} -(( $+functions[_sqlx__help__migrate__build-script_commands] )) || -_sqlx__help__migrate__build-script_commands() { - local commands; commands=() - _describe -t commands 'sqlx help migrate build-script commands' commands "$@" -} -(( $+functions[_sqlx__help__migrate__info_commands] )) || -_sqlx__help__migrate__info_commands() { - local commands; commands=() - _describe -t commands 'sqlx help migrate info commands' commands "$@" -} -(( $+functions[_sqlx__help__migrate__revert_commands] )) || -_sqlx__help__migrate__revert_commands() { - local commands; commands=() - _describe -t commands 'sqlx help migrate revert commands' commands "$@" -} -(( $+functions[_sqlx__help__migrate__run_commands] )) || -_sqlx__help__migrate__run_commands() { - local commands; commands=() - _describe -t commands 'sqlx help migrate run commands' commands "$@" -} -(( $+functions[_sqlx__help__prepare_commands] )) || -_sqlx__help__prepare_commands() { - local commands; commands=() - _describe -t commands 'sqlx help prepare commands' commands "$@" -} -(( $+functions[_sqlx__migrate_commands] )) || -_sqlx__migrate_commands() { - local commands; commands=( -'add:Create a new migration with the given description' \ -'run:Run all pending migrations' \ -'revert:Revert the latest migration with a down file' \ -'info:List all available migrations' \ -'build-script:Generate a \`build.rs\` to trigger recompilation when a new migration is added' \ -'help:Print this message or the help of the given subcommand(s)' \ - ) - _describe -t commands 'sqlx migrate commands' commands "$@" -} -(( $+functions[_sqlx__migrate__add_commands] )) || -_sqlx__migrate__add_commands() { - local commands; commands=() - _describe -t commands 'sqlx migrate add commands' commands "$@" -} -(( $+functions[_sqlx__migrate__build-script_commands] )) || -_sqlx__migrate__build-script_commands() { - local commands; commands=() - _describe -t commands 'sqlx migrate build-script commands' commands "$@" -} -(( $+functions[_sqlx__migrate__help_commands] )) || -_sqlx__migrate__help_commands() { - local commands; commands=( -'add:Create a new migration with the given description' \ -'run:Run all pending migrations' \ -'revert:Revert the latest migration with a down file' \ -'info:List all available migrations' \ -'build-script:Generate a \`build.rs\` to trigger recompilation when a new migration is added' \ -'help:Print this message or the help of the given subcommand(s)' \ - ) - _describe -t commands 'sqlx migrate help commands' commands "$@" -} -(( $+functions[_sqlx__migrate__help__add_commands] )) || -_sqlx__migrate__help__add_commands() { - local commands; commands=() - _describe -t commands 'sqlx migrate help add commands' commands "$@" -} -(( $+functions[_sqlx__migrate__help__build-script_commands] )) || -_sqlx__migrate__help__build-script_commands() { - local commands; commands=() - _describe -t commands 'sqlx migrate help build-script commands' commands "$@" -} -(( $+functions[_sqlx__migrate__help__help_commands] )) || -_sqlx__migrate__help__help_commands() { - local commands; commands=() - _describe -t commands 'sqlx migrate help help commands' commands "$@" -} -(( $+functions[_sqlx__migrate__help__info_commands] )) || -_sqlx__migrate__help__info_commands() { - local commands; commands=() - _describe -t commands 'sqlx migrate help info commands' commands "$@" -} -(( $+functions[_sqlx__migrate__help__revert_commands] )) || -_sqlx__migrate__help__revert_commands() { - local commands; commands=() - _describe -t commands 'sqlx migrate help revert commands' commands "$@" -} -(( $+functions[_sqlx__migrate__help__run_commands] )) || -_sqlx__migrate__help__run_commands() { - local commands; commands=() - _describe -t commands 'sqlx migrate help run commands' commands "$@" -} -(( $+functions[_sqlx__migrate__info_commands] )) || -_sqlx__migrate__info_commands() { - local commands; commands=() - _describe -t commands 'sqlx migrate info commands' commands "$@" -} -(( $+functions[_sqlx__migrate__revert_commands] )) || -_sqlx__migrate__revert_commands() { - local commands; commands=() - _describe -t commands 'sqlx migrate revert commands' commands "$@" -} -(( $+functions[_sqlx__migrate__run_commands] )) || -_sqlx__migrate__run_commands() { - local commands; commands=() - _describe -t commands 'sqlx migrate run commands' commands "$@" -} -(( $+functions[_sqlx__prepare_commands] )) || -_sqlx__prepare_commands() { - local commands; commands=() - _describe -t commands 'sqlx prepare commands' commands "$@" -} - -if [ "$funcstack[1]" = "_sqlx" ]; then - _sqlx "$@" -else - compdef _sqlx sqlx -fi diff --git a/config/zsh/completions/_trash b/config/zsh/completions/_trash new file mode 100644 index 00000000..6dc42698 --- /dev/null +++ b/config/zsh/completions/_trash @@ -0,0 +1,74 @@ +#compdef trash + +# AUTOMATICALLY GENERATED by `shtab` + + +_shtab_trash_commands() { + local _commands=( + + ) + _describe 'trash commands' _commands +} + +_shtab_trash_options=( + "(- : *)"{-h,--help}"[show this help message and exit]" + "(- : *)--print-completion[print shell completion script]:print_completion:(bash zsh tcsh)" + {-d,--directory}"[ignored (for GNU rm compatibility)]" + {-f,--force}"[silently ignore nonexistent files]" + {-i,--interactive}"[prompt before every removal]" + {-r,-R,--recursive}"[ignored (for GNU rm compatibility)]" + "--trash-dir[use TRASHDIR as trash folder]:trashdir:(\${\$(trash-list --trash-dirs)#parent_*})" + "*"{-v,--verbose}"[explain what is being done]" + "(- : *)--version[show program\'s version number and exit]" + "(*)::files:_trash_files" +) + +# guard to ensure default positional specs are added only once per session +_shtab_trash_defaults_added=0 + + +_shtab_trash() { + local context state line curcontext="$curcontext" one_or_more='(*)' remainder='(-)*' default='*::: :->trash' + + # Add default positional/remainder specs only if none exist, and only once per session + if (( ! _shtab_trash_defaults_added )); then + if (( ${_shtab_trash_options[(I)${(q)one_or_more}*]} + ${_shtab_trash_options[(I)${(q)remainder}*]} + ${_shtab_trash_options[(I)${(q)default}]} == 0 )); then + _shtab_trash_options+=(': :_shtab_trash_commands' '*::: :->trash') + fi + _shtab_trash_defaults_added=1 + fi + _arguments -C -s $_shtab_trash_options + + case $state in + trash) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:_shtab_trash-$line[1]:" + case $line[1] in + + esac + esac +} + +# Custom Preamble + +# https://github.com/zsh-users/zsh/blob/19390a1ba8dc983b0a1379058e90cd51ce156815/Completion/Unix/Command/_rm#L72-L74 +_trash_files() { + (( CURRENT > 0 )) && line[CURRENT]=() + line=( ${line//(#m)[\[\]()\\*?#<>~\^\|]/\\$MATCH} ) + _files -F line +} + +# End Custom Preamble + + +typeset -A opt_args + +if [[ $zsh_eval_context[-1] == eval ]]; then + # eval/source/. command, register function for later + compdef _shtab_trash -N trash +else + # autoload from fpath, call function directly + _shtab_trash "$@" +fi + diff --git a/local/bin/any2av1mkv b/local/bin/any2av1mkv new file mode 100755 index 00000000..f4657e99 --- /dev/null +++ b/local/bin/any2av1mkv @@ -0,0 +1,150 @@ +#!/usr/bin/env bash +set -euo pipefail + +# any2av1mkv - Convert provided files to MKV with AV1 video (VAAPI on AMD), +# keeping ALL audio tracks, subtitles (including PGS), and attachments. +# +# Default is bitrate-controlled VBR, tuned for 1080p and "not inflating". +# +# Usage: +# any2av1mkv input1.mkv input2.mp4 "weird name.avi" +# any2av1mkv * # skips directories +# +# Options: +# -d, --dry-run print ffmpeg command(s) only +# --no-skip overwrite output if it already exists +# --cqp use constant-quality mode instead of VBR +# --audio-encode aac re-encode ALL audio tracks to AAC (default: copy) +# -h, --help +# +# Env vars: +# DEV=/dev/dri/renderD128 +# +# VBR mode (default): +# B=3500k target video bitrate (1080p 10-bit starting point) +# MAX=5000k max video bitrate +# BUF=10000k VBV buffer +# +# CQP mode (with --cqp): +# QP=42 higher = smaller / lower quality (try 40-46 for 1080p) + +DEV="${DEV:-/dev/dri/renderD128}" + +B="${B:-1500k}" +MAX="${MAX:-2200k}" +BUF="${BUF:-4400k}" + +QP="${QP:-46}" + +dry_run=0 +skip_existing=1 +audio_mode="acc" # or "copy" +use_cqp=0 + +args=() +while [[ $# -gt 0 ]]; do + case "$1" in + -d | --dry-run) + dry_run=1 + shift + ;; + --no-skip) + skip_existing=0 + shift + ;; + --cqp) + use_cqp=1 + shift + ;; + --audio-encode) + [[ "${2:-}" == "aac" ]] || { + echo "Error: --audio-encode only supports: aac" >&2 + exit 1 + } + audio_mode="aac" + shift 2 + ;; + -h | --help) + sed -n '1,220p' "$0" + exit 0 + ;; + --) + shift + args+=("$@") + break + ;; + *) + args+=("$1") + shift + ;; + esac +done + +command -v ffmpeg >/dev/null 2>&1 || { + echo "Error: ffmpeg not found." >&2 + exit 1 +} + +if [[ ${#args[@]} -eq 0 ]]; then + echo "No input files. Provide file names/globs (e.g. *.mkv, *)." + exit 2 +fi + +for f in "${args[@]}"; do + [[ -e "$f" ]] || { + echo "Skip (missing): $f" + continue + } + [[ -f "$f" ]] || { + echo "Skip (not a file): $f" + continue + } + + base="${f##*/}" + stem="${base%.*}" + out_dir="$(dirname -- "$f")" + out="${out_dir}/${stem}.av1.mkv" + + if [[ $skip_existing -eq 1 && -e "$out" ]]; then + echo "Skip (exists): $out" + continue + fi + + echo "Transcoding: $f -> $out" + + if [[ "$audio_mode" == "aac" ]]; then + aopts=(-c:a aac -b:a 192k) + else + aopts=(-c:a copy) + fi + + # Video options: + # - Use p010le to preserve 10-bit sources (and avoid 8-bit nv12 forcing). + # - If your source is 8-bit, VAAPI will still handle it; p010le is generally safe. + if [[ $use_cqp -eq 1 ]]; then + vopts=(-c:v av1_vaapi -rc_mode CQP -qp "$QP") + else + vopts=(-c:v av1_vaapi -rc_mode VBR -b:v "$B" -maxrate "$MAX" -bufsize "$BUF") + fi + + cmd=( + ffmpeg -hide_banner -nostdin -y + -vaapi_device "$DEV" + -i "$f" + -map 0 + -vf 'format=p010le,hwupload' + "${vopts[@]}" + "${aopts[@]}" + -c:s copy + -c:t copy + -c:d copy + "$out" + ) + + if [[ $dry_run -eq 1 ]]; then + printf '%q ' "${cmd[@]}" + printf '\n' + else + "${cmd[@]}" + fi +done