migrate to dotter

This commit is contained in:
Alexander Navarro 2025-09-01 12:10:36 -04:00
parent c5618f2f2c
commit 23b6c0a596
265 changed files with 62 additions and 3125 deletions

View file

@ -0,0 +1,3 @@
if status is-interactive
# Commands to run in interactive sessions can go here
end

View file

@ -0,0 +1,31 @@
# This file contains fish universal variable definitions.
# VERSION: 3.0
SETUVAR __fish_initialized:3800
SETUVAR fish_color_autosuggestion:brblack
SETUVAR fish_color_cancel:\x2dr
SETUVAR fish_color_command:normal
SETUVAR fish_color_comment:red
SETUVAR fish_color_cwd:green
SETUVAR fish_color_cwd_root:red
SETUVAR fish_color_end:green
SETUVAR fish_color_error:brred
SETUVAR fish_color_escape:brcyan
SETUVAR fish_color_history_current:\x2d\x2dbold
SETUVAR fish_color_host:normal
SETUVAR fish_color_host_remote:yellow
SETUVAR fish_color_normal:normal
SETUVAR fish_color_operator:brcyan
SETUVAR fish_color_param:cyan
SETUVAR fish_color_quote:yellow
SETUVAR fish_color_redirection:cyan\x1e\x2d\x2dbold
SETUVAR fish_color_search_match:white\x1e\x2d\x2dbackground\x3dbrblack
SETUVAR fish_color_selection:white\x1e\x2d\x2dbold\x1e\x2d\x2dbackground\x3dbrblack
SETUVAR fish_color_status:red
SETUVAR fish_color_user:brgreen
SETUVAR fish_color_valid_path:\x2d\x2dunderline
SETUVAR fish_key_bindings:fish_default_key_bindings
SETUVAR fish_pager_color_completion:normal
SETUVAR fish_pager_color_description:yellow\x1e\x2di
SETUVAR fish_pager_color_prefix:normal\x1e\x2d\x2dbold\x1e\x2d\x2dunderline
SETUVAR fish_pager_color_progress:brwhite\x1e\x2d\x2dbackground\x3dcyan
SETUVAR fish_pager_color_selected_background:\x2dr

View file

@ -0,0 +1,423 @@
# Print an optspec for argparse to handle cmd's options that are independent of any subcommand.
function __fish_atuin_global_optspecs
string join \n h/help V/version
end
function __fish_atuin_needs_command
# Figure out if the current invocation already has a command.
set -l cmd (commandline -opc)
set -e cmd[1]
argparse -s (__fish_atuin_global_optspecs) -- $cmd 2>/dev/null
or return
if set -q argv[1]
# Also print the command, so this can be used to figure out what it is.
echo $argv[1]
return 1
end
return 0
end
function __fish_atuin_using_subcommand
set -l cmd (__fish_atuin_needs_command)
test -z "$cmd"
and return 1
contains -- $cmd[1] $argv
end
complete -c atuin -n "__fish_atuin_needs_command" -s h -l help -d 'Print help'
complete -c atuin -n "__fish_atuin_needs_command" -s V -l version -d 'Print version'
complete -c atuin -n "__fish_atuin_needs_command" -f -a "history" -d 'Manipulate shell history'
complete -c atuin -n "__fish_atuin_needs_command" -f -a "import" -d 'Import shell history from file'
complete -c atuin -n "__fish_atuin_needs_command" -f -a "stats" -d 'Calculate statistics for your history'
complete -c atuin -n "__fish_atuin_needs_command" -f -a "search" -d 'Interactive history search'
complete -c atuin -n "__fish_atuin_needs_command" -f -a "sync" -d 'Sync with the configured server'
complete -c atuin -n "__fish_atuin_needs_command" -f -a "login" -d 'Login to the configured server'
complete -c atuin -n "__fish_atuin_needs_command" -f -a "logout" -d 'Log out'
complete -c atuin -n "__fish_atuin_needs_command" -f -a "register" -d 'Register with the configured server'
complete -c atuin -n "__fish_atuin_needs_command" -f -a "key" -d 'Print the encryption key for transfer to another machine'
complete -c atuin -n "__fish_atuin_needs_command" -f -a "status" -d 'Display the sync status'
complete -c atuin -n "__fish_atuin_needs_command" -f -a "account" -d 'Manage your sync account'
complete -c atuin -n "__fish_atuin_needs_command" -f -a "kv" -d 'Get or set small key-value pairs'
complete -c atuin -n "__fish_atuin_needs_command" -f -a "store" -d 'Manage the atuin data store'
complete -c atuin -n "__fish_atuin_needs_command" -f -a "dotfiles" -d 'Manage your dotfiles with Atuin'
complete -c atuin -n "__fish_atuin_needs_command" -f -a "scripts" -d 'Manage your scripts with Atuin'
complete -c atuin -n "__fish_atuin_needs_command" -f -a "init" -d 'Print Atuin\'s shell init script'
complete -c atuin -n "__fish_atuin_needs_command" -f -a "info" -d 'Information about dotfiles locations and ENV vars'
complete -c atuin -n "__fish_atuin_needs_command" -f -a "doctor" -d 'Run the doctor to check for common issues'
complete -c atuin -n "__fish_atuin_needs_command" -f -a "wrapped"
complete -c atuin -n "__fish_atuin_needs_command" -f -a "daemon" -d '*Experimental* Start the background daemon'
complete -c atuin -n "__fish_atuin_needs_command" -f -a "default-config" -d 'Print the default atuin configuration (config.toml)'
complete -c atuin -n "__fish_atuin_needs_command" -f -a "server" -d 'Start an atuin server'
complete -c atuin -n "__fish_atuin_needs_command" -f -a "uuid" -d 'Generate a UUID'
complete -c atuin -n "__fish_atuin_needs_command" -f -a "contributors"
complete -c atuin -n "__fish_atuin_needs_command" -f -a "gen-completions" -d 'Generate shell completions'
complete -c atuin -n "__fish_atuin_needs_command" -f -a "help" -d 'Print this message or the help of the given subcommand(s)'
complete -c atuin -n "__fish_atuin_using_subcommand history; and not __fish_seen_subcommand_from start end list last init-store prune dedup help" -s h -l help -d 'Print help'
complete -c atuin -n "__fish_atuin_using_subcommand history; and not __fish_seen_subcommand_from start end list last init-store prune dedup help" -f -a "start" -d 'Begins a new command in the history'
complete -c atuin -n "__fish_atuin_using_subcommand history; and not __fish_seen_subcommand_from start end list last init-store prune dedup help" -f -a "end" -d 'Finishes a new command in the history (adds time, exit code)'
complete -c atuin -n "__fish_atuin_using_subcommand history; and not __fish_seen_subcommand_from start end list last init-store prune dedup help" -f -a "list" -d 'List all items in history'
complete -c atuin -n "__fish_atuin_using_subcommand history; and not __fish_seen_subcommand_from start end list last init-store prune dedup help" -f -a "last" -d 'Get the last command ran'
complete -c atuin -n "__fish_atuin_using_subcommand history; and not __fish_seen_subcommand_from start end list last init-store prune dedup help" -f -a "init-store"
complete -c atuin -n "__fish_atuin_using_subcommand history; and not __fish_seen_subcommand_from start end list last init-store prune dedup help" -f -a "prune" -d 'Delete history entries matching the configured exclusion filters'
complete -c atuin -n "__fish_atuin_using_subcommand history; and not __fish_seen_subcommand_from start end list last init-store prune dedup help" -f -a "dedup" -d 'Delete duplicate history entries (that have the same command, cwd and hostname)'
complete -c atuin -n "__fish_atuin_using_subcommand history; and not __fish_seen_subcommand_from start end list last init-store prune dedup help" -f -a "help" -d 'Print this message or the help of the given subcommand(s)'
complete -c atuin -n "__fish_atuin_using_subcommand history; and __fish_seen_subcommand_from start" -s h -l help -d 'Print help'
complete -c atuin -n "__fish_atuin_using_subcommand history; and __fish_seen_subcommand_from end" -s e -l exit -r
complete -c atuin -n "__fish_atuin_using_subcommand history; and __fish_seen_subcommand_from end" -s d -l duration -r
complete -c atuin -n "__fish_atuin_using_subcommand history; and __fish_seen_subcommand_from end" -s h -l help -d 'Print help'
complete -c atuin -n "__fish_atuin_using_subcommand history; and __fish_seen_subcommand_from list" -s r -l reverse -r -f -a "true\t''
false\t''"
complete -c atuin -n "__fish_atuin_using_subcommand history; and __fish_seen_subcommand_from list" -l timezone -l tz -d 'Display the command time in another timezone other than the configured default' -r
complete -c atuin -n "__fish_atuin_using_subcommand history; and __fish_seen_subcommand_from list" -s f -l format -d 'Available variables: {command}, {directory}, {duration}, {user}, {host}, {exit} and {time}. Example: --format "{time} - [{duration}] - {directory}$\\t{command}"' -r
complete -c atuin -n "__fish_atuin_using_subcommand history; and __fish_seen_subcommand_from list" -s c -l cwd
complete -c atuin -n "__fish_atuin_using_subcommand history; and __fish_seen_subcommand_from list" -s s -l session
complete -c atuin -n "__fish_atuin_using_subcommand history; and __fish_seen_subcommand_from list" -l human
complete -c atuin -n "__fish_atuin_using_subcommand history; and __fish_seen_subcommand_from list" -l cmd-only -d 'Show only the text of the command'
complete -c atuin -n "__fish_atuin_using_subcommand history; and __fish_seen_subcommand_from list" -l print0 -d 'Terminate the output with a null, for better multiline support'
complete -c atuin -n "__fish_atuin_using_subcommand history; and __fish_seen_subcommand_from list" -s h -l help -d 'Print help (see more with \'--help\')'
complete -c atuin -n "__fish_atuin_using_subcommand history; and __fish_seen_subcommand_from last" -l timezone -l tz -d 'Display the command time in another timezone other than the configured default' -r
complete -c atuin -n "__fish_atuin_using_subcommand history; and __fish_seen_subcommand_from last" -s f -l format -d 'Available variables: {command}, {directory}, {duration}, {user}, {host} and {time}. Example: --format "{time} - [{duration}] - {directory}$\\t{command}"' -r
complete -c atuin -n "__fish_atuin_using_subcommand history; and __fish_seen_subcommand_from last" -l human
complete -c atuin -n "__fish_atuin_using_subcommand history; and __fish_seen_subcommand_from last" -l cmd-only -d 'Show only the text of the command'
complete -c atuin -n "__fish_atuin_using_subcommand history; and __fish_seen_subcommand_from last" -s h -l help -d 'Print help (see more with \'--help\')'
complete -c atuin -n "__fish_atuin_using_subcommand history; and __fish_seen_subcommand_from init-store" -s h -l help -d 'Print help'
complete -c atuin -n "__fish_atuin_using_subcommand history; and __fish_seen_subcommand_from prune" -s n -l dry-run -d 'List matching history lines without performing the actual deletion'
complete -c atuin -n "__fish_atuin_using_subcommand history; and __fish_seen_subcommand_from prune" -s h -l help -d 'Print help'
complete -c atuin -n "__fish_atuin_using_subcommand history; and __fish_seen_subcommand_from dedup" -s b -l before -d 'Only delete results added before this date' -r
complete -c atuin -n "__fish_atuin_using_subcommand history; and __fish_seen_subcommand_from dedup" -l dupkeep -d 'How many recent duplicates to keep' -r
complete -c atuin -n "__fish_atuin_using_subcommand history; and __fish_seen_subcommand_from dedup" -s n -l dry-run -d 'List matching history lines without performing the actual deletion'
complete -c atuin -n "__fish_atuin_using_subcommand history; and __fish_seen_subcommand_from dedup" -s h -l help -d 'Print help'
complete -c atuin -n "__fish_atuin_using_subcommand history; and __fish_seen_subcommand_from help" -f -a "start" -d 'Begins a new command in the history'
complete -c atuin -n "__fish_atuin_using_subcommand history; and __fish_seen_subcommand_from help" -f -a "end" -d 'Finishes a new command in the history (adds time, exit code)'
complete -c atuin -n "__fish_atuin_using_subcommand history; and __fish_seen_subcommand_from help" -f -a "list" -d 'List all items in history'
complete -c atuin -n "__fish_atuin_using_subcommand history; and __fish_seen_subcommand_from help" -f -a "last" -d 'Get the last command ran'
complete -c atuin -n "__fish_atuin_using_subcommand history; and __fish_seen_subcommand_from help" -f -a "init-store"
complete -c atuin -n "__fish_atuin_using_subcommand history; and __fish_seen_subcommand_from help" -f -a "prune" -d 'Delete history entries matching the configured exclusion filters'
complete -c atuin -n "__fish_atuin_using_subcommand history; and __fish_seen_subcommand_from help" -f -a "dedup" -d 'Delete duplicate history entries (that have the same command, cwd and hostname)'
complete -c atuin -n "__fish_atuin_using_subcommand history; and __fish_seen_subcommand_from help" -f -a "help" -d 'Print this message or the help of the given subcommand(s)'
complete -c atuin -n "__fish_atuin_using_subcommand import; and not __fish_seen_subcommand_from auto zsh zsh-hist-db bash replxx resh fish nu nu-hist-db xonsh xonsh-sqlite help" -s h -l help -d 'Print help'
complete -c atuin -n "__fish_atuin_using_subcommand import; and not __fish_seen_subcommand_from auto zsh zsh-hist-db bash replxx resh fish nu nu-hist-db xonsh xonsh-sqlite help" -f -a "auto" -d 'Import history for the current shell'
complete -c atuin -n "__fish_atuin_using_subcommand import; and not __fish_seen_subcommand_from auto zsh zsh-hist-db bash replxx resh fish nu nu-hist-db xonsh xonsh-sqlite help" -f -a "zsh" -d 'Import history from the zsh history file'
complete -c atuin -n "__fish_atuin_using_subcommand import; and not __fish_seen_subcommand_from auto zsh zsh-hist-db bash replxx resh fish nu nu-hist-db xonsh xonsh-sqlite help" -f -a "zsh-hist-db" -d 'Import history from the zsh history file'
complete -c atuin -n "__fish_atuin_using_subcommand import; and not __fish_seen_subcommand_from auto zsh zsh-hist-db bash replxx resh fish nu nu-hist-db xonsh xonsh-sqlite help" -f -a "bash" -d 'Import history from the bash history file'
complete -c atuin -n "__fish_atuin_using_subcommand import; and not __fish_seen_subcommand_from auto zsh zsh-hist-db bash replxx resh fish nu nu-hist-db xonsh xonsh-sqlite help" -f -a "replxx" -d 'Import history from the replxx history file'
complete -c atuin -n "__fish_atuin_using_subcommand import; and not __fish_seen_subcommand_from auto zsh zsh-hist-db bash replxx resh fish nu nu-hist-db xonsh xonsh-sqlite help" -f -a "resh" -d 'Import history from the resh history file'
complete -c atuin -n "__fish_atuin_using_subcommand import; and not __fish_seen_subcommand_from auto zsh zsh-hist-db bash replxx resh fish nu nu-hist-db xonsh xonsh-sqlite help" -f -a "fish" -d 'Import history from the fish history file'
complete -c atuin -n "__fish_atuin_using_subcommand import; and not __fish_seen_subcommand_from auto zsh zsh-hist-db bash replxx resh fish nu nu-hist-db xonsh xonsh-sqlite help" -f -a "nu" -d 'Import history from the nu history file'
complete -c atuin -n "__fish_atuin_using_subcommand import; and not __fish_seen_subcommand_from auto zsh zsh-hist-db bash replxx resh fish nu nu-hist-db xonsh xonsh-sqlite help" -f -a "nu-hist-db" -d 'Import history from the nu history file'
complete -c atuin -n "__fish_atuin_using_subcommand import; and not __fish_seen_subcommand_from auto zsh zsh-hist-db bash replxx resh fish nu nu-hist-db xonsh xonsh-sqlite help" -f -a "xonsh" -d 'Import history from xonsh json files'
complete -c atuin -n "__fish_atuin_using_subcommand import; and not __fish_seen_subcommand_from auto zsh zsh-hist-db bash replxx resh fish nu nu-hist-db xonsh xonsh-sqlite help" -f -a "xonsh-sqlite" -d 'Import history from xonsh sqlite db'
complete -c atuin -n "__fish_atuin_using_subcommand import; and not __fish_seen_subcommand_from auto zsh zsh-hist-db bash replxx resh fish nu nu-hist-db xonsh xonsh-sqlite help" -f -a "help" -d 'Print this message or the help of the given subcommand(s)'
complete -c atuin -n "__fish_atuin_using_subcommand import; and __fish_seen_subcommand_from auto" -s h -l help -d 'Print help'
complete -c atuin -n "__fish_atuin_using_subcommand import; and __fish_seen_subcommand_from zsh" -s h -l help -d 'Print help'
complete -c atuin -n "__fish_atuin_using_subcommand import; and __fish_seen_subcommand_from zsh-hist-db" -s h -l help -d 'Print help'
complete -c atuin -n "__fish_atuin_using_subcommand import; and __fish_seen_subcommand_from bash" -s h -l help -d 'Print help'
complete -c atuin -n "__fish_atuin_using_subcommand import; and __fish_seen_subcommand_from replxx" -s h -l help -d 'Print help'
complete -c atuin -n "__fish_atuin_using_subcommand import; and __fish_seen_subcommand_from resh" -s h -l help -d 'Print help'
complete -c atuin -n "__fish_atuin_using_subcommand import; and __fish_seen_subcommand_from fish" -s h -l help -d 'Print help'
complete -c atuin -n "__fish_atuin_using_subcommand import; and __fish_seen_subcommand_from nu" -s h -l help -d 'Print help'
complete -c atuin -n "__fish_atuin_using_subcommand import; and __fish_seen_subcommand_from nu-hist-db" -s h -l help -d 'Print help'
complete -c atuin -n "__fish_atuin_using_subcommand import; and __fish_seen_subcommand_from xonsh" -s h -l help -d 'Print help'
complete -c atuin -n "__fish_atuin_using_subcommand import; and __fish_seen_subcommand_from xonsh-sqlite" -s h -l help -d 'Print help'
complete -c atuin -n "__fish_atuin_using_subcommand import; and __fish_seen_subcommand_from help" -f -a "auto" -d 'Import history for the current shell'
complete -c atuin -n "__fish_atuin_using_subcommand import; and __fish_seen_subcommand_from help" -f -a "zsh" -d 'Import history from the zsh history file'
complete -c atuin -n "__fish_atuin_using_subcommand import; and __fish_seen_subcommand_from help" -f -a "zsh-hist-db" -d 'Import history from the zsh history file'
complete -c atuin -n "__fish_atuin_using_subcommand import; and __fish_seen_subcommand_from help" -f -a "bash" -d 'Import history from the bash history file'
complete -c atuin -n "__fish_atuin_using_subcommand import; and __fish_seen_subcommand_from help" -f -a "replxx" -d 'Import history from the replxx history file'
complete -c atuin -n "__fish_atuin_using_subcommand import; and __fish_seen_subcommand_from help" -f -a "resh" -d 'Import history from the resh history file'
complete -c atuin -n "__fish_atuin_using_subcommand import; and __fish_seen_subcommand_from help" -f -a "fish" -d 'Import history from the fish history file'
complete -c atuin -n "__fish_atuin_using_subcommand import; and __fish_seen_subcommand_from help" -f -a "nu" -d 'Import history from the nu history file'
complete -c atuin -n "__fish_atuin_using_subcommand import; and __fish_seen_subcommand_from help" -f -a "nu-hist-db" -d 'Import history from the nu history file'
complete -c atuin -n "__fish_atuin_using_subcommand import; and __fish_seen_subcommand_from help" -f -a "xonsh" -d 'Import history from xonsh json files'
complete -c atuin -n "__fish_atuin_using_subcommand import; and __fish_seen_subcommand_from help" -f -a "xonsh-sqlite" -d 'Import history from xonsh sqlite db'
complete -c atuin -n "__fish_atuin_using_subcommand import; and __fish_seen_subcommand_from help" -f -a "help" -d 'Print this message or the help of the given subcommand(s)'
complete -c atuin -n "__fish_atuin_using_subcommand stats" -s c -l count -d 'How many top commands to list' -r
complete -c atuin -n "__fish_atuin_using_subcommand stats" -s n -l ngram-size -d 'The number of consecutive commands to consider' -r
complete -c atuin -n "__fish_atuin_using_subcommand stats" -s h -l help -d 'Print help'
complete -c atuin -n "__fish_atuin_using_subcommand search" -s c -l cwd -d 'Filter search result by directory' -r
complete -c atuin -n "__fish_atuin_using_subcommand search" -l exclude-cwd -d 'Exclude directory from results' -r
complete -c atuin -n "__fish_atuin_using_subcommand search" -s e -l exit -d 'Filter search result by exit code' -r
complete -c atuin -n "__fish_atuin_using_subcommand search" -l exclude-exit -d 'Exclude results with this exit code' -r
complete -c atuin -n "__fish_atuin_using_subcommand search" -s b -l before -d 'Only include results added before this date' -r
complete -c atuin -n "__fish_atuin_using_subcommand search" -l after -d 'Only include results after this date' -r
complete -c atuin -n "__fish_atuin_using_subcommand search" -l limit -d 'How many entries to return at most' -r
complete -c atuin -n "__fish_atuin_using_subcommand search" -l offset -d 'Offset from the start of the results' -r
complete -c atuin -n "__fish_atuin_using_subcommand search" -l filter-mode -d 'Allow overriding filter mode over config' -r -f -a "global\t''
host\t''
session\t''
directory\t''
workspace\t''"
complete -c atuin -n "__fish_atuin_using_subcommand search" -l search-mode -d 'Allow overriding search mode over config' -r -f -a "prefix\t''
full-text\t''
fuzzy\t''
skim\t''"
complete -c atuin -n "__fish_atuin_using_subcommand search" -l keymap-mode -d 'Notify the keymap at the shell\'s side' -r -f -a "emacs\t''
vim-normal\t''
vim-insert\t''
auto\t''"
complete -c atuin -n "__fish_atuin_using_subcommand search" -l timezone -l tz -d 'Display the command time in another timezone other than the configured default' -r
complete -c atuin -n "__fish_atuin_using_subcommand search" -s f -l format -d 'Available variables: {command}, {directory}, {duration}, {user}, {host}, {time}, {exit} and {relativetime}. Example: --format "{time} - [{duration}] - {directory}$\\t{command}"' -r
complete -c atuin -n "__fish_atuin_using_subcommand search" -l inline-height -d 'Set the maximum number of lines Atuin\'s interface should take up' -r
complete -c atuin -n "__fish_atuin_using_subcommand search" -s i -l interactive -d 'Open interactive search UI'
complete -c atuin -n "__fish_atuin_using_subcommand search" -l shell-up-key-binding -d 'Marker argument used to inform atuin that it was invoked from a shell up-key binding (hidden from help to avoid confusion)'
complete -c atuin -n "__fish_atuin_using_subcommand search" -l human -d 'Use human-readable formatting for time'
complete -c atuin -n "__fish_atuin_using_subcommand search" -l cmd-only -d 'Show only the text of the command'
complete -c atuin -n "__fish_atuin_using_subcommand search" -l print0 -d 'Terminate the output with a null, for better multiline handling'
complete -c atuin -n "__fish_atuin_using_subcommand search" -l delete -d 'Delete anything matching this query. Will not print out the match'
complete -c atuin -n "__fish_atuin_using_subcommand search" -l delete-it-all -d 'Delete EVERYTHING!'
complete -c atuin -n "__fish_atuin_using_subcommand search" -s r -l reverse -d 'Reverse the order of results, oldest first'
complete -c atuin -n "__fish_atuin_using_subcommand search" -l include-duplicates -d 'Include duplicate commands in the output (non-interactive only)'
complete -c atuin -n "__fish_atuin_using_subcommand search" -s h -l help -d 'Print help (see more with \'--help\')'
complete -c atuin -n "__fish_atuin_using_subcommand sync" -s f -l force -d 'Force re-download everything'
complete -c atuin -n "__fish_atuin_using_subcommand sync" -s h -l help -d 'Print help'
complete -c atuin -n "__fish_atuin_using_subcommand login" -s u -l username -r
complete -c atuin -n "__fish_atuin_using_subcommand login" -s p -l password -r
complete -c atuin -n "__fish_atuin_using_subcommand login" -s k -l key -d 'The encryption key for your account' -r
complete -c atuin -n "__fish_atuin_using_subcommand login" -s h -l help -d 'Print help'
complete -c atuin -n "__fish_atuin_using_subcommand logout" -s h -l help -d 'Print help'
complete -c atuin -n "__fish_atuin_using_subcommand register" -s u -l username -r
complete -c atuin -n "__fish_atuin_using_subcommand register" -s p -l password -r
complete -c atuin -n "__fish_atuin_using_subcommand register" -s e -l email -r
complete -c atuin -n "__fish_atuin_using_subcommand register" -s h -l help -d 'Print help'
complete -c atuin -n "__fish_atuin_using_subcommand key" -l base64 -d 'Switch to base64 output of the key'
complete -c atuin -n "__fish_atuin_using_subcommand key" -s h -l help -d 'Print help'
complete -c atuin -n "__fish_atuin_using_subcommand status" -s h -l help -d 'Print help'
complete -c atuin -n "__fish_atuin_using_subcommand account; and not __fish_seen_subcommand_from login register logout delete change-password verify help" -s h -l help -d 'Print help'
complete -c atuin -n "__fish_atuin_using_subcommand account; and not __fish_seen_subcommand_from login register logout delete change-password verify help" -f -a "login" -d 'Login to the configured server'
complete -c atuin -n "__fish_atuin_using_subcommand account; and not __fish_seen_subcommand_from login register logout delete change-password verify help" -f -a "register" -d 'Register a new account'
complete -c atuin -n "__fish_atuin_using_subcommand account; and not __fish_seen_subcommand_from login register logout delete change-password verify help" -f -a "logout" -d 'Log out'
complete -c atuin -n "__fish_atuin_using_subcommand account; and not __fish_seen_subcommand_from login register logout delete change-password verify help" -f -a "delete" -d 'Delete your account, and all synced data'
complete -c atuin -n "__fish_atuin_using_subcommand account; and not __fish_seen_subcommand_from login register logout delete change-password verify help" -f -a "change-password" -d 'Change your password'
complete -c atuin -n "__fish_atuin_using_subcommand account; and not __fish_seen_subcommand_from login register logout delete change-password verify help" -f -a "verify" -d 'Verify your account'
complete -c atuin -n "__fish_atuin_using_subcommand account; and not __fish_seen_subcommand_from login register logout delete change-password verify help" -f -a "help" -d 'Print this message or the help of the given subcommand(s)'
complete -c atuin -n "__fish_atuin_using_subcommand account; and __fish_seen_subcommand_from login" -s u -l username -r
complete -c atuin -n "__fish_atuin_using_subcommand account; and __fish_seen_subcommand_from login" -s p -l password -r
complete -c atuin -n "__fish_atuin_using_subcommand account; and __fish_seen_subcommand_from login" -s k -l key -d 'The encryption key for your account' -r
complete -c atuin -n "__fish_atuin_using_subcommand account; and __fish_seen_subcommand_from login" -s h -l help -d 'Print help'
complete -c atuin -n "__fish_atuin_using_subcommand account; and __fish_seen_subcommand_from register" -s u -l username -r
complete -c atuin -n "__fish_atuin_using_subcommand account; and __fish_seen_subcommand_from register" -s p -l password -r
complete -c atuin -n "__fish_atuin_using_subcommand account; and __fish_seen_subcommand_from register" -s e -l email -r
complete -c atuin -n "__fish_atuin_using_subcommand account; and __fish_seen_subcommand_from register" -s h -l help -d 'Print help'
complete -c atuin -n "__fish_atuin_using_subcommand account; and __fish_seen_subcommand_from logout" -s h -l help -d 'Print help'
complete -c atuin -n "__fish_atuin_using_subcommand account; and __fish_seen_subcommand_from delete" -s h -l help -d 'Print help'
complete -c atuin -n "__fish_atuin_using_subcommand account; and __fish_seen_subcommand_from change-password" -s c -l current-password -r
complete -c atuin -n "__fish_atuin_using_subcommand account; and __fish_seen_subcommand_from change-password" -s n -l new-password -r
complete -c atuin -n "__fish_atuin_using_subcommand account; and __fish_seen_subcommand_from change-password" -s h -l help -d 'Print help'
complete -c atuin -n "__fish_atuin_using_subcommand account; and __fish_seen_subcommand_from verify" -s t -l token -r
complete -c atuin -n "__fish_atuin_using_subcommand account; and __fish_seen_subcommand_from verify" -s h -l help -d 'Print help'
complete -c atuin -n "__fish_atuin_using_subcommand account; and __fish_seen_subcommand_from help" -f -a "login" -d 'Login to the configured server'
complete -c atuin -n "__fish_atuin_using_subcommand account; and __fish_seen_subcommand_from help" -f -a "register" -d 'Register a new account'
complete -c atuin -n "__fish_atuin_using_subcommand account; and __fish_seen_subcommand_from help" -f -a "logout" -d 'Log out'
complete -c atuin -n "__fish_atuin_using_subcommand account; and __fish_seen_subcommand_from help" -f -a "delete" -d 'Delete your account, and all synced data'
complete -c atuin -n "__fish_atuin_using_subcommand account; and __fish_seen_subcommand_from help" -f -a "change-password" -d 'Change your password'
complete -c atuin -n "__fish_atuin_using_subcommand account; and __fish_seen_subcommand_from help" -f -a "verify" -d 'Verify your account'
complete -c atuin -n "__fish_atuin_using_subcommand account; and __fish_seen_subcommand_from help" -f -a "help" -d 'Print this message or the help of the given subcommand(s)'
complete -c atuin -n "__fish_atuin_using_subcommand kv; and not __fish_seen_subcommand_from set delete get list rebuild help" -s h -l help -d 'Print help'
complete -c atuin -n "__fish_atuin_using_subcommand kv; and not __fish_seen_subcommand_from set delete get list rebuild help" -f -a "set" -d 'Set a key-value pair'
complete -c atuin -n "__fish_atuin_using_subcommand kv; and not __fish_seen_subcommand_from set delete get list rebuild help" -f -a "delete" -d 'Delete one or more key-value pairs'
complete -c atuin -n "__fish_atuin_using_subcommand kv; and not __fish_seen_subcommand_from set delete get list rebuild help" -f -a "get" -d 'Retrieve a saved value'
complete -c atuin -n "__fish_atuin_using_subcommand kv; and not __fish_seen_subcommand_from set delete get list rebuild help" -f -a "list" -d 'List all keys in a namespace, or in all namespaces'
complete -c atuin -n "__fish_atuin_using_subcommand kv; and not __fish_seen_subcommand_from set delete get list rebuild help" -f -a "rebuild" -d 'Rebuild the KV store'
complete -c atuin -n "__fish_atuin_using_subcommand kv; and not __fish_seen_subcommand_from set delete get list rebuild help" -f -a "help" -d 'Print this message or the help of the given subcommand(s)'
complete -c atuin -n "__fish_atuin_using_subcommand kv; and __fish_seen_subcommand_from set" -s k -l key -d 'Key to set' -r
complete -c atuin -n "__fish_atuin_using_subcommand kv; and __fish_seen_subcommand_from set" -s n -l namespace -d 'Namespace for the key-value pair' -r
complete -c atuin -n "__fish_atuin_using_subcommand kv; and __fish_seen_subcommand_from set" -s h -l help -d 'Print help'
complete -c atuin -n "__fish_atuin_using_subcommand kv; and __fish_seen_subcommand_from delete" -s n -l namespace -d 'Namespace for the key-value pair' -r
complete -c atuin -n "__fish_atuin_using_subcommand kv; and __fish_seen_subcommand_from delete" -s h -l help -d 'Print help'
complete -c atuin -n "__fish_atuin_using_subcommand kv; and __fish_seen_subcommand_from get" -s n -l namespace -d 'Namespace for the key-value pair' -r
complete -c atuin -n "__fish_atuin_using_subcommand kv; and __fish_seen_subcommand_from get" -s h -l help -d 'Print help'
complete -c atuin -n "__fish_atuin_using_subcommand kv; and __fish_seen_subcommand_from list" -s n -l namespace -d 'Namespace to list keys from' -r
complete -c atuin -n "__fish_atuin_using_subcommand kv; and __fish_seen_subcommand_from list" -s a -l all-namespaces -d 'List all keys in all namespaces'
complete -c atuin -n "__fish_atuin_using_subcommand kv; and __fish_seen_subcommand_from list" -s h -l help -d 'Print help'
complete -c atuin -n "__fish_atuin_using_subcommand kv; and __fish_seen_subcommand_from rebuild" -s h -l help -d 'Print help'
complete -c atuin -n "__fish_atuin_using_subcommand kv; and __fish_seen_subcommand_from help" -f -a "set" -d 'Set a key-value pair'
complete -c atuin -n "__fish_atuin_using_subcommand kv; and __fish_seen_subcommand_from help" -f -a "delete" -d 'Delete one or more key-value pairs'
complete -c atuin -n "__fish_atuin_using_subcommand kv; and __fish_seen_subcommand_from help" -f -a "get" -d 'Retrieve a saved value'
complete -c atuin -n "__fish_atuin_using_subcommand kv; and __fish_seen_subcommand_from help" -f -a "list" -d 'List all keys in a namespace, or in all namespaces'
complete -c atuin -n "__fish_atuin_using_subcommand kv; and __fish_seen_subcommand_from help" -f -a "rebuild" -d 'Rebuild the KV store'
complete -c atuin -n "__fish_atuin_using_subcommand kv; and __fish_seen_subcommand_from help" -f -a "help" -d 'Print this message or the help of the given subcommand(s)'
complete -c atuin -n "__fish_atuin_using_subcommand store; and not __fish_seen_subcommand_from status rebuild rekey purge verify push pull help" -s h -l help -d 'Print help'
complete -c atuin -n "__fish_atuin_using_subcommand store; and not __fish_seen_subcommand_from status rebuild rekey purge verify push pull help" -f -a "status" -d 'Print the current status of the record store'
complete -c atuin -n "__fish_atuin_using_subcommand store; and not __fish_seen_subcommand_from status rebuild rekey purge verify push pull help" -f -a "rebuild" -d 'Rebuild a store (eg atuin store rebuild history)'
complete -c atuin -n "__fish_atuin_using_subcommand store; and not __fish_seen_subcommand_from status rebuild rekey purge verify push pull help" -f -a "rekey" -d 'Re-encrypt the store with a new key (potential for data loss!)'
complete -c atuin -n "__fish_atuin_using_subcommand store; and not __fish_seen_subcommand_from status rebuild rekey purge verify push pull help" -f -a "purge" -d 'Delete all records in the store that cannot be decrypted with the current key'
complete -c atuin -n "__fish_atuin_using_subcommand store; and not __fish_seen_subcommand_from status rebuild rekey purge verify push pull help" -f -a "verify" -d 'Verify that all records in the store can be decrypted with the current key'
complete -c atuin -n "__fish_atuin_using_subcommand store; and not __fish_seen_subcommand_from status rebuild rekey purge verify push pull help" -f -a "push" -d 'Push all records to the remote sync server (one way sync)'
complete -c atuin -n "__fish_atuin_using_subcommand store; and not __fish_seen_subcommand_from status rebuild rekey purge verify push pull help" -f -a "pull" -d 'Pull records from the remote sync server (one way sync)'
complete -c atuin -n "__fish_atuin_using_subcommand store; and not __fish_seen_subcommand_from status rebuild rekey purge verify push pull help" -f -a "help" -d 'Print this message or the help of the given subcommand(s)'
complete -c atuin -n "__fish_atuin_using_subcommand store; and __fish_seen_subcommand_from status" -s h -l help -d 'Print help'
complete -c atuin -n "__fish_atuin_using_subcommand store; and __fish_seen_subcommand_from rebuild" -s h -l help -d 'Print help'
complete -c atuin -n "__fish_atuin_using_subcommand store; and __fish_seen_subcommand_from rekey" -s h -l help -d 'Print help'
complete -c atuin -n "__fish_atuin_using_subcommand store; and __fish_seen_subcommand_from purge" -s h -l help -d 'Print help'
complete -c atuin -n "__fish_atuin_using_subcommand store; and __fish_seen_subcommand_from verify" -s h -l help -d 'Print help'
complete -c atuin -n "__fish_atuin_using_subcommand store; and __fish_seen_subcommand_from push" -s t -l tag -d 'The tag to push (eg, \'history\'). Defaults to all tags' -r
complete -c atuin -n "__fish_atuin_using_subcommand store; and __fish_seen_subcommand_from push" -l host -d 'The host to push, in the form of a UUID host ID. Defaults to the current host' -r
complete -c atuin -n "__fish_atuin_using_subcommand store; and __fish_seen_subcommand_from push" -l force -d 'Force push records This will override both host and tag, to be all hosts and all tags. First clear the remote store, then upload all of the local store'
complete -c atuin -n "__fish_atuin_using_subcommand store; and __fish_seen_subcommand_from push" -s h -l help -d 'Print help'
complete -c atuin -n "__fish_atuin_using_subcommand store; and __fish_seen_subcommand_from pull" -s t -l tag -d 'The tag to push (eg, \'history\'). Defaults to all tags' -r
complete -c atuin -n "__fish_atuin_using_subcommand store; and __fish_seen_subcommand_from pull" -l force -d 'Force push records This will first wipe the local store, and then download all records from the remote'
complete -c atuin -n "__fish_atuin_using_subcommand store; and __fish_seen_subcommand_from pull" -s h -l help -d 'Print help'
complete -c atuin -n "__fish_atuin_using_subcommand store; and __fish_seen_subcommand_from help" -f -a "status" -d 'Print the current status of the record store'
complete -c atuin -n "__fish_atuin_using_subcommand store; and __fish_seen_subcommand_from help" -f -a "rebuild" -d 'Rebuild a store (eg atuin store rebuild history)'
complete -c atuin -n "__fish_atuin_using_subcommand store; and __fish_seen_subcommand_from help" -f -a "rekey" -d 'Re-encrypt the store with a new key (potential for data loss!)'
complete -c atuin -n "__fish_atuin_using_subcommand store; and __fish_seen_subcommand_from help" -f -a "purge" -d 'Delete all records in the store that cannot be decrypted with the current key'
complete -c atuin -n "__fish_atuin_using_subcommand store; and __fish_seen_subcommand_from help" -f -a "verify" -d 'Verify that all records in the store can be decrypted with the current key'
complete -c atuin -n "__fish_atuin_using_subcommand store; and __fish_seen_subcommand_from help" -f -a "push" -d 'Push all records to the remote sync server (one way sync)'
complete -c atuin -n "__fish_atuin_using_subcommand store; and __fish_seen_subcommand_from help" -f -a "pull" -d 'Pull records from the remote sync server (one way sync)'
complete -c atuin -n "__fish_atuin_using_subcommand store; and __fish_seen_subcommand_from help" -f -a "help" -d 'Print this message or the help of the given subcommand(s)'
complete -c atuin -n "__fish_atuin_using_subcommand dotfiles; and not __fish_seen_subcommand_from alias var help" -s h -l help -d 'Print help'
complete -c atuin -n "__fish_atuin_using_subcommand dotfiles; and not __fish_seen_subcommand_from alias var help" -f -a "alias" -d 'Manage shell aliases with Atuin'
complete -c atuin -n "__fish_atuin_using_subcommand dotfiles; and not __fish_seen_subcommand_from alias var help" -f -a "var" -d 'Manage shell and environment variables with Atuin'
complete -c atuin -n "__fish_atuin_using_subcommand dotfiles; and not __fish_seen_subcommand_from alias var help" -f -a "help" -d 'Print this message or the help of the given subcommand(s)'
complete -c atuin -n "__fish_atuin_using_subcommand dotfiles; and __fish_seen_subcommand_from alias" -s h -l help -d 'Print help'
complete -c atuin -n "__fish_atuin_using_subcommand dotfiles; and __fish_seen_subcommand_from alias" -f -a "set" -d 'Set an alias'
complete -c atuin -n "__fish_atuin_using_subcommand dotfiles; and __fish_seen_subcommand_from alias" -f -a "delete" -d 'Delete an alias'
complete -c atuin -n "__fish_atuin_using_subcommand dotfiles; and __fish_seen_subcommand_from alias" -f -a "list" -d 'List all aliases'
complete -c atuin -n "__fish_atuin_using_subcommand dotfiles; and __fish_seen_subcommand_from alias" -f -a "clear" -d 'Delete all aliases'
complete -c atuin -n "__fish_atuin_using_subcommand dotfiles; and __fish_seen_subcommand_from alias" -f -a "help" -d 'Print this message or the help of the given subcommand(s)'
complete -c atuin -n "__fish_atuin_using_subcommand dotfiles; and __fish_seen_subcommand_from var" -s h -l help -d 'Print help'
complete -c atuin -n "__fish_atuin_using_subcommand dotfiles; and __fish_seen_subcommand_from var" -f -a "set" -d 'Set a variable'
complete -c atuin -n "__fish_atuin_using_subcommand dotfiles; and __fish_seen_subcommand_from var" -f -a "delete" -d 'Delete a variable'
complete -c atuin -n "__fish_atuin_using_subcommand dotfiles; and __fish_seen_subcommand_from var" -f -a "list" -d 'List all variables'
complete -c atuin -n "__fish_atuin_using_subcommand dotfiles; and __fish_seen_subcommand_from var" -f -a "help" -d 'Print this message or the help of the given subcommand(s)'
complete -c atuin -n "__fish_atuin_using_subcommand dotfiles; and __fish_seen_subcommand_from help" -f -a "alias" -d 'Manage shell aliases with Atuin'
complete -c atuin -n "__fish_atuin_using_subcommand dotfiles; and __fish_seen_subcommand_from help" -f -a "var" -d 'Manage shell and environment variables with Atuin'
complete -c atuin -n "__fish_atuin_using_subcommand dotfiles; and __fish_seen_subcommand_from help" -f -a "help" -d 'Print this message or the help of the given subcommand(s)'
complete -c atuin -n "__fish_atuin_using_subcommand scripts; and not __fish_seen_subcommand_from new run list get edit delete help" -s h -l help -d 'Print help'
complete -c atuin -n "__fish_atuin_using_subcommand scripts; and not __fish_seen_subcommand_from new run list get edit delete help" -f -a "new"
complete -c atuin -n "__fish_atuin_using_subcommand scripts; and not __fish_seen_subcommand_from new run list get edit delete help" -f -a "run"
complete -c atuin -n "__fish_atuin_using_subcommand scripts; and not __fish_seen_subcommand_from new run list get edit delete help" -f -a "list"
complete -c atuin -n "__fish_atuin_using_subcommand scripts; and not __fish_seen_subcommand_from new run list get edit delete help" -f -a "get"
complete -c atuin -n "__fish_atuin_using_subcommand scripts; and not __fish_seen_subcommand_from new run list get edit delete help" -f -a "edit"
complete -c atuin -n "__fish_atuin_using_subcommand scripts; and not __fish_seen_subcommand_from new run list get edit delete help" -f -a "delete"
complete -c atuin -n "__fish_atuin_using_subcommand scripts; and not __fish_seen_subcommand_from new run list get edit delete help" -f -a "help" -d 'Print this message or the help of the given subcommand(s)'
complete -c atuin -n "__fish_atuin_using_subcommand scripts; and __fish_seen_subcommand_from new" -s d -l description -r
complete -c atuin -n "__fish_atuin_using_subcommand scripts; and __fish_seen_subcommand_from new" -s t -l tags -r
complete -c atuin -n "__fish_atuin_using_subcommand scripts; and __fish_seen_subcommand_from new" -s s -l shebang -r
complete -c atuin -n "__fish_atuin_using_subcommand scripts; and __fish_seen_subcommand_from new" -l script -r -F
complete -c atuin -n "__fish_atuin_using_subcommand scripts; and __fish_seen_subcommand_from new" -l last -d 'Use the last command as the script content Optionally specify a number to use the last N commands' -r
complete -c atuin -n "__fish_atuin_using_subcommand scripts; and __fish_seen_subcommand_from new" -l no-edit -d 'Skip opening editor when using --last'
complete -c atuin -n "__fish_atuin_using_subcommand scripts; and __fish_seen_subcommand_from new" -s h -l help -d 'Print help'
complete -c atuin -n "__fish_atuin_using_subcommand scripts; and __fish_seen_subcommand_from run" -s v -l var -d 'Specify template variables in the format KEY=VALUE Example: -v name=John -v greeting="Hello there"' -r
complete -c atuin -n "__fish_atuin_using_subcommand scripts; and __fish_seen_subcommand_from run" -s h -l help -d 'Print help'
complete -c atuin -n "__fish_atuin_using_subcommand scripts; and __fish_seen_subcommand_from list" -s h -l help -d 'Print help'
complete -c atuin -n "__fish_atuin_using_subcommand scripts; and __fish_seen_subcommand_from get" -s s -l script -d 'Display only the executable script with shebang'
complete -c atuin -n "__fish_atuin_using_subcommand scripts; and __fish_seen_subcommand_from get" -s h -l help -d 'Print help'
complete -c atuin -n "__fish_atuin_using_subcommand scripts; and __fish_seen_subcommand_from edit" -s d -l description -r
complete -c atuin -n "__fish_atuin_using_subcommand scripts; and __fish_seen_subcommand_from edit" -s t -l tags -d 'Replace all existing tags with these new tags' -r
complete -c atuin -n "__fish_atuin_using_subcommand scripts; and __fish_seen_subcommand_from edit" -l rename -d 'Rename the script' -r
complete -c atuin -n "__fish_atuin_using_subcommand scripts; and __fish_seen_subcommand_from edit" -s s -l shebang -r
complete -c atuin -n "__fish_atuin_using_subcommand scripts; and __fish_seen_subcommand_from edit" -l script -r -F
complete -c atuin -n "__fish_atuin_using_subcommand scripts; and __fish_seen_subcommand_from edit" -l no-tags -d 'Remove all tags from the script'
complete -c atuin -n "__fish_atuin_using_subcommand scripts; and __fish_seen_subcommand_from edit" -l no-edit -d 'Skip opening editor'
complete -c atuin -n "__fish_atuin_using_subcommand scripts; and __fish_seen_subcommand_from edit" -s h -l help -d 'Print help'
complete -c atuin -n "__fish_atuin_using_subcommand scripts; and __fish_seen_subcommand_from delete" -s f -l force
complete -c atuin -n "__fish_atuin_using_subcommand scripts; and __fish_seen_subcommand_from delete" -s h -l help -d 'Print help'
complete -c atuin -n "__fish_atuin_using_subcommand scripts; and __fish_seen_subcommand_from help" -f -a "new"
complete -c atuin -n "__fish_atuin_using_subcommand scripts; and __fish_seen_subcommand_from help" -f -a "run"
complete -c atuin -n "__fish_atuin_using_subcommand scripts; and __fish_seen_subcommand_from help" -f -a "list"
complete -c atuin -n "__fish_atuin_using_subcommand scripts; and __fish_seen_subcommand_from help" -f -a "get"
complete -c atuin -n "__fish_atuin_using_subcommand scripts; and __fish_seen_subcommand_from help" -f -a "edit"
complete -c atuin -n "__fish_atuin_using_subcommand scripts; and __fish_seen_subcommand_from help" -f -a "delete"
complete -c atuin -n "__fish_atuin_using_subcommand scripts; and __fish_seen_subcommand_from help" -f -a "help" -d 'Print this message or the help of the given subcommand(s)'
complete -c atuin -n "__fish_atuin_using_subcommand init" -l disable-ctrl-r -d 'Disable the binding of CTRL-R to atuin'
complete -c atuin -n "__fish_atuin_using_subcommand init" -l disable-up-arrow -d 'Disable the binding of the Up Arrow key to atuin'
complete -c atuin -n "__fish_atuin_using_subcommand init" -s h -l help -d 'Print help (see more with \'--help\')'
complete -c atuin -n "__fish_atuin_using_subcommand info" -s h -l help -d 'Print help'
complete -c atuin -n "__fish_atuin_using_subcommand doctor" -s h -l help -d 'Print help'
complete -c atuin -n "__fish_atuin_using_subcommand wrapped" -s h -l help -d 'Print help'
complete -c atuin -n "__fish_atuin_using_subcommand daemon" -s h -l help -d 'Print help'
complete -c atuin -n "__fish_atuin_using_subcommand default-config" -s h -l help -d 'Print help'
complete -c atuin -n "__fish_atuin_using_subcommand server; and not __fish_seen_subcommand_from start default-config help" -s h -l help -d 'Print help'
complete -c atuin -n "__fish_atuin_using_subcommand server; and not __fish_seen_subcommand_from start default-config help" -f -a "start" -d 'Start the server'
complete -c atuin -n "__fish_atuin_using_subcommand server; and not __fish_seen_subcommand_from start default-config help" -f -a "default-config" -d 'Print server example configuration'
complete -c atuin -n "__fish_atuin_using_subcommand server; and not __fish_seen_subcommand_from start default-config help" -f -a "help" -d 'Print this message or the help of the given subcommand(s)'
complete -c atuin -n "__fish_atuin_using_subcommand server; and __fish_seen_subcommand_from start" -l host -d 'The host address to bind' -r
complete -c atuin -n "__fish_atuin_using_subcommand server; and __fish_seen_subcommand_from start" -s p -l port -d 'The port to bind' -r
complete -c atuin -n "__fish_atuin_using_subcommand server; and __fish_seen_subcommand_from start" -s h -l help -d 'Print help'
complete -c atuin -n "__fish_atuin_using_subcommand server; and __fish_seen_subcommand_from default-config" -s h -l help -d 'Print help'
complete -c atuin -n "__fish_atuin_using_subcommand server; and __fish_seen_subcommand_from help" -f -a "start" -d 'Start the server'
complete -c atuin -n "__fish_atuin_using_subcommand server; and __fish_seen_subcommand_from help" -f -a "default-config" -d 'Print server example configuration'
complete -c atuin -n "__fish_atuin_using_subcommand server; and __fish_seen_subcommand_from help" -f -a "help" -d 'Print this message or the help of the given subcommand(s)'
complete -c atuin -n "__fish_atuin_using_subcommand uuid" -s h -l help -d 'Print help'
complete -c atuin -n "__fish_atuin_using_subcommand contributors" -s h -l help -d 'Print help'
complete -c atuin -n "__fish_atuin_using_subcommand gen-completions" -s s -l shell -d 'Set the shell for generating completions' -r -f -a "bash\t''
elvish\t''
fish\t''
nushell\t''
powershell\t''
zsh\t''"
complete -c atuin -n "__fish_atuin_using_subcommand gen-completions" -s o -l out-dir -d 'Set the output directory' -r
complete -c atuin -n "__fish_atuin_using_subcommand gen-completions" -s h -l help -d 'Print help'
complete -c atuin -n "__fish_atuin_using_subcommand help; and not __fish_seen_subcommand_from history import stats search sync login logout register key status account kv store dotfiles scripts init info doctor wrapped daemon default-config server uuid contributors gen-completions help" -f -a "history" -d 'Manipulate shell history'
complete -c atuin -n "__fish_atuin_using_subcommand help; and not __fish_seen_subcommand_from history import stats search sync login logout register key status account kv store dotfiles scripts init info doctor wrapped daemon default-config server uuid contributors gen-completions help" -f -a "import" -d 'Import shell history from file'
complete -c atuin -n "__fish_atuin_using_subcommand help; and not __fish_seen_subcommand_from history import stats search sync login logout register key status account kv store dotfiles scripts init info doctor wrapped daemon default-config server uuid contributors gen-completions help" -f -a "stats" -d 'Calculate statistics for your history'
complete -c atuin -n "__fish_atuin_using_subcommand help; and not __fish_seen_subcommand_from history import stats search sync login logout register key status account kv store dotfiles scripts init info doctor wrapped daemon default-config server uuid contributors gen-completions help" -f -a "search" -d 'Interactive history search'
complete -c atuin -n "__fish_atuin_using_subcommand help; and not __fish_seen_subcommand_from history import stats search sync login logout register key status account kv store dotfiles scripts init info doctor wrapped daemon default-config server uuid contributors gen-completions help" -f -a "sync" -d 'Sync with the configured server'
complete -c atuin -n "__fish_atuin_using_subcommand help; and not __fish_seen_subcommand_from history import stats search sync login logout register key status account kv store dotfiles scripts init info doctor wrapped daemon default-config server uuid contributors gen-completions help" -f -a "login" -d 'Login to the configured server'
complete -c atuin -n "__fish_atuin_using_subcommand help; and not __fish_seen_subcommand_from history import stats search sync login logout register key status account kv store dotfiles scripts init info doctor wrapped daemon default-config server uuid contributors gen-completions help" -f -a "logout" -d 'Log out'
complete -c atuin -n "__fish_atuin_using_subcommand help; and not __fish_seen_subcommand_from history import stats search sync login logout register key status account kv store dotfiles scripts init info doctor wrapped daemon default-config server uuid contributors gen-completions help" -f -a "register" -d 'Register with the configured server'
complete -c atuin -n "__fish_atuin_using_subcommand help; and not __fish_seen_subcommand_from history import stats search sync login logout register key status account kv store dotfiles scripts init info doctor wrapped daemon default-config server uuid contributors gen-completions help" -f -a "key" -d 'Print the encryption key for transfer to another machine'
complete -c atuin -n "__fish_atuin_using_subcommand help; and not __fish_seen_subcommand_from history import stats search sync login logout register key status account kv store dotfiles scripts init info doctor wrapped daemon default-config server uuid contributors gen-completions help" -f -a "status" -d 'Display the sync status'
complete -c atuin -n "__fish_atuin_using_subcommand help; and not __fish_seen_subcommand_from history import stats search sync login logout register key status account kv store dotfiles scripts init info doctor wrapped daemon default-config server uuid contributors gen-completions help" -f -a "account" -d 'Manage your sync account'
complete -c atuin -n "__fish_atuin_using_subcommand help; and not __fish_seen_subcommand_from history import stats search sync login logout register key status account kv store dotfiles scripts init info doctor wrapped daemon default-config server uuid contributors gen-completions help" -f -a "kv" -d 'Get or set small key-value pairs'
complete -c atuin -n "__fish_atuin_using_subcommand help; and not __fish_seen_subcommand_from history import stats search sync login logout register key status account kv store dotfiles scripts init info doctor wrapped daemon default-config server uuid contributors gen-completions help" -f -a "store" -d 'Manage the atuin data store'
complete -c atuin -n "__fish_atuin_using_subcommand help; and not __fish_seen_subcommand_from history import stats search sync login logout register key status account kv store dotfiles scripts init info doctor wrapped daemon default-config server uuid contributors gen-completions help" -f -a "dotfiles" -d 'Manage your dotfiles with Atuin'
complete -c atuin -n "__fish_atuin_using_subcommand help; and not __fish_seen_subcommand_from history import stats search sync login logout register key status account kv store dotfiles scripts init info doctor wrapped daemon default-config server uuid contributors gen-completions help" -f -a "scripts" -d 'Manage your scripts with Atuin'
complete -c atuin -n "__fish_atuin_using_subcommand help; and not __fish_seen_subcommand_from history import stats search sync login logout register key status account kv store dotfiles scripts init info doctor wrapped daemon default-config server uuid contributors gen-completions help" -f -a "init" -d 'Print Atuin\'s shell init script'
complete -c atuin -n "__fish_atuin_using_subcommand help; and not __fish_seen_subcommand_from history import stats search sync login logout register key status account kv store dotfiles scripts init info doctor wrapped daemon default-config server uuid contributors gen-completions help" -f -a "info" -d 'Information about dotfiles locations and ENV vars'
complete -c atuin -n "__fish_atuin_using_subcommand help; and not __fish_seen_subcommand_from history import stats search sync login logout register key status account kv store dotfiles scripts init info doctor wrapped daemon default-config server uuid contributors gen-completions help" -f -a "doctor" -d 'Run the doctor to check for common issues'
complete -c atuin -n "__fish_atuin_using_subcommand help; and not __fish_seen_subcommand_from history import stats search sync login logout register key status account kv store dotfiles scripts init info doctor wrapped daemon default-config server uuid contributors gen-completions help" -f -a "wrapped"
complete -c atuin -n "__fish_atuin_using_subcommand help; and not __fish_seen_subcommand_from history import stats search sync login logout register key status account kv store dotfiles scripts init info doctor wrapped daemon default-config server uuid contributors gen-completions help" -f -a "daemon" -d '*Experimental* Start the background daemon'
complete -c atuin -n "__fish_atuin_using_subcommand help; and not __fish_seen_subcommand_from history import stats search sync login logout register key status account kv store dotfiles scripts init info doctor wrapped daemon default-config server uuid contributors gen-completions help" -f -a "default-config" -d 'Print the default atuin configuration (config.toml)'
complete -c atuin -n "__fish_atuin_using_subcommand help; and not __fish_seen_subcommand_from history import stats search sync login logout register key status account kv store dotfiles scripts init info doctor wrapped daemon default-config server uuid contributors gen-completions help" -f -a "server" -d 'Start an atuin server'
complete -c atuin -n "__fish_atuin_using_subcommand help; and not __fish_seen_subcommand_from history import stats search sync login logout register key status account kv store dotfiles scripts init info doctor wrapped daemon default-config server uuid contributors gen-completions help" -f -a "uuid" -d 'Generate a UUID'
complete -c atuin -n "__fish_atuin_using_subcommand help; and not __fish_seen_subcommand_from history import stats search sync login logout register key status account kv store dotfiles scripts init info doctor wrapped daemon default-config server uuid contributors gen-completions help" -f -a "contributors"
complete -c atuin -n "__fish_atuin_using_subcommand help; and not __fish_seen_subcommand_from history import stats search sync login logout register key status account kv store dotfiles scripts init info doctor wrapped daemon default-config server uuid contributors gen-completions help" -f -a "gen-completions" -d 'Generate shell completions'
complete -c atuin -n "__fish_atuin_using_subcommand help; and not __fish_seen_subcommand_from history import stats search sync login logout register key status account kv store dotfiles scripts init info doctor wrapped daemon default-config server uuid contributors gen-completions help" -f -a "help" -d 'Print this message or the help of the given subcommand(s)'
complete -c atuin -n "__fish_atuin_using_subcommand help; and __fish_seen_subcommand_from history" -f -a "start" -d 'Begins a new command in the history'
complete -c atuin -n "__fish_atuin_using_subcommand help; and __fish_seen_subcommand_from history" -f -a "end" -d 'Finishes a new command in the history (adds time, exit code)'
complete -c atuin -n "__fish_atuin_using_subcommand help; and __fish_seen_subcommand_from history" -f -a "list" -d 'List all items in history'
complete -c atuin -n "__fish_atuin_using_subcommand help; and __fish_seen_subcommand_from history" -f -a "last" -d 'Get the last command ran'
complete -c atuin -n "__fish_atuin_using_subcommand help; and __fish_seen_subcommand_from history" -f -a "init-store"
complete -c atuin -n "__fish_atuin_using_subcommand help; and __fish_seen_subcommand_from history" -f -a "prune" -d 'Delete history entries matching the configured exclusion filters'
complete -c atuin -n "__fish_atuin_using_subcommand help; and __fish_seen_subcommand_from history" -f -a "dedup" -d 'Delete duplicate history entries (that have the same command, cwd and hostname)'
complete -c atuin -n "__fish_atuin_using_subcommand help; and __fish_seen_subcommand_from import" -f -a "auto" -d 'Import history for the current shell'
complete -c atuin -n "__fish_atuin_using_subcommand help; and __fish_seen_subcommand_from import" -f -a "zsh" -d 'Import history from the zsh history file'
complete -c atuin -n "__fish_atuin_using_subcommand help; and __fish_seen_subcommand_from import" -f -a "zsh-hist-db" -d 'Import history from the zsh history file'
complete -c atuin -n "__fish_atuin_using_subcommand help; and __fish_seen_subcommand_from import" -f -a "bash" -d 'Import history from the bash history file'
complete -c atuin -n "__fish_atuin_using_subcommand help; and __fish_seen_subcommand_from import" -f -a "replxx" -d 'Import history from the replxx history file'
complete -c atuin -n "__fish_atuin_using_subcommand help; and __fish_seen_subcommand_from import" -f -a "resh" -d 'Import history from the resh history file'
complete -c atuin -n "__fish_atuin_using_subcommand help; and __fish_seen_subcommand_from import" -f -a "fish" -d 'Import history from the fish history file'
complete -c atuin -n "__fish_atuin_using_subcommand help; and __fish_seen_subcommand_from import" -f -a "nu" -d 'Import history from the nu history file'
complete -c atuin -n "__fish_atuin_using_subcommand help; and __fish_seen_subcommand_from import" -f -a "nu-hist-db" -d 'Import history from the nu history file'
complete -c atuin -n "__fish_atuin_using_subcommand help; and __fish_seen_subcommand_from import" -f -a "xonsh" -d 'Import history from xonsh json files'
complete -c atuin -n "__fish_atuin_using_subcommand help; and __fish_seen_subcommand_from import" -f -a "xonsh-sqlite" -d 'Import history from xonsh sqlite db'
complete -c atuin -n "__fish_atuin_using_subcommand help; and __fish_seen_subcommand_from account" -f -a "login" -d 'Login to the configured server'
complete -c atuin -n "__fish_atuin_using_subcommand help; and __fish_seen_subcommand_from account" -f -a "register" -d 'Register a new account'
complete -c atuin -n "__fish_atuin_using_subcommand help; and __fish_seen_subcommand_from account" -f -a "logout" -d 'Log out'
complete -c atuin -n "__fish_atuin_using_subcommand help; and __fish_seen_subcommand_from account" -f -a "delete" -d 'Delete your account, and all synced data'
complete -c atuin -n "__fish_atuin_using_subcommand help; and __fish_seen_subcommand_from account" -f -a "change-password" -d 'Change your password'
complete -c atuin -n "__fish_atuin_using_subcommand help; and __fish_seen_subcommand_from account" -f -a "verify" -d 'Verify your account'
complete -c atuin -n "__fish_atuin_using_subcommand help; and __fish_seen_subcommand_from kv" -f -a "set" -d 'Set a key-value pair'
complete -c atuin -n "__fish_atuin_using_subcommand help; and __fish_seen_subcommand_from kv" -f -a "delete" -d 'Delete one or more key-value pairs'
complete -c atuin -n "__fish_atuin_using_subcommand help; and __fish_seen_subcommand_from kv" -f -a "get" -d 'Retrieve a saved value'
complete -c atuin -n "__fish_atuin_using_subcommand help; and __fish_seen_subcommand_from kv" -f -a "list" -d 'List all keys in a namespace, or in all namespaces'
complete -c atuin -n "__fish_atuin_using_subcommand help; and __fish_seen_subcommand_from kv" -f -a "rebuild" -d 'Rebuild the KV store'
complete -c atuin -n "__fish_atuin_using_subcommand help; and __fish_seen_subcommand_from store" -f -a "status" -d 'Print the current status of the record store'
complete -c atuin -n "__fish_atuin_using_subcommand help; and __fish_seen_subcommand_from store" -f -a "rebuild" -d 'Rebuild a store (eg atuin store rebuild history)'
complete -c atuin -n "__fish_atuin_using_subcommand help; and __fish_seen_subcommand_from store" -f -a "rekey" -d 'Re-encrypt the store with a new key (potential for data loss!)'
complete -c atuin -n "__fish_atuin_using_subcommand help; and __fish_seen_subcommand_from store" -f -a "purge" -d 'Delete all records in the store that cannot be decrypted with the current key'
complete -c atuin -n "__fish_atuin_using_subcommand help; and __fish_seen_subcommand_from store" -f -a "verify" -d 'Verify that all records in the store can be decrypted with the current key'
complete -c atuin -n "__fish_atuin_using_subcommand help; and __fish_seen_subcommand_from store" -f -a "push" -d 'Push all records to the remote sync server (one way sync)'
complete -c atuin -n "__fish_atuin_using_subcommand help; and __fish_seen_subcommand_from store" -f -a "pull" -d 'Pull records from the remote sync server (one way sync)'
complete -c atuin -n "__fish_atuin_using_subcommand help; and __fish_seen_subcommand_from dotfiles" -f -a "alias" -d 'Manage shell aliases with Atuin'
complete -c atuin -n "__fish_atuin_using_subcommand help; and __fish_seen_subcommand_from dotfiles" -f -a "var" -d 'Manage shell and environment variables with Atuin'
complete -c atuin -n "__fish_atuin_using_subcommand help; and __fish_seen_subcommand_from scripts" -f -a "new"
complete -c atuin -n "__fish_atuin_using_subcommand help; and __fish_seen_subcommand_from scripts" -f -a "run"
complete -c atuin -n "__fish_atuin_using_subcommand help; and __fish_seen_subcommand_from scripts" -f -a "list"
complete -c atuin -n "__fish_atuin_using_subcommand help; and __fish_seen_subcommand_from scripts" -f -a "get"
complete -c atuin -n "__fish_atuin_using_subcommand help; and __fish_seen_subcommand_from scripts" -f -a "edit"
complete -c atuin -n "__fish_atuin_using_subcommand help; and __fish_seen_subcommand_from scripts" -f -a "delete"
complete -c atuin -n "__fish_atuin_using_subcommand help; and __fish_seen_subcommand_from server" -f -a "start" -d 'Start the server'
complete -c atuin -n "__fish_atuin_using_subcommand help; and __fish_seen_subcommand_from server" -f -a "default-config" -d 'Print server example configuration'

View file

@ -0,0 +1,331 @@
#
# AUTO GENERATED BY 'fish-lsp'
#
# * Any command should generate the completions file
#
# >_ fish-lsp complete > ~/.config/fish/completions/fish-lsp.fish
# >_ fish-lsp complete > $fish_complete_path[1]/fish-lsp.fish
# >_ yarn install && yarn dev # from inside the '~/path/to/fish-lsp' source code
#
# * You can test the completions by editing:
#
# ~/.config/fish/completions/fish-lsp.fish
#
# or by using the command:
#
# >_ fish-lsp complete
#
# to visually check what is wrong
#
# * To interactively test the completions, you can use:
#
# >_ complete -c fish-lsp -e # erase all fish-lsp completions
# >_ fish-lsp complete | source
#
# * For more info, try editing the generated output inside:
#
# ~/...install_path.../fish-lsp/src/utils/get-lsp-completions.ts
#
# * You can see if the completions are up to date by running the command:
#
# >_ fish-lsp info --check-health
#
# REPO URL: https://github.com/ndonfris/fish-lsp
#############################################
# helper functions for fish-lsp completions #
#############################################
# print all unique `fish-lsp start --enable|--disable ...` features (i.e., complete, hover, etc.)
# if a feature is already specified in the command line, it will be skipped
# the features can also be used in the global environment variables `fish_lsp_enabled_handlers` or `fish_lsp_disabled_handlers`
function __fish_lsp_get_features -d 'print all features controlled by the server, not yet used in the commandline'
set -l all_features 'complete' 'hover' 'rename' 'definition' 'implementation' 'reference' 'formatting' 'formatRange' 'typeFormatting' 'codeAction' 'codeLens' 'folding' 'signature' 'executeCommand' 'inlayHint' 'highlight' 'diagnostic' 'popups'
set -l features_to_complete
set -l features_to_skip
set -l opts (commandline -opc)
for opt in $opts
if contains -- $opt $all_features
set features_to_skip $features_to_skip $opt
end
end
for feature in $all_features
if not contains -- $feature $features_to_skip
printf '%b\t%s\n' $feature "$feature handler"
end
end
end
# print all unique 'fish-lsp env --only ...` env_variables (i.e., $fish_lsp_*, ...)
# if a env_variable is already specified in the command line, it will not be included again
function __fish_lsp_get_env_variables -d 'print all fish_lsp_* env variables, not yet used in the commandline'
# every env variable name
set -l env_names "fish_lsp_enabled_handlers" \
"fish_lsp_disabled_handlers" \
"fish_lsp_commit_characters" \
"fish_lsp_log_file" \
"fish_lsp_log_level" \
"fish_lsp_all_indexed_paths" \
"fish_lsp_modifiable_paths" \
"fish_lsp_diagnostic_disable_error_codes" \
"fish_lsp_enable_experimental_diagnostics" \
"fish_lsp_max_background_files" \
"fish_lsp_show_client_popups" \
"fish_lsp_single_workspace_support"
# every completion argument `name\t'description'`, only unused env variables will be printed
set -l env_names_with_descriptions "fish_lsp_enabled_handlers\t'server handlers to enable'" \
"fish_lsp_disabled_handlers\t'server handlers to disable'" \
"fish_lsp_commit_characters\t'commit characters that select completion items'" \
"fish_lsp_log_file\t'path to the fish-lsp's log file'" \
"fish_lsp_log_level\t'minimum log level to include in the log file'" \
"fish_lsp_all_indexed_paths\t'directories that the server should always index on startup'" \
"fish_lsp_modifiable_paths\t'indexed paths that can be modified'" \
"fish_lsp_diagnostic_disable_error_codes\t'diagnostic codes to disable'" \
"fish_lsp_enable_experimental_diagnostics\t'enable fish-lsp's experimental diagnostics'" \
"fish_lsp_max_background_files\t'maximum number of files to analyze in the background on startup'" \
"fish_lsp_show_client_popups\t'send `connection/window/*` requests in the server'" \
"fish_lsp_single_workspace_support\t'limit workspace searching to only the current workspace'"
# get the current command line token (for comma separated options)
set -l current (commandline -ct)
# utility function to check if the current token contains a comma
function has_comma --inherit-variable current --description 'check if the current token contains a comma'
string match -rq '.*,.*' -- $current || string match -rq -- '--only=.*' $current
return $status
end
# get the current command line options, adding the current token if it contains a comma
set -l opts (commandline -opc)
has_comma && set -a opts $current
# create two arrays, one for the env variables already used, and the other
# for all the arguments passed into the commandline
set -l features_to_skip
set -l fixed_opts
# split any comma separated options
for opt in $opts
if string match -rq -- '--only=.*' $opt
set -a fixed_opts '--only' (string split -m1 -f2 -- '--only=' $opt | string split ',')
else if string match -q '*,*' -- $opt
set fixed_opts $fixed_opts (string split ',' -- $opt)
else
set fixed_opts $fixed_opts $opt
end
end
# skip any env variable that is already specified in the command line
for opt in $fixed_opts
if contains -- $opt $env_names
set -a features_to_skip $opt
end
end
# if using the `--only=` syntax, remove the `--only` part.
# when entries are separated by commas, we need to keep the current token's prefix comma
# in the completion output
set prefix ''
if has_comma
set prefix (string replace -r '[^,]*$' '' -- $current | string replace -r -- '^--only=' '')
end
# print the completions that haven't been used yet
for line in $env_names_with_descriptions
set name (string split -f1 -m1 '\t' -- $line)
if not contains -- $name $features_to_skip
echo -e "$prefix$line"
end
end
end
# check for usage of the main switches in env command `fish-lsp env --show|--create|--show-default|--names`
#
# requires passing in one of switches: `--none` or `--any`
# - `--none` check that none of the main switches are used
# - `--any` check that a main switch has been seen
# - `--no-names` check that the `--names` switch is not used, but needs to be
# paired with `--none` or `--any`
#
# used in the `env` completions, for grouping repeated logic on those
# completions conditional checks.
#
# ```
# complete -n '__fish_lsp_env_main_switch --none'
# ```
function __fish_lsp_env_main_switch --description 'check if the commandline contains any of the main env switches (--show|--create|--show-default|--names)'
argparse any none no-names names-joined -- $argv
or return 1
# none means we don't want to see any of the main switches
# no-names doesn't change anything here, since we are making sure that
# names already doesn't exist in the command line
if set -ql _flag_none
not __fish_contains_opt names
and not __fish_contains_opt -s s show
and not __fish_contains_opt -s c create
and not __fish_contains_opt show-default
return $status
end
# any means that one of the main switches has been used.
if set -ql _flag_any
if set -ql _flag_no_names
__fish_contains_opt names
and return 1
end
not set -ql _flag_no_names && __fish_contains_opt names
or __fish_contains_opt -s s show
or __fish_contains_opt -s c create
or __fish_contains_opt show-default
return $status
end
# names joined means that both the --names and --joined switches are used
if set -ql _flag_names_joined
__fish_contains_opt names
and not __fish_contains_opt -s j joined
and return $status
end
# if no switches are found, return 1
return 1
end
# make sure `fish-lsp start --stdio|--node-ipc|--socket` is used singularly
# and not in combination with any other connection related option
function __fish_lsp_start_connection_opts -d 'check if any option (--stdio|--node-ipc|--socket) is used'
__fish_contains_opt stdio || __fish_contains_opt node-ipc || __fish_contains_opt socket
end
# check if the last `fish-lsp start ...` flag/switch is `--enable` or `--disable`
# this will find the last `-*` argument in the command line, skipping any argument not starting with `-`
# and make sure it matches any of the provided `$argv` passed in to the function (defaulting to: `--enable` `--disable`)
# we use this to allow multiple sequential features to follow `fish-lsp start --enable|--disable ...`
# USAGE:
# > `fish-lsp --stdio --start complete hover --disable codeAction highlight formatting <TAB>`
# `__fish_lsp_last_switch --enable --disable ` would return 0 since `--disable` is the last switch
function __fish_lsp_last_switch -d 'check if the last argument w/ a leading `-` matches any $argv'
set -l opts (commandline -opc)
set -l last_opt
for opt in $opts
switch $opt
case '-*'
set last_opt $opt
case '*'
continue
end
end
set -l match_opts $argv
if test (count $argv) -eq 0
set match_opts '--enable' '--disable'
end
for switch in $match_opts
if test "$last_opt" = "$switch"
return 0
end
end
return 1
end
###############################
### END OF HELPER FUNCTIONS ###
###############################
## disable file completions
complete -c fish-lsp -f
## fish-lsp <TAB>
complete -c fish-lsp -n "__fish_is_first_arg; and __fish_complete_subcommand" -k -a "
start\t'start the lsp'
info\t'show info about the fish-lsp'
url\t'show helpful url(s) related to the fish-lsp'
complete\t'generate fish shell completions'
env\t'generate environment variables for lsp configuration'"
## `fish-lsp -<TAB>`
complete -c fish-lsp -n 'not __fish_use_subcommand; and __fish_is_first_arg; and not __fish_contains_opt -s v version' -s v -l version -d 'Show lsp version'
complete -c fish-lsp -n 'not __fish_use_subcommand; and __fish_is_first_arg; and not __fish_contains_opt -s h help' -s h -l help -d 'Show help information'
complete -c fish-lsp -n 'not __fish_use_subcommand; and __fish_is_first_arg; and not __fish_contains_opt help-all' -l help-all -d 'Show all help information'
complete -c fish-lsp -n 'not __fish_use_subcommand; and __fish_is_first_arg; and not __fish_contains_opt help-short' -l help-short -d 'Show short help information'
complete -c fish-lsp -n 'not __fish_use_subcommand; and __fish_is_first_arg; and not __fish_contains_opt help-man' -l help-man -d 'Show raw manpage'
## `fish-lsp start --<TAB>`
complete -c fish-lsp -n '__fish_seen_subcommand_from start; and not __fish_contains_opt dump' -l dump -d 'stop lsp & show the startup options being read'
complete -c fish-lsp -n '__fish_seen_subcommand_from start' -l enable -d 'enable the startup option' -xa '(__fish_lsp_get_features)'
complete -c fish-lsp -n '__fish_seen_subcommand_from start' -l disable -d 'disable the startup option' -xa '(__fish_lsp_get_features)'
complete -c fish-lsp -n '__fish_seen_subcommand_from start; and __fish_lsp_last_switch --disable --enable' -a '(__fish_lsp_get_features)' # allow completing multiple features in a row (when last seen switch is either: `--enable|--disable`)
complete -c fish-lsp -n '__fish_seen_subcommand_from start; and not __fish_lsp_start_connection_opts' -l stdio -d 'use stdin/stdout for communication (default)'
complete -c fish-lsp -n '__fish_seen_subcommand_from start; and not __fish_lsp_start_connection_opts' -l node-ipc -d 'use node IPC for communication'
complete -c fish-lsp -n '__fish_seen_subcommand_from start; and not __fish_lsp_start_connection_opts' -l socket -d 'use TCP socket for communication' -x
complete -c fish-lsp -n '__fish_seen_subcommand_from start; and not __fish_contains_opt memory-limit' -l memory-limit -d 'set memory usage limit in MB' -x
complete -c fish-lsp -n '__fish_seen_subcommand_from start; and not __fish_contains_opt max-files' -l max-files -d 'override the maximum number of files to analyze' -xa '(echo 100; echo 500; seq 1000 500 10000)'
complete -c fish-lsp -n '__fish_seen_subcommand_from start; and test (commandline -opc)[-1] = "--max-files"' -a '(echo 100; echo 500; seq 1000 500 10000)' -d 'override the maximum number of files to analyze'
## fish-lsp url --<TAB>
complete -c fish-lsp -n '__fish_seen_subcommand_from url; and not __fish_contains_opt repo' -l repo -d 'show git repo url'
complete -c fish-lsp -n '__fish_seen_subcommand_from url; and not __fish_contains_opt git' -l git -d 'show git repo url'
complete -c fish-lsp -n '__fish_seen_subcommand_from url; and not __fish_contains_opt npm' -l npm -d 'show npmjs.com url'
complete -c fish-lsp -n '__fish_seen_subcommand_from url; and not __fish_contains_opt homepage' -l homepage -d 'show website url'
complete -c fish-lsp -n '__fish_seen_subcommand_from url; and not __fish_contains_opt contributing' -l contributing -d 'show git CONTRIBUTING.md url'
complete -c fish-lsp -n '__fish_seen_subcommand_from url; and not __fish_contains_opt wiki' -l wiki -d 'show git wiki url'
complete -c fish-lsp -n '__fish_seen_subcommand_from url; and not __fish_contains_opt issues' -l issues -d 'show git issues url'
complete -c fish-lsp -n '__fish_seen_subcommand_from url; and not __fish_contains_opt report' -l report -d 'show git issues url'
complete -c fish-lsp -n '__fish_seen_subcommand_from url; and not __fish_contains_opt discussions' -l discussions -d 'show git discussions url'
complete -c fish-lsp -n '__fish_seen_subcommand_from url; and not __fish_contains_opt clients-repo' -l clients-repo -d 'show git clients-repo url'
complete -c fish-lsp -n '__fish_seen_subcommand_from url; and not __fish_contains_opt sources' -l sources -d 'show useful url list of sources'
## fish-lsp complete --<TAB>
complete -c fish-lsp -n '__fish_seen_subcommand_from complete; and not __fish_contains_opt fish' -l fish -d 'DEFAULT BEHAVIOR: show output for completion/fish-lsp.fish'
complete -c fish-lsp -n '__fish_seen_subcommand_from complete; and not __fish_contains_opt names' -l names -d 'show names of subcommands'
complete -c fish-lsp -n '__fish_seen_subcommand_from complete; and not __fish_contains_opt names-with-summary' -l names-with-summary -d 'show `name\tsummary\n` of subcommands'
complete -c fish-lsp -n '__fish_seen_subcommand_from complete; and not __fish_contains_opt features' -l features -d 'show feature/toggle names'
complete -c fish-lsp -n '__fish_seen_subcommand_from complete; and not __fish_contains_opt toggles' -l toggles -d 'show feature/toggle names'
complete -c fish-lsp -n '__fish_seen_subcommand_from complete; and not __fish_contains_opt env-variables' -l env-variables -d 'show env variable completions'
complete -c fish-lsp -n '__fish_seen_subcommand_from complete; and not __fish_contains_opt env-variable-names' -l env-variable-names -d 'show env variable names'
## fish-lsp info --<TAB>
complete -c fish-lsp -n '__fish_seen_subcommand_from info; and not __fish_contains_opt bin' -l bin -d 'show the binary path'
complete -c fish-lsp -n '__fish_seen_subcommand_from info; and not __fish_contains_opt repo' -l repo -d 'show the repo path'
complete -c fish-lsp -n '__fish_seen_subcommand_from info; and not __fish_contains_opt build-time' -l build-time -d 'show the build-time'
complete -c fish-lsp -n '__fish_seen_subcommand_from info; and not __fish_contains_opt lsp-version' -l lsp-version -d 'show the npm package for the lsp-version'
complete -c fish-lsp -n '__fish_seen_subcommand_from info; and not __fish_contains_opt capabilities' -l capabilities -d 'show the lsp capabilities implemented'
complete -c fish-lsp -n '__fish_seen_subcommand_from info; and not __fish_contains_opt man-file' -l man-file -d 'show man file path'
complete -c fish-lsp -n '__fish_seen_subcommand_from info; and not __fish_contains_opt log-file' -l log-file -d 'show log file path'
complete -c fish-lsp -n '__fish_seen_subcommand_from info; and not __fish_contains_opt more' -l more -d 'show more info'
complete -c fish-lsp -n '__fish_seen_subcommand_from info; and not __fish_contains_opt time-startup' -l time-startup -d 'show startup timing info'
complete -c fish-lsp -n '__fish_seen_subcommand_from info; and not __fish_contains_opt check-health' -l check-health -d 'show the server health'
## fish-lsp env --<TAB>
# fish-lsp env <TAB>
complete -c fish-lsp -n '__fish_seen_subcommand_from env; and __fish_lsp_env_main_switch --none; and __fish_complete_subcommand --fcs-skip=2' -kra "
--show-default\t'show the default values for fish-lsp env variables'
-c\t'create the env variables'
--create\t'create the env variables'
-s\t'show the current fish-lsp env variables with their values'
--show\t'show the current fish-lsp env variables with their values'
--names\t'output only the names of the env variables'"
# main switches (first arguments after the `env` subcommand)
complete -c fish-lsp -n '__fish_seen_subcommand_from env; and __fish_lsp_env_main_switch --none' -l show-default -d 'show the default values for fish-lsp env variables' -k
complete -c fish-lsp -n '__fish_seen_subcommand_from env; and __fish_lsp_env_main_switch --none' -s c -l create -d 'build initial fish-lsp env variables' -k
complete -c fish-lsp -n '__fish_seen_subcommand_from env; and __fish_lsp_env_main_switch --none' -s s -l show -d 'show the current fish-lsp env variables' -k
complete -c fish-lsp -n '__fish_seen_subcommand_from env; and __fish_lsp_env_main_switch --none' -l names -d 'output only the names of the env variables' -k
# --only switch
complete -c fish-lsp -n '__fish_seen_subcommand_from env; and __fish_lsp_env_main_switch --any' -l only -d 'show only certain env variables' -xa '(__fish_lsp_get_env_variables)'
complete -c fish-lsp -n '__fish_seen_subcommand_from env; and __fish_lsp_last_switch --only' -xa '(__fish_lsp_get_env_variables)'
# switches usable after the main switches
complete -c fish-lsp -n '__fish_seen_subcommand_from env; and __fish_lsp_env_main_switch --any --no-names; and not __fish_contains_opt no-comments' -l no-comments -d 'skip outputting comments'
complete -c fish-lsp -n '__fish_seen_subcommand_from env; and __fish_lsp_env_main_switch --any --no-names; and not __fish_contains_opt no-global' -l no-global -d 'use local exports'
complete -c fish-lsp -n '__fish_seen_subcommand_from env; and __fish_lsp_env_main_switch --any --no-names; and not __fish_contains_opt no-local' -l no-local -d 'do not use local scope (pair with --no-global)'
complete -c fish-lsp -n '__fish_seen_subcommand_from env; and __fish_lsp_env_main_switch --any --no-names; and not __fish_contains_opt no-export' -l no-export -d 'do not export variables'
complete -c fish-lsp -n '__fish_seen_subcommand_from env; and __fish_lsp_env_main_switch --any --no-names; and not __fish_contains_opt confd' -l confd -d 'output for redirect to "conf.d/fish-lsp.fish"'
complete -c fish-lsp -n '__fish_seen_subcommand_from env; and __fish_lsp_env_main_switch --names-joined; and not __fish_contains_opt joined' -l joined -d 'output the names in a single line'
# built by any of the commands:
# fish-lsp complete > ~/.config/fish/completions/fish-lsp.fish
# fish-lsp complete > $fish_complete_path[1]/fish-lsp.fish
# fish-lsp complete > $__fish_config_dir/completions/fish-lsp.fish

View file

@ -0,0 +1,7 @@
complete --command fisher --exclusive --long help --description "Print help"
complete --command fisher --exclusive --long version --description "Print version"
complete --command fisher --exclusive --condition __fish_use_subcommand --arguments install --description "Install plugins"
complete --command fisher --exclusive --condition __fish_use_subcommand --arguments update --description "Update installed plugins"
complete --command fisher --exclusive --condition __fish_use_subcommand --arguments remove --description "Remove installed plugins"
complete --command fisher --exclusive --condition __fish_use_subcommand --arguments list --description "List installed plugins matching regex"
complete --command fisher --exclusive --condition "__fish_seen_subcommand_from update remove" --arguments "(fisher list)"

View file

@ -0,0 +1,17 @@
# if "usage" is not installed show an error
if ! command -v usage &> /dev/null
echo >&2
echo "Error: usage CLI not found. This is required for completions to work in mise." >&2
echo "See https://usage.jdx.dev for more information." >&2
return 1
end
if ! set -q _usage_spec_mise_2025_7_29
set -g _usage_spec_mise_2025_7_29 (mise usage | string collect)
end
set -l tokens
if commandline -x >/dev/null 2>&1
complete -xc mise -a '(usage complete-word --shell fish -s "$_usage_spec_mise_2025_7_29" -- (commandline -xpc) (commandline -t))'
else
complete -xc mise -a '(usage complete-word --shell fish -s "$_usage_spec_mise_2025_7_29" -- (commandline -opc) (commandline -t))'
end

8
configs/fish/config.fish Normal file
View file

@ -0,0 +1,8 @@
if status is-interactive
# Commands to run in interactive sessions can go here
zoxide init --cmd cd fish | source
atuin init fish | source
mise activate fish | source
end

116
configs/fish/fish_variables Normal file
View file

@ -0,0 +1,116 @@
# This file contains fish universal variable definitions.
# VERSION: 3.0
SETUVAR __fish_initialized:3800
SETUVAR _fisher_catppuccin_2F_fish_files:\x7e/\x2econfig/fish/themes/Catppuccin\x20Frappe\x2etheme\x1e\x7e/\x2econfig/fish/themes/Catppuccin\x20Latte\x2etheme\x1e\x7e/\x2econfig/fish/themes/Catppuccin\x20Macchiato\x2etheme\x1e\x7e/\x2econfig/fish/themes/Catppuccin\x20Mocha\x2etheme
SETUVAR _fisher_jorgebucaran_2F_autopair_2E_fish_files:\x7e/\x2econfig/fish/functions/_autopair_backspace\x2efish\x1e\x7e/\x2econfig/fish/functions/_autopair_insert_left\x2efish\x1e\x7e/\x2econfig/fish/functions/_autopair_insert_right\x2efish\x1e\x7e/\x2econfig/fish/functions/_autopair_insert_same\x2efish\x1e\x7e/\x2econfig/fish/functions/_autopair_tab\x2efish\x1e\x7e/\x2econfig/fish/conf\x2ed/autopair\x2efish
SETUVAR _fisher_jorgebucaran_2F_fisher_files:\x7e/\x2econfig/fish/functions/fisher\x2efish\x1e\x7e/\x2econfig/fish/completions/fisher\x2efish
SETUVAR _fisher_plugins:jorgebucaran/fisher\x1ecatppuccin/fish\x1epure\x2dfish/pure\x1ejorgebucaran/autopair\x2efish
SETUVAR _fisher_pure_2D_fish_2F_pure_files:\x7e/\x2econfig/fish/functions/_pure_check_availability\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_check_for_new_release\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_detect_container_by_cgroup_method\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_detect_container_by_pid_method\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_format_time\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_get_prompt_symbol\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_is_inside_container\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_is_single_line_prompt\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_k8s_context\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_k8s_namespace\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_parse_directory\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_parse_git_branch\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_place_iterm2_prompt_mark\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_prefix_root_prompt\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_print_prompt\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_print_prompt_rows\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_prompt\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_prompt_aws_profile\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_prompt_beginning\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_prompt_command_duration\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_prompt_container\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_prompt_current_folder\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_prompt_ending\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_prompt_first_line\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_prompt_git\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_prompt_git_branch\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_prompt_git_dirty\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_prompt_git_pending_commits\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_prompt_git_stash\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_prompt_jobs\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_prompt_k8s\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_prompt_new_line\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_prompt_nixdevshell\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_prompt_ssh\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_prompt_symbol\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_prompt_system_time\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_prompt_vimode\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_prompt_virtualenv\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_set_color\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_set_default\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_string_width\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_user_at_host\x2efish\x1e\x7e/\x2econfig/fish/functions/fish_greeting\x2efish\x1e\x7e/\x2econfig/fish/functions/fish_mode_prompt\x2efish\x1e\x7e/\x2econfig/fish/functions/fish_prompt\x2efish\x1e\x7e/\x2econfig/fish/functions/fish_title\x2efish\x1e\x7e/\x2econfig/fish/conf\x2ed/_pure_init\x2efish\x1e\x7e/\x2econfig/fish/conf\x2ed/pure\x2efish
SETUVAR _fisher_upgraded_to_4_4:\x1d
SETUVAR fish_color_autosuggestion:6e738d
SETUVAR fish_color_cancel:ed8796
SETUVAR fish_color_command:8aadf4
SETUVAR fish_color_comment:8087a2
SETUVAR fish_color_cwd:eed49f
SETUVAR fish_color_cwd_root:red
SETUVAR fish_color_end:f5a97f
SETUVAR fish_color_error:ed8796
SETUVAR fish_color_escape:ee99a0
SETUVAR fish_color_gray:6e738d
SETUVAR fish_color_history_current:\x2d\x2dbold
SETUVAR fish_color_host:8aadf4
SETUVAR fish_color_host_remote:a6da95
SETUVAR fish_color_keyword:ed8796
SETUVAR fish_color_normal:cad3f5
SETUVAR fish_color_operator:f5bde6
SETUVAR fish_color_option:a6da95
SETUVAR fish_color_param:f0c6c6
SETUVAR fish_color_quote:a6da95
SETUVAR fish_color_redirection:f5bde6
SETUVAR fish_color_search_match:\x2d\x2dbackground\x3d363a4f
SETUVAR fish_color_selection:\x2d\x2dbackground\x3d363a4f
SETUVAR fish_color_status:ed8796
SETUVAR fish_color_user:8bd5ca
SETUVAR fish_color_valid_path:\x2d\x2dunderline
SETUVAR fish_greeting:\x1d
SETUVAR fish_key_bindings:fish_default_key_bindings
SETUVAR fish_pager_color_background:\x1d
SETUVAR fish_pager_color_completion:cad3f5
SETUVAR fish_pager_color_description:6e738d
SETUVAR fish_pager_color_prefix:f5bde6
SETUVAR fish_pager_color_progress:6e738d
SETUVAR fish_pager_color_secondary_background:\x1d
SETUVAR fish_pager_color_secondary_completion:\x1d
SETUVAR fish_pager_color_secondary_description:\x1d
SETUVAR fish_pager_color_secondary_prefix:\x1d
SETUVAR fish_pager_color_selected_background:\x1d
SETUVAR fish_pager_color_selected_completion:\x1d
SETUVAR fish_pager_color_selected_description:\x1d
SETUVAR fish_pager_color_selected_prefix:\x1d
SETUVAR fish_user_paths:/home/aleidk/\x2ecargo/bin\x1e/usr/local/sbin\x1e/usr/local/bin\x1e/usr/bin\x1e/var/lib/flatpak/exports/bin\x1e/home/aleidk/\x2elocal/bin
SETUVAR pure_begin_prompt_with_current_directory:true
SETUVAR pure_check_for_new_release:false
SETUVAR pure_color_at_sign:pure_color_mute
SETUVAR pure_color_aws_profile:pure_color_warning
SETUVAR pure_color_command_duration:pure_color_warning
SETUVAR pure_color_current_directory:pure_color_primary
SETUVAR pure_color_danger:red
SETUVAR pure_color_dark:black
SETUVAR pure_color_git_branch:pure_color_mute
SETUVAR pure_color_git_dirty:pure_color_mute
SETUVAR pure_color_git_stash:pure_color_info
SETUVAR pure_color_git_unpulled_commits:pure_color_info
SETUVAR pure_color_git_unpushed_commits:pure_color_info
SETUVAR pure_color_hostname:pure_color_mute
SETUVAR pure_color_info:cyan
SETUVAR pure_color_jobs:pure_color_normal
SETUVAR pure_color_k8s_context:pure_color_success
SETUVAR pure_color_k8s_namespace:pure_color_primary
SETUVAR pure_color_k8s_prefix:pure_color_info
SETUVAR pure_color_light:white
SETUVAR pure_color_mute:brblack
SETUVAR pure_color_nixdevshell_prefix:pure_color_info
SETUVAR pure_color_nixdevshell_symbol:pure_color_mute
SETUVAR pure_color_normal:normal
SETUVAR pure_color_prefix_root_prompt:pure_color_danger
SETUVAR pure_color_primary:blue
SETUVAR pure_color_prompt_on_error:pure_color_danger
SETUVAR pure_color_prompt_on_success:pure_color_success
SETUVAR pure_color_success:magenta
SETUVAR pure_color_system_time:pure_color_mute
SETUVAR pure_color_username_normal:pure_color_mute
SETUVAR pure_color_username_root:pure_color_light
SETUVAR pure_color_virtualenv:pure_color_mute
SETUVAR pure_color_warning:yellow
SETUVAR pure_enable_aws_profile:true
SETUVAR pure_enable_container_detection:true
SETUVAR pure_enable_git:true
SETUVAR pure_enable_k8s:false
SETUVAR pure_enable_nixdevshell:false
SETUVAR pure_enable_single_line_prompt:true
SETUVAR pure_enable_virtualenv:true
SETUVAR pure_reverse_prompt_symbol_in_vimode:true
SETUVAR pure_separate_prompt_on_error:false
SETUVAR pure_shorten_prompt_current_directory_length:0
SETUVAR pure_shorten_window_title_current_directory_length:0
SETUVAR pure_show_jobs:false
SETUVAR pure_show_prefix_root_prompt:false
SETUVAR pure_show_subsecond_command_duration:false
SETUVAR pure_show_system_time:false
SETUVAR pure_symbol_aws_profile_prefix:
SETUVAR pure_symbol_container_prefix:
SETUVAR pure_symbol_git_dirty:\x2a
SETUVAR pure_symbol_git_stash:\u2261
SETUVAR pure_symbol_git_unpulled_commits:\u21e3
SETUVAR pure_symbol_git_unpushed_commits:\u21e1
SETUVAR pure_symbol_k8s_prefix:\u2638
SETUVAR pure_symbol_nixdevshell_prefix:\u2744\ufe0f
SETUVAR pure_symbol_prefix_root_prompt:\x23
SETUVAR pure_symbol_prompt:\u276f
SETUVAR pure_symbol_reverse_prompt:\u276e
SETUVAR pure_symbol_ssh_prefix:
SETUVAR pure_symbol_title_bar_separator:\x2d
SETUVAR pure_symbol_virtualenv_prefix:
SETUVAR pure_threshold_command_duration:5
SETUVAR pure_truncate_prompt_current_directory_keeps:\x2d1
SETUVAR pure_truncate_window_title_current_directory_keeps:\x2d1

View file

@ -0,0 +1,15 @@
function _pure_check_availability \
--description "Ensure command is available on system" \
--argument-names \
feature_flag \
required_command
set FAILURE 1
if not type -q $required_command # command, function or alias are OK
echo (set_color $pure_color_warning) \
"$feature_flag feature requires: `$required_command`" \
(set_color $pure_color_normal)
return $FAILURE
end
end

View file

@ -0,0 +1,24 @@
function _pure_check_for_new_release \
--description "Check for new release and show command to install"
if test "$pure_check_for_new_release" = true
echo "🛈 Checking for new release…"
set latest (pure_get_latest_release_version "pure-fish/pure")
if test "v"$pure_version != $latest
set --local latest_version (_pure_set_color $pure_color_info)$latest(_pure_set_color $pure_color_normal)
echo -e "🔔 New version available!\n"
echo -e (_pure_set_color $pure_color_success)"fisher install pure-fish/pure@$latest_version\n"
end
end
end
function pure_get_latest_release_version \
--argument-names user_repo
curl \
--silent \
"https://api.github.com/repos/$user_repo/releases/latest" \
| string match --regex '"tag_name": "\K.*?(?=")'
end

View file

@ -0,0 +1,10 @@
function _pure_detect_container_by_cgroup_method \
--description "Linux method to detect container using cgroup. see https://stackoverflow.com/a/37015387/802365" \
--argument-names cgroup_namespace
set --query cgroup_namespace[1]; or set cgroup_namespace /proc/1/cgroup
string match \
--quiet \
--entire \
--regex '(lxc|docker)' <$cgroup_namespace
end

View file

@ -0,0 +1,14 @@
function _pure_detect_container_by_pid_method \
--description "Linux method to detect container using /proc. see https://stackoverflow.com/a/37015387/802365" \
--argument-names proc_sched
set --query proc_sched[1]; or set proc_sched /proc/1/sched
if test -e $proc_sched
head -n 1 $proc_sched \
| string match \
--quiet \
--invert \
--regex 'init|systemd|shepherd'
end
end

View file

@ -0,0 +1,49 @@
set SUCCESS 0
set FAILURE 1
function _pure_format_time \
--description="Format milliseconds to a human readable format" \
--argument-names \
milliseconds \
threshold \
show_subsecond
set --query show_subsecond[1]; or set show_subsecond false
test "$milliseconds" -lt 0; and return $FAILURE
test "$milliseconds" -lt (math --scale=0 "$threshold * 1000"); and echo; and return $SUCCESS
set --local time
set --local days (math --scale=0 "$milliseconds / 86400000")
test "$days" -gt 0; and set --append time (printf "%sd" $days)
set --local hours (math --scale=0 "$milliseconds / 3600000 % 24")
test "$hours" -gt 0; and set --append time (printf "%sh" $hours)
set --local minutes (math --scale=0 "$milliseconds / 60000 % 60")
test "$minutes" -gt 0; and set --append time (printf "%sm" $minutes)
set --local seconds (math --scale=0 "$milliseconds / 1000 % 60")
if test "$show_subsecond" = true
set --local threshold_as_ms (math --scale=0 "$threshold*1000")
set --local subseconds (_pure_format_time_subseconds $milliseconds $threshold_as_ms)
set --append time $seconds$subseconds's'
else
test "$seconds" -gt $threshold; and set --append time (printf "%ss" $seconds)
end
echo -e (string join ' ' $time)
end
function _pure_format_time_subseconds \
--description="Format duration milliseconds to a human readable format" \
--argument-names \
duration \
threshold
set --local subseconds
if test "$duration" -gt $threshold
set --local precision 2
set --local milliseconds (string sub --start -3 --length $precision $duration)
set --append subseconds '.'$milliseconds
end
echo $subseconds
end

View file

@ -0,0 +1,12 @@
function _pure_get_prompt_symbol \
--description 'Print prompt symbol' \
--argument-names exit_code
set --local prompt_symbol $pure_symbol_prompt
test "$pure_reverse_prompt_symbol_in_vimode" = true
and string match -rq "fish_(vi|hybrid)_key_bindings" $fish_key_bindings
and not contains "$fish_bind_mode" insert replace
and set prompt_symbol $pure_symbol_reverse_prompt
echo "$prompt_symbol"
end

View file

@ -0,0 +1,25 @@
function _pure_is_inside_container \
--argument-names cgroup_namespace
set --query cgroup_namespace[1]; or set cgroup_namespace /proc/1/cgroup
set --local failure 1
if set --query pure_enable_container_detection; and test "$pure_enable_container_detection" = true
set --local success 0
if test -n "$container"
return $success
end
set --local os_name (uname -s)
# echo $os_name
if test "$os_name" = Linux
if _pure_detect_container_by_cgroup_method $cgroup_namespace
return $success
end
if _pure_detect_container_by_pid_method
return $success
end
end
end
return $failure
end

View file

@ -0,0 +1,5 @@
function _pure_is_single_line_prompt \
--description 'Test if single line prompt feature is enabled'
set --query pure_enable_single_line_prompt
and test "$pure_enable_single_line_prompt" = true
end

View file

@ -0,0 +1,3 @@
function _pure_k8s_context
kubectl config current-context 2>/dev/null
end

View file

@ -0,0 +1,9 @@
function _pure_k8s_namespace
set namespace (kubectl config view --minify --output 'jsonpath={..namespace}' 2>/dev/null)
if test -z "$namespace"
set namespace default
end
echo $namespace
end

View file

@ -0,0 +1,23 @@
function _pure_parse_directory \
--description "Replace '$HOME' with '~'" \
--argument-names max_path_length
set --local folder (fish_prompt_pwd_dir_length=$pure_shorten_prompt_current_directory_length prompt_pwd)
if test -n "$max_path_length"
if test (string length $folder) -gt $max_path_length
# If path exceeds maximum symbol limit, force fish path formating function to use 1 character
set folder (fish_prompt_pwd_dir_length=1 prompt_pwd)
end
end
if test "$pure_truncate_prompt_current_directory_keeps" -ge 1
set folder (
string split '/' $folder \
| tail -n $pure_truncate_prompt_current_directory_keeps \
| string join '/'
)
end
echo $folder
end

View file

@ -0,0 +1,4 @@
function _pure_parse_git_branch --description "Parse current Git branch name"
command git symbolic-ref --short HEAD 2>/dev/null;
or command git name-rev --name-only HEAD 2>/dev/null
end

View file

@ -0,0 +1,5 @@
function _pure_place_iterm2_prompt_mark
if functions -q iterm2_prompt_mark
iterm2_prompt_mark
end
end

View file

@ -0,0 +1,11 @@
function _pure_prefix_root_prompt
set --local username (id -u -n) # current user name
set --local prefix_root_prompt
if set --query pure_show_prefix_root_prompt; and test "$pure_show_prefix_root_prompt" = true -a "$username" = "root"
set --local prefix_color (_pure_set_color $pure_color_prefix_root_prompt)
set prefix_root_prompt "$prefix_color$pure_symbol_prefix_root_prompt"
end
echo "$prefix_root_prompt"
end

View file

@ -0,0 +1,12 @@
function _pure_print_prompt \
--description 'Concatenate parts single prompt string'
set --local prompt
for prompt_part in $argv
if test (_pure_string_width $prompt_part) -gt 0
set --append prompt "$prompt_part"
end
end
echo (string trim -l $prompt)
end

View file

@ -0,0 +1,10 @@
function _pure_print_prompt_rows \
--description "Manage default vs. compact prompt"
# print current path, git branch/status, command duration
if _pure_is_single_line_prompt
echo -e -n (_pure_prompt_first_line)
else
echo -e (_pure_prompt_first_line)
end
end

View file

@ -0,0 +1,31 @@
function _pure_prompt \
--description 'Print prompt symbol' \
--argument-names exit_code
set --local jobs (_pure_prompt_jobs)
set --local nixdevshell (_pure_prompt_nixdevshell) # Nix build environment indicator
set --local virtualenv (_pure_prompt_virtualenv) # Python virtualenv name
set --local aws_profile (_pure_prompt_aws_profile) # AWS profile name
set --local vimode_indicator (_pure_prompt_vimode) # vi-mode indicator
set --local pure_symbol (_pure_prompt_symbol $exit_code)
set --local system_time (_pure_prompt_system_time)
set --local root_prefix (_pure_prefix_root_prompt)
set --local space
if _pure_is_single_line_prompt
set space ' '
end
echo (\
_pure_print_prompt \
$space \
$system_time \
$root_prefix \
$jobs \
$nixdevshell \
$virtualenv \
$aws_profile \
$vimode_indicator \
$pure_symbol \
)
end

View file

@ -0,0 +1,19 @@
function _pure_prompt_aws_profile --description "Display AWS profile name"
if set --query pure_enable_aws_profile;
and test "$pure_enable_aws_profile" = true
set --local aws_profile ''
set --local aws_profile_color (_pure_set_color $pure_color_aws_profile)
if test -n "$AWS_VAULT"
set aws_profile "$AWS_VAULT"
else if test -n "$AWS_PROFILE" -o "$AWS_PROFILE" != default
set aws_profile "$AWS_PROFILE"
end
if test -n $aws_profile
echo "$pure_symbol_aws_profile_prefix$aws_profile_color$aws_profile"
end
end
end

View file

@ -0,0 +1,7 @@
function _pure_prompt_beginning \
--description 'Clear existing line content'
set --local clear_line "\r\033[K"
echo $clear_line
end

View file

@ -0,0 +1,11 @@
function _pure_prompt_command_duration
set --local command_duration
# Get command execution duration
if test -n "$CMD_DURATION"
set command_duration (_pure_format_time $CMD_DURATION $pure_threshold_command_duration $pure_show_subsecond_command_duration)
end
set --local command_duration_color (_pure_set_color $pure_color_command_duration)
echo "$command_duration_color$command_duration"
end

View file

@ -0,0 +1,5 @@
function _pure_prompt_container
if _pure_is_inside_container
echo "$pure_symbol_container_prefix"(_pure_user_at_host)
end
end

View file

@ -0,0 +1,11 @@
set FAILURE 1
function _pure_prompt_current_folder --argument-names current_prompt_width
if test -z "$current_prompt_width"; return $FAILURE; end
set --local current_folder (_pure_parse_directory (math $COLUMNS - $current_prompt_width - 1))
set --local current_folder_color (_pure_set_color $pure_color_current_directory)
echo "$current_folder_color$current_folder"
end

View file

@ -0,0 +1,3 @@
function _pure_prompt_ending
echo (set_color normal)" "
end

View file

@ -0,0 +1,41 @@
set --global FAILURE 1
function _pure_prompt_first_line \
--description 'Print contextual information before prompt.'
set --local prompt_ssh (_pure_prompt_ssh)
set --local prompt_container (_pure_prompt_container)
set --local prompt_k8s (_pure_prompt_k8s)
set --local prompt_git (_pure_prompt_git)
set --local prompt_command_duration (_pure_prompt_command_duration)
set --local prompt (_pure_print_prompt \
$prompt_ssh \
$prompt_container \
$prompt_k8s \
$prompt_git \
$prompt_command_duration
)
set --local prompt_width (_pure_string_width $prompt)
set --local current_folder (_pure_prompt_current_folder $prompt_width)
set --local prompt_components
if set --query pure_begin_prompt_with_current_directory; and test "$pure_begin_prompt_with_current_directory" = true
set prompt_components \
$current_folder \
$prompt_git \
$prompt_ssh \
$prompt_container \
$prompt_k8s \
$prompt_command_duration
else
set prompt_components \
$prompt_ssh \
$prompt_container \
$prompt_k8s \
$current_folder \
$prompt_git \
$prompt_command_duration
end
echo (_pure_print_prompt $prompt_components)
end

View file

@ -0,0 +1,26 @@
function _pure_prompt_git \
--description 'Print git repository informations: branch name, dirty, upstream ahead/behind'
set ABORT_FEATURE 2
if set --query pure_enable_git; and test "$pure_enable_git" != true
return
end
if not type -q --no-functions git # skip git-related features when `git` is not available
return $ABORT_FEATURE
end
set --local is_git_repository (command git rev-parse --is-inside-work-tree 2>/dev/null)
if test -n "$is_git_repository"
set --local git_prompt (_pure_prompt_git_branch)(_pure_prompt_git_dirty)(_pure_prompt_git_stash)
set --local git_pending_commits (_pure_prompt_git_pending_commits)
if test (_pure_string_width $git_pending_commits) -ne 0
set --append git_prompt $git_pending_commits
end
echo $git_prompt
end
end

View file

@ -0,0 +1,6 @@
function _pure_prompt_git_branch
set --local git_branch (_pure_parse_git_branch) # current git branch
set --local git_branch_color (_pure_set_color $pure_color_git_branch)
echo "$git_branch_color$git_branch"
end

View file

@ -0,0 +1,27 @@
function _pure_prompt_git_dirty
set --local git_dirty_symbol
set --local git_dirty_color
set --local is_git_dirty (
# HEAD may not exist (e.g. immediately after git init); diff-index is
# fast for staged checks but requires a ref.
#
# The diff-index (or diff --staged) checks for staged changes; the diff
# checks for unstaged changes; the ls-files checks for untracked files.
# We put them in this order because checking staged changes is *fast*.
if command git rev-list --max-count=1 HEAD -- >/dev/null 2>&1;
not command git diff-index --ignore-submodules --cached --quiet HEAD -- >/dev/null 2>&1;
else;
not command git diff --staged --ignore-submodules --no-ext-diff --quiet --exit-code >/dev/null 2>&1;
end
or not command git diff --ignore-submodules --no-ext-diff --quiet --exit-code >/dev/null 2>&1
or command git ls-files --others --exclude-standard --directory --no-empty-directory --error-unmatch -- ':/*' >/dev/null 2>&1
and echo "true"
)
if test -n "$is_git_dirty" # untracked or un-commited files
set git_dirty_symbol "$pure_symbol_git_dirty"
set git_dirty_color (_pure_set_color $pure_color_git_dirty)
end
echo "$git_dirty_color$git_dirty_symbol"
end

View file

@ -0,0 +1,27 @@
function _pure_prompt_git_pending_commits
set --local git_unpushed_commits
set --local git_unpulled_commits
set --local has_upstream (command git rev-parse --abbrev-ref '@{upstream}' 2>/dev/null)
if test -n "$has_upstream" # check there is an upstream repo configured
and test "$has_upstream" != '@{upstream}' # Fixed #179, dont check the empty repo
command git rev-list --left-right --count 'HEAD...@{upstream}' \
| read --local --array git_status
set --local commit_to_push $git_status[1]
set --local commit_to_pull $git_status[2]
if test "$commit_to_push" -gt 0 # upstream is behind local repo
set --local git_unpushed_commits_color \
(_pure_set_color $pure_color_git_unpushed_commits)
set git_unpushed_commits "$git_unpushed_commits_color$pure_symbol_git_unpushed_commits"
end
if test "$commit_to_pull" -gt 0 # upstream is ahead of local repo
set --local git_unpulled_commits_color \
(_pure_set_color $pure_color_git_unpulled_commits)
set git_unpulled_commits "$git_unpulled_commits_color$pure_symbol_git_unpulled_commits"
end
end
echo "$git_unpushed_commits$git_unpulled_commits"
end

View file

@ -0,0 +1,15 @@
function _pure_prompt_git_stash
set --local git_stash_symbol
set --local git_stash_color
set --local has_stashed_files (
command git rev-list --walk-reflogs --count refs/stash >/dev/null 2>&1
and echo "true"
)
if test -n "$has_stashed_files" # untracked or un-commited files
set git_stash_symbol " $pure_symbol_git_stash"
set git_stash_color (_pure_set_color $pure_color_git_stash)
end
echo "$git_stash_color$git_stash_symbol"
end

View file

@ -0,0 +1,9 @@
function _pure_prompt_jobs --description "Display number of running jobs"
if set --query pure_show_jobs; and test "$pure_show_jobs" = true
set --local njobs (count (jobs -p))
set --local jobs_color (_pure_set_color $pure_color_jobs)
if test "$njobs" -gt 0
echo "$jobs_color"[$njobs]
end
end
end

View file

@ -0,0 +1,16 @@
function _pure_prompt_k8s
if set --query pure_enable_k8s;
and test "$pure_enable_k8s" = true;
and _pure_check_availability pure_enable_k8s kubectl
and test -n (_pure_k8s_context) # todo: use $(cmd) syntax when Fish 3.3.1 is dropped
set --local context (_pure_set_color $pure_color_k8s_context)(_pure_k8s_context)
if test -n "$context"
set --local symbol (_pure_set_color $pure_color_k8s_prefix)$pure_symbol_k8s_prefix
set --local namespace (_pure_set_color $pure_color_k8s_namespace)(_pure_k8s_namespace)
echo "$symbol $context/$namespace"
end
end
end

View file

@ -0,0 +1,11 @@
function _pure_prompt_new_line \
--description "Do not add a line break to a brand new session" \
--on-event fish_prompt
set --local new_line ''
if not _pure_is_single_line_prompt; and test "$_pure_fresh_session" = false
set new_line "\n"
end
echo -e -n (_pure_prompt_beginning)"$new_line"
end

View file

@ -0,0 +1,13 @@
function _pure_prompt_nixdevshell \
--description "Indicate if nix develop shell is activated"
if set --query pure_enable_nixdevshell;
and test "$pure_enable_nixdevshell" = true;
and test -n "$IN_NIX_SHELL"
set --local prefix (_pure_set_color $pure_color_nixdevshell_prefix)$pure_symbol_nixdevshell_prefix
set --local symbol (_pure_set_color $pure_color_nixdevshell_status)$IN_NIX_SHELL
echo "$prefix$symbol"
end
end

View file

@ -0,0 +1,5 @@
function _pure_prompt_ssh
if test "$SSH_CONNECTION" != ""
echo "$pure_symbol_ssh_prefix"(_pure_user_at_host)
end
end

View file

@ -0,0 +1,20 @@
function _pure_prompt_symbol \
--description 'Print prompt symbol' \
--argument-names exit_code
set --local prompt_symbol (_pure_get_prompt_symbol)
set --local symbol_color_success (_pure_set_color $pure_color_prompt_on_success)
set --local symbol_color_error (_pure_set_color $pure_color_prompt_on_error)
set --local command_succeed 0
set --local symbol_color $symbol_color_success # default pure symbol color
if set --query exit_code; and test "$exit_code" -ne $command_succeed
set symbol_color $symbol_color_error # different pure symbol color when previous command failed
if set --query pure_separate_prompt_on_error; and test "$pure_separate_prompt_on_error" = true
set symbol_color "$symbol_color_error$prompt_symbol$symbol_color_success"
end
end
echo "$symbol_color$prompt_symbol"
end

View file

@ -0,0 +1,6 @@
function _pure_prompt_system_time --description "Display system time"
if set --query pure_show_system_time; and test "$pure_show_system_time" = true
set --local time_color (_pure_set_color $pure_color_system_time)
echo "$time_color"(date '+%T')
end
end

View file

@ -0,0 +1,6 @@
function _pure_prompt_vimode
if set --query pure_reverse_prompt_symbol_in_vimode;
and test "$pure_reverse_prompt_symbol_in_vimode" = false
echo (fish_default_mode_prompt)
end
end

View file

@ -0,0 +1,18 @@
function _pure_prompt_virtualenv --description "Display virtualenv directory"
if set --query pure_enable_virtualenv;
and test "$pure_enable_virtualenv" = true
set --local virtualenv ''
set --local virtualenv_color (_pure_set_color $pure_color_virtualenv)
if test -n "$VIRTUAL_ENV"
set virtualenv (basename "$VIRTUAL_ENV")
else if test -n "$CONDA_DEFAULT_ENV"
set virtualenv (basename "$CONDA_DEFAULT_ENV")
end
if test -n $virtualenv
echo "$pure_symbol_virtualenv_prefix$virtualenv_color$virtualenv"
end
end
end

View file

@ -0,0 +1,19 @@
function _pure_set_color \
--description 'Set color' \
--argument-names var
set --local color $var
# Backwards compatibility for colors defined as control sequencies instead of fish colors
if not string match --quiet --all --regex '\e\[[^m]*m' $color[1]
and set -q $color
set color $$var
end
set --local result $color
if not string match --quiet --all --regex '\e\[[^m]*m' $result[1]
and not test -z $result[1]
set result (set_color $color)
end
echo "$result"
end

View file

@ -0,0 +1,11 @@
function _pure_set_default \
--description 'Set default value for configuration variable' \
--argument-names var default
set is_available_universally (not set --query --universal $var; or test -z $$var; echo $status)
set is_available_globally (not set --query --global $var; or test -z $$var; echo $status)
if test "$is_available_universally" -eq 0 -a $is_available_globally -eq 0
set --universal $var "$default"
end
end

View file

@ -0,0 +1,9 @@
function _pure_string_width \
--description 'returns raw string length, i.e. ignore ANSI-color' \
--argument-names prompt
set --local empty ''
set --local raw_prompt (string replace --all --regex '\e\[[^m]*m' $empty -- $prompt)
string length -- $raw_prompt
end

View file

@ -0,0 +1,13 @@
function _pure_user_at_host
set --local username (id -u -n) # current user name
set --local at_sign "@"
set --local at_sign_color (_pure_set_color $pure_color_at_sign)
set --local hostname_color (_pure_set_color $pure_color_hostname)
set --local username_color (_pure_set_color $pure_color_username_normal) # default color
if test "$username" = root
set username_color (_pure_set_color $pure_color_username_root) # different color for root
end
echo "$username_color$username$at_sign_color$at_sign$hostname_color$hostname"
end

View file

View file

@ -0,0 +1,19 @@
function http --argument-names method url --description "Curl wrapper with cache options"
argparse h/help c/cache '#cache_time' -- $argv
or return
# If -h or --help is given, we print a little help text and return
if set -ql _flag_help
echo "http [-h|--help] [-s|--second] METHOD URL"
return 0
end
if set -ql _flag_cache
mkdir -p /tmp/fish_http
curl -SsL -X (string upper $method) $url | tee /tmp/fish_http/(string escape --style=url $url)
else
curl -X (string upper $method) $url
end
end

View file

@ -0,0 +1,3 @@
function fish_greeting
_pure_check_for_new_release
end

View file

@ -0,0 +1,2 @@
function fish_mode_prompt
end

View file

@ -0,0 +1,11 @@
# a called to `_pure_prompt_new_line` is triggered by an event
function fish_prompt
set --local exit_code $status # save previous exit code
_pure_print_prompt_rows # manage default vs. compact prompt
_pure_place_iterm2_prompt_mark # place iTerm shell integration mark
echo -e -n (_pure_prompt $exit_code) # print prompt
echo -e (_pure_prompt_ending) # reset colors and end prompt
set _pure_fresh_session false
end

View file

@ -0,0 +1,15 @@
function fish_title \
--description "Set title to current folder and shell name" \
--argument-names last_command
set --local current_folder (fish_prompt_pwd_dir_length=$pure_shorten_window_title_current_directory_length prompt_pwd)
set --local current_command (status current-command 2>/dev/null; or echo $_)[1] # we use index to ignore extraneous item, see #360
set --local prompt "$current_folder: $last_command $pure_symbol_title_bar_separator $current_command"
if test -z "$last_command"
set prompt "$current_folder $pure_symbol_title_bar_separator $current_command"
end
echo $prompt
end

View file

@ -0,0 +1,240 @@
function fisher --argument-names cmd --description "A plugin manager for Fish"
set --query fisher_path || set --local fisher_path $__fish_config_dir
set --local fisher_version 4.4.5
set --local fish_plugins $__fish_config_dir/fish_plugins
switch "$cmd"
case -v --version
echo "fisher, version $fisher_version"
case "" -h --help
echo "Usage: fisher install <plugins...> Install plugins"
echo " fisher remove <plugins...> Remove installed plugins"
echo " fisher update <plugins...> Update installed plugins"
echo " fisher update Update all installed plugins"
echo " fisher list [<regex>] List installed plugins matching regex"
echo "Options:"
echo " -v, --version Print version"
echo " -h, --help Print this help message"
echo "Variables:"
echo " \$fisher_path Plugin installation path. Default: $__fish_config_dir" | string replace --regex -- $HOME \~
case ls list
string match --entire --regex -- "$argv[2]" $_fisher_plugins
case install update remove
isatty || read --local --null --array stdin && set --append argv $stdin
set --local install_plugins
set --local update_plugins
set --local remove_plugins
set --local arg_plugins $argv[2..-1]
set --local old_plugins $_fisher_plugins
set --local new_plugins
test -e $fish_plugins && set --local file_plugins (string match --regex -- '^[^\s]+$' <$fish_plugins | string replace -- \~ ~)
if ! set --query argv[2]
if test "$cmd" != update
echo "fisher: Not enough arguments for command: \"$cmd\"" >&2 && return 1
else if ! set --query file_plugins
echo "fisher: \"$fish_plugins\" file not found: \"$cmd\"" >&2 && return 1
end
set arg_plugins $file_plugins
end
for plugin in $arg_plugins
set plugin (test -e "$plugin" && realpath $plugin || string lower -- $plugin)
contains -- "$plugin" $new_plugins || set --append new_plugins $plugin
end
if set --query argv[2]
for plugin in $new_plugins
if contains -- "$plugin" $old_plugins
test "$cmd" = remove &&
set --append remove_plugins $plugin ||
set --append update_plugins $plugin
else if test "$cmd" = install
set --append install_plugins $plugin
else
echo "fisher: Plugin not installed: \"$plugin\"" >&2 && return 1
end
end
else
for plugin in $new_plugins
contains -- "$plugin" $old_plugins &&
set --append update_plugins $plugin ||
set --append install_plugins $plugin
end
for plugin in $old_plugins
contains -- "$plugin" $new_plugins || set --append remove_plugins $plugin
end
end
set --local pid_list
set --local source_plugins
set --local fetch_plugins $update_plugins $install_plugins
set --local fish_path (status fish-path)
echo (set_color --bold)fisher $cmd version $fisher_version(set_color normal)
for plugin in $fetch_plugins
set --local source (command mktemp -d)
set --append source_plugins $source
command mkdir -p $source/{completions,conf.d,themes,functions}
$fish_path --command "
if test -e $plugin
command cp -Rf $plugin/* $source
else
set temp (command mktemp -d)
set repo (string split -- \@ $plugin) || set repo[2] HEAD
if set path (string replace --regex -- '^(https://)?gitlab.com/' '' \$repo[1])
set name (string split -- / \$path)[-1]
set url https://gitlab.com/\$path/-/archive/\$repo[2]/\$name-\$repo[2].tar.gz
else
set url https://api.github.com/repos/\$repo[1]/tarball/\$repo[2]
end
echo Fetching (set_color --underline)\$url(set_color normal)
if command curl -q --silent -L \$url | command tar -xzC \$temp -f - 2>/dev/null
command cp -Rf \$temp/*/* $source
else
echo fisher: Invalid plugin name or host unavailable: \\\"$plugin\\\" >&2
command rm -rf $source
end
command rm -rf \$temp
end
set files $source/* && string match --quiet --regex -- .+\.fish\\\$ \$files
" &
set --append pid_list (jobs --last --pid)
end
wait $pid_list 2>/dev/null
for plugin in $fetch_plugins
if set --local source $source_plugins[(contains --index -- "$plugin" $fetch_plugins)] && test ! -e $source
if set --local index (contains --index -- "$plugin" $install_plugins)
set --erase install_plugins[$index]
else
set --erase update_plugins[(contains --index -- "$plugin" $update_plugins)]
end
end
end
for plugin in $update_plugins $remove_plugins
if set --local index (contains --index -- "$plugin" $_fisher_plugins)
set --local plugin_files_var _fisher_(string escape --style=var -- $plugin)_files
if contains -- "$plugin" $remove_plugins
for name in (string replace --filter --regex -- '.+/conf\.d/([^/]+)\.fish$' '$1' $$plugin_files_var)
emit {$name}_uninstall
end
printf "%s\n" Removing\ (set_color red --bold)$plugin(set_color normal) " "$$plugin_files_var | string replace -- \~ ~
set --erase _fisher_plugins[$index]
end
command rm -rf (string replace -- \~ ~ $$plugin_files_var)
functions --erase (string replace --filter --regex -- '.+/functions/([^/]+)\.fish$' '$1' $$plugin_files_var)
for name in (string replace --filter --regex -- '.+/completions/([^/]+)\.fish$' '$1' $$plugin_files_var)
complete --erase --command $name
end
set --erase $plugin_files_var
end
end
if set --query update_plugins[1] || set --query install_plugins[1]
command mkdir -p $fisher_path/{functions,themes,conf.d,completions}
end
for plugin in $update_plugins $install_plugins
set --local source $source_plugins[(contains --index -- "$plugin" $fetch_plugins)]
set --local files $source/{functions,themes,conf.d,completions}/*
if set --local index (contains --index -- $plugin $install_plugins)
set --local user_files $fisher_path/{functions,themes,conf.d,completions}/*
set --local conflict_files
for file in (string replace -- $source/ $fisher_path/ $files)
contains -- $file $user_files && set --append conflict_files $file
end
if set --query conflict_files[1] && set --erase install_plugins[$index]
echo -s "fisher: Cannot install \"$plugin\": please remove or move conflicting files first:" \n" "$conflict_files >&2
continue
end
end
for file in (string replace -- $source/ "" $files)
command cp -RLf $source/$file $fisher_path/$file
end
set --local plugin_files_var _fisher_(string escape --style=var -- $plugin)_files
set --query files[1] && set --universal $plugin_files_var (string replace -- $source $fisher_path $files | string replace -- ~ \~)
contains -- $plugin $_fisher_plugins || set --universal --append _fisher_plugins $plugin
contains -- $plugin $install_plugins && set --local event install || set --local event update
printf "%s\n" Installing\ (set_color --bold)$plugin(set_color normal) " "$$plugin_files_var | string replace -- \~ ~
for file in (string match --regex -- '.+/[^/]+\.fish$' $$plugin_files_var | string replace -- \~ ~)
source $file
if set --local name (string replace --regex -- '.+conf\.d/([^/]+)\.fish$' '$1' $file)
emit {$name}_$event
end
end
end
command rm -rf $source_plugins
if set --query _fisher_plugins[1]
set --local commit_plugins
for plugin in $file_plugins
contains -- (string lower -- $plugin) (string lower -- $_fisher_plugins) && set --append commit_plugins $plugin
end
for plugin in $_fisher_plugins
contains -- (string lower -- $plugin) (string lower -- $commit_plugins) || set --append commit_plugins $plugin
end
string replace --regex -- $HOME \~ $commit_plugins >$fish_plugins
else
set --erase _fisher_plugins
command rm -f $fish_plugins
end
set --local total (count $install_plugins) (count $update_plugins) (count $remove_plugins)
test "$total" != "0 0 0" && echo (string join ", " (
test $total[1] = 0 || echo "Installed $total[1]") (
test $total[2] = 0 || echo "Updated $total[2]") (
test $total[3] = 0 || echo "Removed $total[3]")
) plugin/s
case \*
echo "fisher: Unknown command: \"$cmd\"" >&2 && return 1
end
end
if ! set --query _fisher_upgraded_to_4_4
set --universal _fisher_upgraded_to_4_4
if functions --query _fisher_list
set --query XDG_DATA_HOME[1] || set --local XDG_DATA_HOME ~/.local/share
command rm -rf $XDG_DATA_HOME/fisher
functions --erase _fisher_{list,plugin_parse}
fisher update >/dev/null 2>/dev/null
else
for var in (set --names | string match --entire --regex '^_fisher_.+_files$')
set $var (string replace -- ~ \~ $$var)
end
functions --erase _fisher_fish_postexec
end
end

View file

@ -0,0 +1,38 @@
function split_run
argparse mask r/restart -- $argv
or return
if not set -qg MPROCS_PORT
set -gx MPROCS_PORT $(random 1024 2048)
kitten @ env "MPROCS_PORT=$MPROCS_PORT"
end
if set -ql _flag_restart
# Send commands to server
mprocs --server "127.0.0.1:$MPROCS_PORT" --ctl "{c: restart-proc}"
return 0
end
if set -ql _flag_mask
set -l cmd "$(mask --introspect | jq ".commands[] | [.name, .description] | @tsv" -r | fzf --accept-nth=1)"
if test -z $cmd
return 1
end
set -l cmd "mask $cmd"
# check if server is running
if nc -w 1 -zv 127.0.0.1 $MPROCS_PORT &>/dev/null
mprocs --server "127.0.0.1:$MPROCS_PORT" --ctl "{c: add-proc, cmd: \"$cmd\"}"
mprocs --server "127.0.0.1:$MPROCS_PORT" --ctl "{c: select-proc, index: 0}"
mprocs --server "127.0.0.1:$MPROCS_PORT" --ctl "{c: prev-proc}"
else
# Start server
kitten @ launch --cwd=current --location last --dont-take-focus mprocs --server "127.0.0.1:$MPROCS_PORT" "$cmd"
end
end
end

View file

@ -0,0 +1,8 @@
function yy
set tmp (mktemp -t "yazi-cwd.XXXXXX")
yazi $argv --cwd-file="$tmp"
if read -z cwd < "$tmp"; and [ -n "$cwd" ]; and [ "$cwd" != "$PWD" ]
builtin cd -- "$cwd"
end
rm -f -- "$tmp"
end

View file

@ -0,0 +1,30 @@
# name: 'Catppuccin Frappé'
# url: 'https://github.com/catppuccin/fish'
# preferred_background: 303446
fish_color_normal c6d0f5
fish_color_command 8caaee
fish_color_param eebebe
fish_color_keyword e78284
fish_color_quote a6d189
fish_color_redirection f4b8e4
fish_color_end ef9f76
fish_color_comment 838ba7
fish_color_error e78284
fish_color_gray 737994
fish_color_selection --background=414559
fish_color_search_match --background=414559
fish_color_option a6d189
fish_color_operator f4b8e4
fish_color_escape ea999c
fish_color_autosuggestion 737994
fish_color_cancel e78284
fish_color_cwd e5c890
fish_color_user 81c8be
fish_color_host 8caaee
fish_color_host_remote a6d189
fish_color_status e78284
fish_pager_color_progress 737994
fish_pager_color_prefix f4b8e4
fish_pager_color_completion c6d0f5
fish_pager_color_description 737994

View file

@ -0,0 +1,30 @@
# name: 'Catppuccin Latte'
# url: 'https://github.com/catppuccin/fish'
# preferred_background: eff1f5
fish_color_normal 4c4f69
fish_color_command 1e66f5
fish_color_param dd7878
fish_color_keyword d20f39
fish_color_quote 40a02b
fish_color_redirection ea76cb
fish_color_end fe640b
fish_color_comment 8c8fa1
fish_color_error d20f39
fish_color_gray 9ca0b0
fish_color_selection --background=ccd0da
fish_color_search_match --background=ccd0da
fish_color_option 40a02b
fish_color_operator ea76cb
fish_color_escape e64553
fish_color_autosuggestion 9ca0b0
fish_color_cancel d20f39
fish_color_cwd df8e1d
fish_color_user 179299
fish_color_host 1e66f5
fish_color_host_remote 40a02b
fish_color_status d20f39
fish_pager_color_progress 9ca0b0
fish_pager_color_prefix ea76cb
fish_pager_color_completion 4c4f69
fish_pager_color_description 9ca0b0

View file

@ -0,0 +1,30 @@
# name: 'Catppuccin Macchiato'
# url: 'https://github.com/catppuccin/fish'
# preferred_background: 24273a
fish_color_normal cad3f5
fish_color_command 8aadf4
fish_color_param f0c6c6
fish_color_keyword ed8796
fish_color_quote a6da95
fish_color_redirection f5bde6
fish_color_end f5a97f
fish_color_comment 8087a2
fish_color_error ed8796
fish_color_gray 6e738d
fish_color_selection --background=363a4f
fish_color_search_match --background=363a4f
fish_color_option a6da95
fish_color_operator f5bde6
fish_color_escape ee99a0
fish_color_autosuggestion 6e738d
fish_color_cancel ed8796
fish_color_cwd eed49f
fish_color_user 8bd5ca
fish_color_host 8aadf4
fish_color_host_remote a6da95
fish_color_status ed8796
fish_pager_color_progress 6e738d
fish_pager_color_prefix f5bde6
fish_pager_color_completion cad3f5
fish_pager_color_description 6e738d

View file

@ -0,0 +1,30 @@
# name: 'Catppuccin Mocha'
# url: 'https://github.com/catppuccin/fish'
# preferred_background: 1e1e2e
fish_color_normal cdd6f4
fish_color_command 89b4fa
fish_color_param f2cdcd
fish_color_keyword f38ba8
fish_color_quote a6e3a1
fish_color_redirection f5c2e7
fish_color_end fab387
fish_color_comment 7f849c
fish_color_error f38ba8
fish_color_gray 6c7086
fish_color_selection --background=313244
fish_color_search_match --background=313244
fish_color_option a6e3a1
fish_color_operator f5c2e7
fish_color_escape eba0ac
fish_color_autosuggestion 6c7086
fish_color_cancel f38ba8
fish_color_cwd f9e2af
fish_color_user 94e2d5
fish_color_host 89b4fa
fish_color_host_remote a6e3a1
fish_color_status f38ba8
fish_pager_color_progress 6c7086
fish_pager_color_prefix f5c2e7
fish_pager_color_completion cdd6f4
fish_pager_color_description 6c7086