Initial round of dotfiles

Remove secrets
This commit is contained in:
Bogdan Buduroiu 2022-11-27 14:18:37 +08:00
parent 84ea7ac878
commit bde86337b7
62 changed files with 5626 additions and 0 deletions

895
alacritty.yml Normal file
View file

@ -0,0 +1,895 @@
# Configuration for Alacritty, the GPU enhanced terminal emulator.
# Import additional configuration files
#
# Imports are loaded in order, skipping all missing files, with the importing
# file being loaded last. If a field is already present in a previous import, it
# will be replaced.
#
# All imports must either be absolute paths starting with `/`, or paths relative
# to the user's home directory starting with `~/`.
#import:
# - /path/to/alacritty.yml
# Any items in the `env` entry below will be added as
# environment variables. Some entries may override variables
# set by alacritty itself.
env:
# TERM variable
#
# This value is used to set the `$TERM` environment variable for
# each instance of Alacritty. If it is not present, alacritty will
# check the local terminfo database and use `alacritty` if it is
# available, otherwise `xterm-256color` is used.
TERM: alacritty
window:
# Window dimensions (changes require restart)
#
# Number of lines/columns (not pixels) in the terminal. Both lines and columns
# must be non-zero for this to take effect. The number of columns must be at
# least `2`, while using a value of `0` for columns and lines will fall back
# to the window manager's recommended size
#dimensions:
#columns: 0
#lines: 0
# Window position (changes require restart)
#
# Specified in number of pixels.
# If the position is not set, the window manager will handle the placement.
#position:
# x: 0
# y: 0
# Window padding (changes require restart)
#
# Blank space added around the window in pixels. This padding is scaled
# by DPI and the specified value is always added at both opposing sides.
#padding:
# x: 0
# y: 0
# Spread additional padding evenly around the terminal content.
# dynamic_padding: true
# Window decorations
#
# Values for `decorations`:
# - full: Borders and title bar
# - none: Neither borders nor title bar
#
# Values for `decorations` (macOS only):
# - transparent: Title bar, transparent background and title bar buttons
# - buttonless: Title bar, transparent background and no title bar buttons
decorations: none
# Background opacity
#
# Window opacity as a floating point number from `0.0` to `1.0`.
# The value `0.0` is completely transparent and `1.0` is opaque.
#opacity: 1.0
# Startup Mode (changes require restart)
#
# Values for `startup_mode`:
# - Windowed
# - Maximized
# - Fullscreen
#
# Values for `startup_mode` (macOS only):
# - SimpleFullscreen
#startup_mode: Windowed
# Window title
title: "早上好中國,我很喜歡冰淇淋"
# Allow terminal applications to change Alacritty's window title.
dynamic_title: true
# Window class (Linux/BSD only):
#class:
# Application instance name
#instance: Alacritty
# General application class
#general: Alacritty
# Decorations theme variant (Linux/BSD only)
#
# Override the variant of the GTK theme/Wayland client side decorations.
# Commonly supported values are `dark` and `light`. Set this to `None` to use
# the default theme variant.
#decorations_theme_variant: None
#scrolling:
# Maximum number of lines in the scrollback buffer.
# Specifying '0' will disable scrolling.
#history: 10000
# Scrolling distance multiplier.
#multiplier: 3
# Font configuration
font:
# Normal (roman) font face
normal:
# Font family
#
# Default:
# - (macOS) Menlo
# - (Linux/BSD) monospace
# - (Windows) Consolas
family: "Hack Nerd Font Mono"
# The `style` can be specified to pick a specific face.
#style: Regular
# Bold font face
bold:
# Font family
#
# If the bold family is not specified, it will fall back to the
# value specified for the normal font.
family: "Hack Nerd Font Mono"
# The `style` can be specified to pick a specific face.
style: Bold
# Italic font face
italic:
# Font family
#
# If the italic family is not specified, it will fall back to the
# value specified for the normal font.
family: "Hack Nerd Font Mono"
# The `style` can be specified to pick a specific face.
style: Italic
# Bold italic font face
bold_italic:
# Font family
#
# If the bold italic family is not specified, it will fall back to the
# value specified for the normal font.
family: "Hack Nerd Font Mono"
# The `style` can be specified to pick a specific face.
style: Bold Italic
# Point size
size: 13
# Offset is the extra space around each character. `offset.y` can be thought
# of as modifying the line spacing, and `offset.x` as modifying the letter
# spacing.
#offset:
# x: 0
# y: 0
# Glyph offset determines the locations of the glyphs within their cells with
# the default being at the bottom. Increasing `x` moves the glyph to the
# right, increasing `y` moves the glyph upward.
#glyph_offset:
# x: 0
# y: 0
# Use built-in font for box drawing characters.
#
# If `true`, Alacritty will use a custom built-in font for box drawing
# characters (Unicode points 2500 - 259f).
#
#builtin_box_drawing: true
# If `true`, bold text is drawn using the bright color variants.
#draw_bold_text_with_bright_colors: false
# Colors (Tomorrow Night)
#colors:
# Default colors
#primary:
# background: '#1d1f21'
# foreground: '#c5c8c6'
# Bright and dim foreground colors
#
# The dimmed foreground color is calculated automatically if it is not
# present. If the bright foreground color is not set, or
# `draw_bold_text_with_bright_colors` is `false`, the normal foreground
# color will be used.
#dim_foreground: '#828482'
#bright_foreground: '#eaeaea'
# Cursor colors
#
# Colors which should be used to draw the terminal cursor.
#
# Allowed values are CellForeground/CellBackground, which reference the
# affected cell, or hexadecimal colors like #ff00ff.
#cursor:
# text: CellBackground
# cursor: CellForeground
# Vi mode cursor colors
#
# Colors for the cursor when the vi mode is active.
#
# Allowed values are CellForeground/CellBackground, which reference the
# affected cell, or hexadecimal colors like #ff00ff.
#vi_mode_cursor:
# text: CellBackground
# cursor: CellForeground
# Search colors
#
# Colors used for the search bar and match highlighting.
#search:
# Allowed values are CellForeground/CellBackground, which reference the
# affected cell, or hexadecimal colors like #ff00ff.
#matches:
# foreground: '#000000'
# background: '#ffffff'
#focused_match:
# foreground: '#ffffff'
# background: '#000000'
# Keyboard hints
#hints:
# First character in the hint label
#
# Allowed values are CellForeground/CellBackground, which reference the
# affected cell, or hexadecimal colors like #ff00ff.
#start:
# foreground: '#1d1f21'
# background: '#e9ff5e'
# All characters after the first one in the hint label
#
# Allowed values are CellForeground/CellBackground, which reference the
# affected cell, or hexadecimal colors like #ff00ff.
#end:
# foreground: '#e9ff5e'
# background: '#1d1f21'
# Line indicator
#
# Color used for the indicator displaying the position in history during
# search and vi mode.
#
# By default, these will use the opposing primary color.
#line_indicator:
# foreground: None
# background: None
# Footer bar
#
# Color used for the footer bar on the bottom, used by search regex input,
# hyperlink URI preview, etc.
#
#footer_bar:
# background: '#c5c8c6'
# foreground: '#1d1f21'
# Selection colors
#
# Colors which should be used to draw the selection area.
#
# Allowed values are CellForeground/CellBackground, which reference the
# affected cell, or hexadecimal colors like #ff00ff.
#selection:
# text: CellBackground
# background: CellForeground
# Normal colors
#normal:
# black: '#1d1f21'
# red: '#cc6666'
# green: '#b5bd68'
# yellow: '#f0c674'
# blue: '#81a2be'
# magenta: '#b294bb'
# cyan: '#8abeb7'
# white: '#c5c8c6'
# Bright colors
#bright:
# black: '#666666'
# red: '#d54e53'
# green: '#b9ca4a'
# yellow: '#e7c547'
# blue: '#7aa6da'
# magenta: '#c397d8'
# cyan: '#70c0b1'
# white: '#eaeaea'
# Dim colors
#
# If the dim colors are not set, they will be calculated automatically based
# on the `normal` colors.
#dim:
# black: '#131415'
# red: '#864343'
# green: '#777c44'
# yellow: '#9e824c'
# blue: '#556a7d'
# magenta: '#75617b'
# cyan: '#5b7d78'
# white: '#828482'
# Indexed Colors
#
# The indexed colors include all colors from 16 to 256.
# When these are not set, they're filled with sensible defaults.
#
# Example:
# `- { index: 16, color: '#ff00ff' }`
#
#indexed_colors: []
# Transparent cell backgrounds
#
# Whether or not `window.opacity` applies to all cell backgrounds or only to
# the default background. When set to `true` all cells will be transparent
# regardless of their background color.
#transparent_background_colors: false
# Bell
#
# The bell is rung every time the BEL control character is received.
#bell:
# Visual Bell Animation
#
# Animation effect for flashing the screen when the visual bell is rung.
#
# Values for `animation`:
# - Ease
# - EaseOut
# - EaseOutSine
# - EaseOutQuad
# - EaseOutCubic
# - EaseOutQuart
# - EaseOutQuint
# - EaseOutExpo
# - EaseOutCirc
# - Linear
#animation: EaseOutExpo
# Duration of the visual bell flash in milliseconds. A `duration` of `0` will
# disable the visual bell animation.
#duration: 0
# Visual bell animation color.
#color: '#ffffff'
# Bell Command
#
# This program is executed whenever the bell is rung.
#
# When set to `command: None`, no command will be executed.
#
# Example:
# command:
# program: notify-send
# args: ["Hello, World!"]
#
#command: None
#selection:
# This string contains all characters that are used as separators for
# "semantic words" in Alacritty.
#semantic_escape_chars: ",│`|:\"' ()[]{}<>\t"
# When set to `true`, selected text will be copied to the primary clipboard.
#save_to_clipboard: false
#cursor:
# Cursor style
#style:
# Cursor shape
#
# Values for `shape`:
# - ▇ Block
# - _ Underline
# - | Beam
#shape: Block
# Cursor blinking state
#
# Values for `blinking`:
# - Never: Prevent the cursor from ever blinking
# - Off: Disable blinking by default
# - On: Enable blinking by default
# - Always: Force the cursor to always blink
#blinking: Off
# Vi mode cursor style
#
# If the vi mode cursor style is `None` or not specified, it will fall back to
# the style of the active value of the normal cursor.
#
# See `cursor.style` for available options.
#vi_mode_style: None
# Cursor blinking interval in milliseconds.
#blink_interval: 750
# Time after which cursor stops blinking, in seconds.
#
# Specifying '0' will disable timeout for blinking.
#blink_timeout: 5
# If this is `true`, the cursor will be rendered as a hollow box when the
# window is not focused.
#unfocused_hollow: true
# Thickness of the cursor relative to the cell width as floating point number
# from `0.0` to `1.0`.
#thickness: 0.15
# Live config reload (changes require restart)
#live_config_reload: true
# Shell
#
# You can set `shell.program` to the path of your favorite shell, e.g.
# `/bin/fish`. Entries in `shell.args` are passed unmodified as arguments to the
# shell.
#
# Default:
# - (Linux/BSD/macOS) `$SHELL` or the user's login shell, if `$SHELL` is unset
# - (Windows) powershell
#shell:
# program: /bin/bash
# args:
# - --login
# Startup directory
#
# Directory the shell is started in. If this is unset, or `None`, the working
# directory of the parent process will be used.
#working_directory: None
# Send ESC (\x1b) before characters when alt is pressed.
#alt_send_esc: true
# Offer IPC using `alacritty msg` (unix only)
#ipc_socket: true
#mouse:
# Click settings
#
# The `double_click` and `triple_click` settings control the time
# alacritty should wait for accepting multiple clicks as one double
# or triple click.
#double_click: { threshold: 300 }
#triple_click: { threshold: 300 }
# If this is `true`, the cursor is temporarily hidden when typing.
#hide_when_typing: false
# Hints
#
# Terminal hints can be used to find text or hyperlink in the visible part of
# the terminal and pipe it to other applications.
#hints:
# Keys used for the hint labels.
#alphabet: "jfkdls;ahgurieowpq"
# List with all available hints
#
# Each hint must have any of `regex` or `hyperlinks` field and either an
# `action` or a `command` field. The fields `mouse`, `binding` and
# `post_processing` are optional.
#
# The `hyperlinks` option will cause OSC 8 escape sequence hyperlinks to be
# highlighted.
#
# The fields `command`, `binding.key`, `binding.mods`, `binding.mode` and
# `mouse.mods` accept the same values as they do in the `key_bindings` section.
#
# The `mouse.enabled` field controls if the hint should be underlined while
# the mouse with all `mouse.mods` keys held or the vi mode cursor is above it.
#
# If the `post_processing` field is set to `true`, heuristics will be used to
# shorten the match if there are characters likely not to be part of the hint
# (e.g. a trailing `.`). This is most useful for URIs and applies only to
# `regex` matches.
#
# Values for `action`:
# - Copy
# Copy the hint's text to the clipboard.
# - Paste
# Paste the hint's text to the terminal or search.
# - Select
# Select the hint's text.
# - MoveViModeCursor
# Move the vi mode cursor to the beginning of the hint.
#enabled:
# - regex: "(ipfs:|ipns:|magnet:|mailto:|gemini:|gopher:|https:|http:|news:|file:|git:|ssh:|ftp:)\
# [^\u0000-\u001F\u007F-\u009F<>\"\\s{-}\\^⟨⟩`]+"
# hyperlinks: true
# command: xdg-open
# post_processing: true
# mouse:
# enabled: true
# mods: None
# binding:
# key: U
# mods: Control|Shift
# Mouse bindings
#
# Mouse bindings are specified as a list of objects, much like the key
# bindings further below.
#
# To trigger mouse bindings when an application running within Alacritty
# captures the mouse, the `Shift` modifier is automatically added as a
# requirement.
#
# Each mouse binding will specify a:
#
# - `mouse`:
#
# - Middle
# - Left
# - Right
# - Numeric identifier such as `5`
#
# - `action` (see key bindings for actions not exclusive to mouse mode)
#
# - Mouse exclusive actions:
#
# - ExpandSelection
# Expand the selection to the current mouse cursor location.
#
# And optionally:
#
# - `mods` (see key bindings)
#mouse_bindings:
# - { mouse: Right, action: ExpandSelection }
# - { mouse: Right, mods: Control, action: ExpandSelection }
# - { mouse: Middle, mode: ~Vi, action: PasteSelection }
# Key bindings
#
# Key bindings are specified as a list of objects. For example, this is the
# default paste binding:
#
# `- { key: V, mods: Control|Shift, action: Paste }`
#
# Each key binding will specify a:
#
# - `key`: Identifier of the key pressed
#
# - A-Z
# - F1-F24
# - Key0-Key9
#
# A full list with available key codes can be found here:
# https://docs.rs/glutin/*/glutin/event/enum.VirtualKeyCode.html#variants
#
# Instead of using the name of the keys, the `key` field also supports using
# the scancode of the desired key. Scancodes have to be specified as a
# decimal number. This command will allow you to display the hex scancodes
# for certain keys:
#
# `showkey --scancodes`.
#
# Then exactly one of:
#
# - `chars`: Send a byte sequence to the running application
#
# The `chars` field writes the specified string to the terminal. This makes
# it possible to pass escape sequences. To find escape codes for bindings
# like `PageUp` (`"\x1b[5~"`), you can run the command `showkey -a` outside
# of tmux. Note that applications use terminfo to map escape sequences back
# to keys. It is therefore required to update the terminfo when changing an
# escape sequence.
#
# - `action`: Execute a predefined action
#
# - ToggleViMode
# - SearchForward
# Start searching toward the right of the search origin.
# - SearchBackward
# Start searching toward the left of the search origin.
# - Copy
# - Paste
# - IncreaseFontSize
# - DecreaseFontSize
# - ResetFontSize
# - ScrollPageUp
# - ScrollPageDown
# - ScrollHalfPageUp
# - ScrollHalfPageDown
# - ScrollLineUp
# - ScrollLineDown
# - ScrollToTop
# - ScrollToBottom
# - ClearHistory
# Remove the terminal's scrollback history.
# - Hide
# Hide the Alacritty window.
# - Minimize
# Minimize the Alacritty window.
# - Quit
# Quit Alacritty.
# - ToggleFullscreen
# - SpawnNewInstance
# Spawn a new instance of Alacritty.
# - CreateNewWindow
# Create a new Alacritty window from the current process.
# - ClearLogNotice
# Clear Alacritty's UI warning and error notice.
# - ClearSelection
# Remove the active selection.
# - ReceiveChar
# - None
#
# - Vi mode exclusive actions:
#
# - Open
# Perform the action of the first matching hint under the vi mode cursor
# with `mouse.enabled` set to `true`.
# - ToggleNormalSelection
# - ToggleLineSelection
# - ToggleBlockSelection
# - ToggleSemanticSelection
# Toggle semantic selection based on `selection.semantic_escape_chars`.
# - CenterAroundViCursor
# Center view around vi mode cursor
#
# - Vi mode exclusive cursor motion actions:
#
# - Up
# One line up.
# - Down
# One line down.
# - Left
# One character left.
# - Right
# One character right.
# - First
# First column, or beginning of the line when already at the first column.
# - Last
# Last column, or beginning of the line when already at the last column.
# - FirstOccupied
# First non-empty cell in this terminal row, or first non-empty cell of
# the line when already at the first cell of the row.
# - High
# Top of the screen.
# - Middle
# Center of the screen.
# - Low
# Bottom of the screen.
# - SemanticLeft
# Start of the previous semantically separated word.
# - SemanticRight
# Start of the next semantically separated word.
# - SemanticLeftEnd
# End of the previous semantically separated word.
# - SemanticRightEnd
# End of the next semantically separated word.
# - WordLeft
# Start of the previous whitespace separated word.
# - WordRight
# Start of the next whitespace separated word.
# - WordLeftEnd
# End of the previous whitespace separated word.
# - WordRightEnd
# End of the next whitespace separated word.
# - Bracket
# Character matching the bracket at the cursor's location.
# - SearchNext
# Beginning of the next match.
# - SearchPrevious
# Beginning of the previous match.
# - SearchStart
# Start of the match to the left of the vi mode cursor.
# - SearchEnd
# End of the match to the right of the vi mode cursor.
#
# - Search mode exclusive actions:
# - SearchFocusNext
# Move the focus to the next search match.
# - SearchFocusPrevious
# Move the focus to the previous search match.
# - SearchConfirm
# - SearchCancel
# - SearchClear
# Reset the search regex.
# - SearchDeleteWord
# Delete the last word in the search regex.
# - SearchHistoryPrevious
# Go to the previous regex in the search history.
# - SearchHistoryNext
# Go to the next regex in the search history.
#
# - macOS exclusive actions:
# - ToggleSimpleFullscreen
# Enter fullscreen without occupying another space.
#
# - Linux/BSD exclusive actions:
#
# - CopySelection
# Copy from the selection buffer.
# - PasteSelection
# Paste from the selection buffer.
#
# - `command`: Fork and execute a specified command plus arguments
#
# The `command` field must be a map containing a `program` string and an
# `args` array of command line parameter strings. For example:
# `{ program: "alacritty", args: ["-e", "vttest"] }`
#
# And optionally:
#
# - `mods`: Key modifiers to filter binding actions
#
# - Command
# - Control
# - Option
# - Super
# - Shift
# - Alt
#
# Multiple `mods` can be combined using `|` like this:
# `mods: Control|Shift`.
# Whitespace and capitalization are relevant and must match the example.
#
# - `mode`: Indicate a binding for only specific terminal reported modes
#
# This is mainly used to send applications the correct escape sequences
# when in different modes.
#
# - AppCursor
# - AppKeypad
# - Search
# - Alt
# - Vi
#
# A `~` operator can be used before a mode to apply the binding whenever
# the mode is *not* active, e.g. `~Alt`.
#
# Bindings are always filled by default, but will be replaced when a new
# binding with the same triggers is defined. To unset a default binding, it can
# be mapped to the `ReceiveChar` action. Alternatively, you can use `None` for
# a no-op if you do not wish to receive input characters for that binding.
#
# If the same trigger is assigned to multiple actions, all of them are executed
# in the order they were defined in.
#key_bindings:
#- { key: Paste, action: Paste }
#- { key: Copy, action: Copy }
#- { key: L, mods: Control, action: ClearLogNotice }
#- { key: L, mods: Control, mode: ~Vi|~Search, chars: "\x0c" }
#- { key: PageUp, mods: Shift, mode: ~Alt, action: ScrollPageUp }
#- { key: PageDown, mods: Shift, mode: ~Alt, action: ScrollPageDown }
#- { key: Home, mods: Shift, mode: ~Alt, action: ScrollToTop }
#- { key: End, mods: Shift, mode: ~Alt, action: ScrollToBottom }
# Vi Mode
#- { key: Space, mods: Shift|Control, mode: ~Search, action: ToggleViMode }
#- { key: Space, mods: Shift|Control, mode: Vi|~Search, action: ScrollToBottom }
#- { key: Escape, mode: Vi|~Search, action: ClearSelection }
#- { key: I, mode: Vi|~Search, action: ToggleViMode }
#- { key: I, mode: Vi|~Search, action: ScrollToBottom }
#- { key: C, mods: Control, mode: Vi|~Search, action: ToggleViMode }
#- { key: Y, mods: Control, mode: Vi|~Search, action: ScrollLineUp }
#- { key: E, mods: Control, mode: Vi|~Search, action: ScrollLineDown }
#- { key: G, mode: Vi|~Search, action: ScrollToTop }
#- { key: G, mods: Shift, mode: Vi|~Search, action: ScrollToBottom }
#- { key: B, mods: Control, mode: Vi|~Search, action: ScrollPageUp }
#- { key: F, mods: Control, mode: Vi|~Search, action: ScrollPageDown }
#- { key: U, mods: Control, mode: Vi|~Search, action: ScrollHalfPageUp }
#- { key: D, mods: Control, mode: Vi|~Search, action: ScrollHalfPageDown }
#- { key: Y, mode: Vi|~Search, action: Copy }
#- { key: Y, mode: Vi|~Search, action: ClearSelection }
#- { key: Copy, mode: Vi|~Search, action: ClearSelection }
#- { key: V, mode: Vi|~Search, action: ToggleNormalSelection }
#- { key: V, mods: Shift, mode: Vi|~Search, action: ToggleLineSelection }
#- { key: V, mods: Control, mode: Vi|~Search, action: ToggleBlockSelection }
#- { key: V, mods: Alt, mode: Vi|~Search, action: ToggleSemanticSelection }
#- { key: Return, mode: Vi|~Search, action: Open }
#- { key: Z, mode: Vi|~Search, action: CenterAroundViCursor }
#- { key: K, mode: Vi|~Search, action: Up }
#- { key: J, mode: Vi|~Search, action: Down }
#- { key: H, mode: Vi|~Search, action: Left }
#- { key: L, mode: Vi|~Search, action: Right }
#- { key: Up, mode: Vi|~Search, action: Up }
#- { key: Down, mode: Vi|~Search, action: Down }
#- { key: Left, mode: Vi|~Search, action: Left }
#- { key: Right, mode: Vi|~Search, action: Right }
#- { key: Key0, mode: Vi|~Search, action: First }
#- { key: Key4, mods: Shift, mode: Vi|~Search, action: Last }
#- { key: Key6, mods: Shift, mode: Vi|~Search, action: FirstOccupied }
#- { key: H, mods: Shift, mode: Vi|~Search, action: High }
#- { key: M, mods: Shift, mode: Vi|~Search, action: Middle }
#- { key: L, mods: Shift, mode: Vi|~Search, action: Low }
#- { key: B, mode: Vi|~Search, action: SemanticLeft }
#- { key: W, mode: Vi|~Search, action: SemanticRight }
#- { key: E, mode: Vi|~Search, action: SemanticRightEnd }
#- { key: B, mods: Shift, mode: Vi|~Search, action: WordLeft }
#- { key: W, mods: Shift, mode: Vi|~Search, action: WordRight }
#- { key: E, mods: Shift, mode: Vi|~Search, action: WordRightEnd }
#- { key: Key5, mods: Shift, mode: Vi|~Search, action: Bracket }
#- { key: Slash, mode: Vi|~Search, action: SearchForward }
#- { key: Slash, mods: Shift, mode: Vi|~Search, action: SearchBackward }
#- { key: N, mode: Vi|~Search, action: SearchNext }
#- { key: N, mods: Shift, mode: Vi|~Search, action: SearchPrevious }
# Search Mode
#- { key: Return, mode: Search|Vi, action: SearchConfirm }
#- { key: Escape, mode: Search, action: SearchCancel }
#- { key: C, mods: Control, mode: Search, action: SearchCancel }
#- { key: U, mods: Control, mode: Search, action: SearchClear }
#- { key: W, mods: Control, mode: Search, action: SearchDeleteWord }
#- { key: P, mods: Control, mode: Search, action: SearchHistoryPrevious }
#- { key: N, mods: Control, mode: Search, action: SearchHistoryNext }
#- { key: Up, mode: Search, action: SearchHistoryPrevious }
#- { key: Down, mode: Search, action: SearchHistoryNext }
#- { key: Return, mode: Search|~Vi, action: SearchFocusNext }
#- { key: Return, mods: Shift, mode: Search|~Vi, action: SearchFocusPrevious }
# (Windows, Linux, and BSD only)
#- { key: V, mods: Control|Shift, mode: ~Vi, action: Paste }
#- { key: C, mods: Control|Shift, action: Copy }
#- { key: F, mods: Control|Shift, mode: ~Search, action: SearchForward }
#- { key: B, mods: Control|Shift, mode: ~Search, action: SearchBackward }
#- { key: C, mods: Control|Shift, mode: Vi|~Search, action: ClearSelection }
#- { key: Insert, mods: Shift, action: PasteSelection }
#- { key: Key0, mods: Control, action: ResetFontSize }
#- { key: Equals, mods: Control, action: IncreaseFontSize }
#- { key: Plus, mods: Control, action: IncreaseFontSize }
#- { key: NumpadAdd, mods: Control, action: IncreaseFontSize }
#- { key: Minus, mods: Control, action: DecreaseFontSize }
#- { key: NumpadSubtract, mods: Control, action: DecreaseFontSize }
# (Windows only)
#- { key: Return, mods: Alt, action: ToggleFullscreen }
# (macOS only)
#- { key: K, mods: Command, mode: ~Vi|~Search, chars: "\x0c" }
#- { key: K, mods: Command, mode: ~Vi|~Search, action: ClearHistory }
#- { key: Key0, mods: Command, action: ResetFontSize }
#- { key: Equals, mods: Command, action: IncreaseFontSize }
#- { key: Plus, mods: Command, action: IncreaseFontSize }
#- { key: NumpadAdd, mods: Command, action: IncreaseFontSize }
#- { key: Minus, mods: Command, action: DecreaseFontSize }
#- { key: NumpadSubtract, mods: Command, action: DecreaseFontSize }
#- { key: V, mods: Command, action: Paste }
#- { key: C, mods: Command, action: Copy }
#- { key: C, mods: Command, mode: Vi|~Search, action: ClearSelection }
#- { key: H, mods: Command, action: Hide }
#- { key: H, mods: Command|Alt, action: HideOtherApplications }
#- { key: M, mods: Command, action: Minimize }
#- { key: Q, mods: Command, action: Quit }
#- { key: W, mods: Command, action: Quit }
#- { key: N, mods: Command, action: SpawnNewInstance }
#- { key: F, mods: Command|Control, action: ToggleFullscreen }
#- { key: F, mods: Command, mode: ~Search, action: SearchForward }
#- { key: B, mods: Command, mode: ~Search, action: SearchBackward }
#debug:
# Display the time it takes to redraw each frame.
#render_timer: false
# Keep the log file after quitting Alacritty.
#persistent_logging: false
# Log level
#
# Values for `log_level`:
# - Off
# - Error
# - Warn
# - Info
# - Debug
# - Trace
#log_level: Warn
# Print all received window events.
#print_events: false
# Highlight window damage information.
#highlight_damage: false

39
coc-settings.json Normal file
View file

@ -0,0 +1,39 @@
{
"diagnostic.checkCurrentLine": true,
"eslint.autoFixOnSave": false,
"eslint.filetypes": ["javascript", "javascriptreact", "typescript", "typescriptreact"],
"prettier.disableSuccessMessage": true,
"coc.preferences.diagnostic.virtualText": true,
"coc.preferences.formatOnSaveFiletypes": [
"javascript",
"javascriptreact",
"typescript",
"typescriptreact",
"tf",
"ts",
"terraform",
"go"
],
"tsserver.formatOnType": false,
"coc.preferences.formatOnType": false,
"languageserver": {
"terraform": {
"command": "terraform-ls",
"args": ["serve"],
"filetypes": [
"terraform",
"tf"
],
"initializationOptions": {},
"settings": {}
},
"golang": {
"command": "gopls",
"rootPatterns":["go.mod"],
"filetypes":["go"]
}
},
"yaml.schemas": {
"kubernetes": "/*.yaml"
}
}

View file

@ -0,0 +1,31 @@
complete -c alacritty -n "__fish_use_subcommand" -l embed -d 'X11 window ID to embed Alacritty within (decimal or hexadecimal with "0x" prefix)' -r
complete -c alacritty -n "__fish_use_subcommand" -l config-file -d 'Specify alternative configuration file [default: $XDG_CONFIG_HOME/alacritty/alacritty.yml]' -r -F
complete -c alacritty -n "__fish_use_subcommand" -l socket -d 'Path for IPC socket creation' -r -F
complete -c alacritty -n "__fish_use_subcommand" -s o -l option -d 'Override configuration file options [example: cursor.style=Beam]' -r
complete -c alacritty -n "__fish_use_subcommand" -l working-directory -d 'Start the shell in the specified working directory' -r -F
complete -c alacritty -n "__fish_use_subcommand" -s e -l command -d 'Command and args to execute (must be last argument)' -r
complete -c alacritty -n "__fish_use_subcommand" -s t -l title -d 'Defines the window title [default: Alacritty]' -r
complete -c alacritty -n "__fish_use_subcommand" -l class -d 'Defines window class/app_id on X11/Wayland [default: Alacritty]' -r
complete -c alacritty -n "__fish_use_subcommand" -s h -l help -d 'Print help information'
complete -c alacritty -n "__fish_use_subcommand" -s V -l version -d 'Print version information'
complete -c alacritty -n "__fish_use_subcommand" -l print-events -d 'Print all events to stdout'
complete -c alacritty -n "__fish_use_subcommand" -l ref-test -d 'Generates ref test'
complete -c alacritty -n "__fish_use_subcommand" -s q -d 'Reduces the level of verbosity (the min level is -qq)'
complete -c alacritty -n "__fish_use_subcommand" -s v -d 'Increases the level of verbosity (the max level is -vvv)'
complete -c alacritty -n "__fish_use_subcommand" -l hold -d 'Remain open after child process exit'
complete -c alacritty -n "__fish_use_subcommand" -f -a "msg" -d 'Send a message to the Alacritty socket'
complete -c alacritty -n "__fish_use_subcommand" -f -a "help" -d 'Print this message or the help of the given subcommand(s)'
complete -c alacritty -n "__fish_seen_subcommand_from msg; and not __fish_seen_subcommand_from create-window; and not __fish_seen_subcommand_from config; and not __fish_seen_subcommand_from help" -s s -l socket -d 'IPC socket connection path override' -r -F
complete -c alacritty -n "__fish_seen_subcommand_from msg; and not __fish_seen_subcommand_from create-window; and not __fish_seen_subcommand_from config; and not __fish_seen_subcommand_from help" -s h -l help -d 'Print help information'
complete -c alacritty -n "__fish_seen_subcommand_from msg; and not __fish_seen_subcommand_from create-window; and not __fish_seen_subcommand_from config; and not __fish_seen_subcommand_from help" -f -a "create-window" -d 'Create a new window in the same Alacritty process'
complete -c alacritty -n "__fish_seen_subcommand_from msg; and not __fish_seen_subcommand_from create-window; and not __fish_seen_subcommand_from config; and not __fish_seen_subcommand_from help" -f -a "config" -d 'Update the Alacritty configuration'
complete -c alacritty -n "__fish_seen_subcommand_from msg; and not __fish_seen_subcommand_from create-window; and not __fish_seen_subcommand_from config; and not __fish_seen_subcommand_from help" -f -a "help" -d 'Print this message or the help of the given subcommand(s)'
complete -c alacritty -n "__fish_seen_subcommand_from msg; and __fish_seen_subcommand_from create-window" -l working-directory -d 'Start the shell in the specified working directory' -r -F
complete -c alacritty -n "__fish_seen_subcommand_from msg; and __fish_seen_subcommand_from create-window" -s e -l command -d 'Command and args to execute (must be last argument)' -r
complete -c alacritty -n "__fish_seen_subcommand_from msg; and __fish_seen_subcommand_from create-window" -s t -l title -d 'Defines the window title [default: Alacritty]' -r
complete -c alacritty -n "__fish_seen_subcommand_from msg; and __fish_seen_subcommand_from create-window" -l class -d 'Defines window class/app_id on X11/Wayland [default: Alacritty]' -r
complete -c alacritty -n "__fish_seen_subcommand_from msg; and __fish_seen_subcommand_from create-window" -l hold -d 'Remain open after child process exit'
complete -c alacritty -n "__fish_seen_subcommand_from msg; and __fish_seen_subcommand_from create-window" -s h -l help -d 'Print help information'
complete -c alacritty -n "__fish_seen_subcommand_from msg; and __fish_seen_subcommand_from config" -s w -l window-id -d 'Window ID for the new config' -r
complete -c alacritty -n "__fish_seen_subcommand_from msg; and __fish_seen_subcommand_from config" -s r -l reset -d 'Clear all runtime configuration changes'
complete -c alacritty -n "__fish_seen_subcommand_from msg; and __fish_seen_subcommand_from config" -s h -l help -d 'Print help information'

View file

@ -0,0 +1,586 @@
# docker.fish - docker completions for fish shell
#
# This file is generated by gen_docker_fish_completions.py from:
# https://github.com/barnybug/docker-fish-completion
#
# To install the completions:
# mkdir -p ~/.config/fish/completions
# cp docker.fish ~/.config/fish/completions
#
# Completion supported:
# - parameters
# - commands
# - containers
# - images
# - repositories
function __fish_docker_no_subcommand --description 'Test if docker has yet to be given the subcommand'
for i in (commandline -opc)
if contains -- $i attach build commit cp create diff events exec export history images import info inspect kill load login logout logs network pause port ps pull push rename restart rm rmi run save search start stop tag top trust unpause version wait stats
return 1
end
end
return 0
end
function __fish_print_docker_containers --description 'Print a list of docker containers' -a select
switch $select
case running
docker ps -a --no-trunc --filter status=running --format "{{.ID}}\n{{.Names}}" | tr ',' '\n'
case stopped
docker ps -a --no-trunc --filter status=exited --format "{{.ID}}\n{{.Names}}" | tr ',' '\n'
case all
docker ps -a --no-trunc --format "{{.ID}}\n{{.Names}}" | tr ',' '\n'
end
end
function __fish_print_docker_networks --description 'Print a list of docker networks'
docker network ls --format "{{.ID}}\n{{.Name}}" | tr ',' '\n'
end
function __fish_docker_no_subcommand_trust --description 'Test if docker has yet to be given the trust subcommand'
if __fish_seen_subcommand_from trust
for i in (commandline -opc)
if contains -- $i inspect key revoke sign signer
return 1
end
end
return 0
end
return 1
end
function __fish_docker_subcommand_path --description 'Test if command has all arguments in any order'
set -l cmd (commandline -poc)
set -e cmd[1]
for sub in $argv
if not contains -- $sub $cmd
return 1
end
end
return 0
end
function __fish_docker_subcommand_path_without --description 'Test if command has all arguments in any order'
set -l cmd (commandline -poc)
set -e cmd[1]
for sub in $argv
if contains -- $sub $cmd
return 1
end
end
return 0
end
function __fish_print_docker_images --description 'Print a list of docker images'
docker images --format "{{.Repository}}:{{.Tag}}" | command grep -v '<none>'
end
function __fish_print_docker_repositories --description 'Print a list of docker repositories'
docker images --format "{{.Repository}}" | command grep -v '<none>' | command sort | command uniq
end
# common options
complete -c docker -f -n '__fish_docker_no_subcommand' -l api-cors-header -d "Set CORS headers in the Engine API. Default is cors disabled"
complete -c docker -f -n '__fish_docker_no_subcommand' -s b -l bridge -d 'Attach containers to a pre-existing network bridge'
complete -c docker -f -n '__fish_docker_no_subcommand' -l bip -d "Use this CIDR notation address for the network bridge's IP, not compatible with -b"
complete -c docker -f -n '__fish_docker_no_subcommand' -s D -l debug -d 'Enable debug mode'
complete -c docker -f -n '__fish_docker_no_subcommand' -s d -l daemon -d 'Enable daemon mode'
complete -c docker -f -n '__fish_docker_no_subcommand' -l dns -d 'Force Docker to use specific DNS servers'
complete -c docker -f -n '__fish_docker_no_subcommand' -l dns-opt -d 'Force Docker to use specific DNS options'
complete -c docker -f -n '__fish_docker_no_subcommand' -l dns-search -d 'Force Docker to use specific DNS search domains'
complete -c docker -f -n '__fish_docker_no_subcommand' -l exec-opt -d 'Set runtime execution options'
complete -c docker -f -n '__fish_docker_no_subcommand' -l fixed-cidr -d 'IPv4 subnet for fixed IPs (e.g. 10.20.0.0/16)'
complete -c docker -f -n '__fish_docker_no_subcommand' -l fixed-cidr-v6 -d 'IPv6 subnet for fixed IPs (e.g.: 2001:a02b/48)'
complete -c docker -f -n '__fish_docker_no_subcommand' -s G -l group -d 'Group to assign the unix socket specified by -H when running in daemon mode'
complete -c docker -f -n '__fish_docker_no_subcommand' -s g -l graph -d 'Path to use as the root of the Docker runtime'
complete -c docker -f -n '__fish_docker_no_subcommand' -s H -l host -d 'The socket(s) to bind to in daemon mode or connect to in client mode, specified using one or more tcp://host:port, unix:///path/to/socket, fd://* or fd://socketfd.'
complete -c docker -f -n '__fish_docker_no_subcommand' -s h -l help -d 'Print usage'
complete -c docker -f -n '__fish_docker_no_subcommand' -l icc -d 'Allow unrestricted inter-container and Docker daemon host communication'
complete -c docker -f -n '__fish_docker_no_subcommand' -l insecure-registry -d 'Enable insecure communication with specified registries (no certificate verification for HTTPS and enable HTTP fallback) (e.g., localhost:5000 or 10.20.0.0/16)'
complete -c docker -f -n '__fish_docker_no_subcommand' -l ip -d 'Default IP address to use when binding container ports'
complete -c docker -f -n '__fish_docker_no_subcommand' -l ip-forward -d 'Enable net.ipv4.ip_forward and IPv6 forwarding if --fixed-cidr-v6 is defined. IPv6 forwarding may interfere with your existing IPv6 configuration when using Router Advertisement.'
complete -c docker -f -n '__fish_docker_no_subcommand' -l ip-masq -d "Enable IP masquerading for bridge's IP range"
complete -c docker -f -n '__fish_docker_no_subcommand' -l iptables -d "Enable Docker's addition of iptables rules"
complete -c docker -f -n '__fish_docker_no_subcommand' -l ipv6 -d 'Enable IPv6 networking'
complete -c docker -f -n '__fish_docker_no_subcommand' -s l -l log-level -d 'Set the logging level ("debug", "info", "warn", "error", "fatal")'
complete -c docker -f -n '__fish_docker_no_subcommand' -l label -d 'Set key=value labels to the daemon (displayed in `docker info`)'
complete -c docker -f -n '__fish_docker_no_subcommand' -l mtu -d 'Set the containers network MTU'
complete -c docker -f -n '__fish_docker_no_subcommand' -s p -l pidfile -d 'Path to use for daemon PID file'
complete -c docker -f -n '__fish_docker_no_subcommand' -l registry-mirror -d 'Specify a preferred Docker registry mirror'
complete -c docker -f -n '__fish_docker_no_subcommand' -s s -l storage-driver -d 'Force the Docker runtime to use a specific storage driver'
complete -c docker -f -n '__fish_docker_no_subcommand' -l selinux-enabled -d 'Enable selinux support. SELinux does not presently support the BTRFS storage driver'
complete -c docker -f -n '__fish_docker_no_subcommand' -l storage-opt -d 'Set storage driver options'
complete -c docker -f -n '__fish_docker_no_subcommand' -l tls -d 'Use TLS; implied by --tlsverify'
complete -c docker -f -n '__fish_docker_no_subcommand' -l tlscacert -d 'Trust only remotes providing a certificate signed by the CA given here'
complete -c docker -f -n '__fish_docker_no_subcommand' -l tlscert -d 'Path to TLS certificate file'
complete -c docker -f -n '__fish_docker_no_subcommand' -l tlskey -d 'Path to TLS key file'
complete -c docker -f -n '__fish_docker_no_subcommand' -l tlsverify -d 'Use TLS and verify the remote (daemon: verify client, client: verify daemon)'
complete -c docker -f -n '__fish_docker_no_subcommand' -s v -l version -d 'Print version information and quit'
# subcommands
# attach
complete -c docker -f -n '__fish_docker_no_subcommand' -a attach -d 'Attach local standard input, output, and error streams to a running container'
complete -c docker -A -f -n '__fish_seen_subcommand_from attach' -l detach-keys -d 'Override the key sequence for detaching a container'
complete -c docker -A -f -n '__fish_seen_subcommand_from attach' -l help -d 'Print usage'
complete -c docker -A -f -n '__fish_seen_subcommand_from attach' -l no-stdin -d 'Do not attach STDIN'
complete -c docker -A -f -n '__fish_seen_subcommand_from attach' -l sig-proxy -d 'Proxy all received signals to the process'
complete -c docker -A -f -n '__fish_seen_subcommand_from attach' -a '(__fish_print_docker_containers running)' -d "Container"
# build
complete -c docker -f -n '__fish_docker_no_subcommand' -a build -d 'Build an image from a Dockerfile'
complete -c docker -A -f -n '__fish_seen_subcommand_from build' -l add-host -d 'Add a custom host-to-IP mapping (host:ip)'
complete -c docker -A -f -n '__fish_seen_subcommand_from build' -l build-arg -d 'Set build-time variables'
complete -c docker -A -f -n '__fish_seen_subcommand_from build' -l cache-from -d 'Images to consider as cache sources'
complete -c docker -A -f -n '__fish_seen_subcommand_from build' -l cgroup-parent -d 'Optional parent cgroup for the container'
complete -c docker -A -f -n '__fish_seen_subcommand_from build' -l compress -d 'Compress the build context using gzip'
complete -c docker -A -f -n '__fish_seen_subcommand_from build' -l cpu-period -d 'Limit the CPU CFS (Completely Fair Scheduler) period'
complete -c docker -A -f -n '__fish_seen_subcommand_from build' -l cpu-quota -d 'Limit the CPU CFS (Completely Fair Scheduler) quota'
complete -c docker -A -f -n '__fish_seen_subcommand_from build' -s c -l cpu-shares -d 'CPU shares (relative weight)'
complete -c docker -A -f -n '__fish_seen_subcommand_from build' -l cpuset-cpus -d 'CPUs in which to allow execution (0-3, 0,1)'
complete -c docker -A -f -n '__fish_seen_subcommand_from build' -l cpuset-mems -d 'MEMs in which to allow execution (0-3, 0,1)'
complete -c docker -A -f -n '__fish_seen_subcommand_from build' -l disable-content-trust -d 'Skip image verification'
complete -c docker -A -f -n '__fish_seen_subcommand_from build' -s f -l file -d "Name of the Dockerfile (Default is PATH/Dockerfile)"
complete -c docker -A -f -n '__fish_seen_subcommand_from build' -l force-rm -d 'Always remove intermediate containers'
complete -c docker -A -f -n '__fish_seen_subcommand_from build' -l help -d 'Print usage'
complete -c docker -A -f -n '__fish_seen_subcommand_from build' -l iddfile -d 'Write the image ID to the file'
complete -c docker -A -f -n '__fish_seen_subcommand_from build' -l isolation -d 'Container isolation technology'
complete -c docker -A -f -n '__fish_seen_subcommand_from build' -l label -d 'Set metadata for an image'
complete -c docker -A -f -n '__fish_seen_subcommand_from build' -s m -l memory -d 'Memory limit'
complete -c docker -A -f -n '__fish_seen_subcommand_from build' -l memory-swap -d 'Swap limit equal to memory plus swap: -1 to enable unlimited swap'
complete -c docker -A -f -n '__fish_seen_subcommand_from build' -l network -d 'Set the networking mode for the RUN instructions during build'
complete -c docker -A -f -n '__fish_seen_subcommand_from build' -l no-cache -d 'Do not use cache when building the image'
complete -c docker -A -f -n '__fish_seen_subcommand_from build' -l pull -d 'Always attempt to pull a newer version of the image'
complete -c docker -A -f -n '__fish_seen_subcommand_from build' -s q -l quiet -d 'Suppress the build output and print image ID on success'
complete -c docker -A -f -n '__fish_seen_subcommand_from build' -l rm -d 'Remove intermediate containers after a successful build'
complete -c docker -A -f -n '__fish_seen_subcommand_from build' -l security-opt -d 'Security options'
complete -c docker -A -f -n '__fish_seen_subcommand_from build' -l shm-size -d 'Size of /dev/shm'
complete -c docker -A -f -n '__fish_seen_subcommand_from build' -s t -l tag -d 'Name and optionally a tag in the name:tag format'
complete -c docker -A -f -n '__fish_seen_subcommand_from build' -l target -d 'Set the target build stage to build'
complete -c docker -A -f -n '__fish_seen_subcommand_from build' -l ulimit -d 'Ulimit options'
# commit
complete -c docker -f -n '__fish_docker_no_subcommand' -a commit -d "Create a new image from a container's changes"
complete -c docker -A -f -n '__fish_seen_subcommand_from commit' -s a -l author -d 'Author (e.g., "John Hannibal Smith <hannibal@a-team.com>")'
complete -c docker -A -f -n '__fish_seen_subcommand_from commit' -s c -l change -d 'Apply Dockerfile instruction to the created image'
complete -c docker -A -f -n '__fish_seen_subcommand_from commit' -l help -d 'Print usage'
complete -c docker -A -f -n '__fish_seen_subcommand_from commit' -s m -l message -d 'Commit message'
complete -c docker -A -f -n '__fish_seen_subcommand_from commit' -s p -l pause -d 'Pause container during commit'
complete -c docker -A -f -n '__fish_seen_subcommand_from commit' -a '(__fish_print_docker_containers all)' -d "Container"
# cp
complete -c docker -f -n '__fish_docker_no_subcommand' -a cp -d "Copy files/folders between a container and the local filesystem"
complete -c docker -A -f -n '__fish_seen_subcommand_from cp' -s a -l archive -d 'Archive mode (copy all uid/gid information)'
complete -c docker -A -f -n '__fish_seen_subcommand_from cp' -s L -l follow-link -d 'Always follow symbol link in SRC_PATH'
complete -c docker -A -f -n '__fish_seen_subcommand_from cp' -l help -d 'Print usage'
# create
complete -c docker -f -n '__fish_docker_no_subcommand' -a create -d 'Create a new container'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l add-host -d 'Add a custom host-to-IP mapping (host:ip)'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -s a -l attach -d 'Attach to STDIN, STDOUT or STDERR.'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l blkio-weight -d 'Block IO (relative weight), between 10 and 1000, or 0 to disable (default 0)'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l blkio-weight-device -d 'Block IO weight (relative device weight)'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l cap-add -d 'Add Linux capabilities'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l cap-drop -d 'Drop Linux capabilities'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l cgroupns -d 'Cgroup namespace mode to use'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l cgroup-parent -d 'Optional parent cgroup for the container'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l cidfile -d 'Write the container ID to the file'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l cpu-count -d 'CPU count (Windows only)'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l cpu-percent -d 'CPU percent (Windows only)'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l cpu-period -d 'Limit CPU CFS (Completely Fair Scheduler) period'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l cpu-quota -d 'Limit CPU CFS (Completely Fair Scheduler) quota'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l cpu-rt-period -d 'Limit CPU real-time period in microseconds'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l cpu-rt-runtime -d 'Limit CPU real-time runtime in microseconds'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l cpu-shares -d 'CPU shares (relative weight)'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l cpus -d 'Number of CPUs'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l cpuset-cpus -d 'CPUs in which to allow execution (0-3, 0,1)'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l cpuset-mems -d 'MEMs in which to allow execution (0-3, 0,1)'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l device -d 'Add a host device to the container (e.g. --device=/dev/sdc:/dev/xvdc:rwm)'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l device-cgroup-rule -d 'Add a rule to the cgroup allowed devices list'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l device-read-bps -d 'Limit read rate (bytes per second) from a device'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l device-read-iops -d 'Limit read rate (IO per second) from a device'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l device-write-bps -d 'Limit write rate (bytes per second) to a device'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l device-write-iops -d 'Limit write rate (IO per second) to a device'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l disable-content-trust -d 'Skip image verification'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l dns -d 'Set custom DNS servers'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l dns-opt -d 'Set DNS options'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l dns-option -d 'Set DNS options'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l dns-search -d 'Set custom DNS search domains'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -s e -l env -d 'Set environment variables'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l entrypoint -d 'Overwrite the default ENTRYPOINT of the image'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l env-file -d 'Read in a line delimited file of environment variables'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l expose -d 'Expose a port or a range of ports'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l group-add -d 'Add additional groups to join'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l health-cmd -d 'Command to run to check health'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l health-interval -d 'Time between running the check (ms|s|m|h) (default 0s)'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l health-retries -d 'Consecutive failures needed to report unhealthy'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l health-start-period -d 'Start period for the container to initialize before starting health-retries countdown (ms|s|m|h) (default 0s)'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l health-timeout -d 'Maximum time to allow one check to run (ms|s|m|h) (default 0s)'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l help -d 'Print usage'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -s h -l hostname -d 'Container host name'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l init -d 'Run an init inside the container that forwards signals and reaps processes'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -s i -l interactive -d 'Keep STDIN open even if not attached'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l io-maxbandwidth -d 'Maximum IO bandwidth limit for the system drive (Windows only)'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l io-maxiops -d 'Maximum IOps limit for the system drive (Windows only)'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l ip -d 'IPv4 address (e.g., 172.30.100.104)'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l ip6 -d 'IPv6 address (e.g., 2001:db8::33)'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l ipc -d 'IPC mode to use'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l isolation -d 'Container isolation technology'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l kernel-memory -d 'Kernel memory limit'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -s l -l label -d 'Set meta data on a container'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l label-file -d 'Read in a line delimited file of labels'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l link -d 'Add link to another container'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l link-local-ip -d 'Container IPv4/IPv6 link-local addresses'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l log-driver -d 'Logging driver for the container'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l log-opt -d 'Log driver options'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l mac-address -d 'Container MAC address (e.g., 92:d0:c6:0a:29:33)'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -s m -l memory -d 'Memory limit'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l memory-reservation -d 'Memory soft limit'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l memory-swap -d 'Swap limit equal to memory plus swap: -1 to enable unlimited swap'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l memory-swappiness -d 'Tune container memory swappiness (0 to 100)'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l mount -d 'Attach a filesystem mount to the container'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l name -d 'Assign a name to the container'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -s net -l network -d 'Connect a container to a network'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -s net-alias -l network-alias -d 'Add network-scoped alias for the container'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l no-healthcheck -d 'Disable any container-specified HEALTHCHECK'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l oom-kill-disable -d 'Disable OOM Killer'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l oom-score-adj -d 'Tune hosts OOM preferences (-1000 to 1000)'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l pid -d 'PID namespace to use'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l pids-limit -d 'Tune container pids limit (set -1 for unlimited )'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l privileged -d 'Give extended privileges to this container'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -s p -l publish -d "Publish a containers port(s) to the host"
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -s P -l publish-all -d 'Publish all exposed ports to random ports'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l read-only -d "Mount the container's root filesystem as read only"
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l restart -d 'Restart policy to apply when a container exits'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l rm -d 'Automatically remove the container when it exits'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l runtime -d 'Runtime to use for this container'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l security-opt -d 'Security Options'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l shm-size -d 'Size of /dev/shm'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l stop-signal -d 'Signal to stop a container'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l stop-timeout -d 'Timeout (in seconds) to stop a container'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l storage-opt -d 'Storage driver options for the container'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l sysctl -d 'Sysctl options'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l tmpfs -d 'Mount a tmpfs directory'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -s t -l tty -d 'Allocate a pseudo-TTY'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l ulimit -d 'Ulimit options'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -s u -l user -d ' Username or UID (format: <name|uid>[:<group|gid>])'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l userns -d 'User namespace to use'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l uts -d 'UTS namespace to use'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -s v -l volume -d 'Bind mount a volume'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l volume-driver -d 'Optional volume driver for the container'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l volumes-from -d 'Mount volumes from the specified container(s)'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -s w -l workdir -d 'Working directory inside the container'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -a '(__fish_print_docker_images)' -d "Image"
# diff
complete -c docker -f -n '__fish_docker_no_subcommand' -a diff -d "Inspect changes on a container's filesystem"
complete -c docker -A -f -n '__fish_seen_subcommand_from diff' -l help -d 'Print usage'
complete -c docker -A -f -n '__fish_seen_subcommand_from diff' -a '(__fish_print_docker_containers all)' -d "Container"
# events
complete -c docker -f -n '__fish_docker_no_subcommand' -a events -d 'Get real time events from the server'
complete -c docker -A -f -n '__fish_seen_subcommand_from events' -s f -l filter -d "Filter output based on conditions provided"
complete -c docker -A -f -n '__fish_seen_subcommand_from events' -l format -d 'Format the output using the given Go template'
complete -c docker -A -f -n '__fish_seen_subcommand_from events' -l help -d 'Print usage'
complete -c docker -A -f -n '__fish_seen_subcommand_from events' -l since -d 'Show all events created since timestamp'
complete -c docker -A -f -n '__fish_seen_subcommand_from events' -l until -d 'Stream events until this timestamp'
# exec
complete -c docker -f -n '__fish_docker_no_subcommand' -a exec -d 'Run a command in a running container'
complete -c docker -A -f -n '__fish_seen_subcommand_from exec' -s d -l detach -d 'Detached mode: run command in the background'
complete -c docker -A -f -n '__fish_seen_subcommand_from exec' -l detach-keys -d 'Override the key sequence for detaching a container'
complete -c docker -A -f -n '__fish_seen_subcommand_from exec' -s e -l env -d 'Set environment variables'
complete -c docker -A -f -n '__fish_seen_subcommand_from exec' -l help -d 'Print usage'
complete -c docker -A -f -n '__fish_seen_subcommand_from exec' -s i -l interactive -d 'Keep STDIN open even if not attached'
complete -c docker -A -f -n '__fish_seen_subcommand_from exec' -l privileged -d 'Give extended privileges to the command'
complete -c docker -A -f -n '__fish_seen_subcommand_from exec' -s t -l tty -d 'Allocate a pseudo-TTY'
complete -c docker -A -f -n '__fish_seen_subcommand_from exec' -s u -l user -d 'Username or UID (format: <name|uid>[:<group|gid>])'
complete -c docker -A -f -n '__fish_seen_subcommand_from exec' -s w -l workdir -d 'Working directory inside the container'
complete -c docker -A -f -n '__fish_seen_subcommand_from exec' -a '(__fish_print_docker_containers running)' -d "Container"
# export
complete -c docker -f -n '__fish_docker_no_subcommand' -a export -d 'Stream the contents of a container as a tar archive'
complete -c docker -A -f -n '__fish_seen_subcommand_from export' -l help -d 'Print usage'
complete -c docker -A -f -n '__fish_seen_subcommand_from export' -s o -l output -d 'Write to a file, instead of STDOUT'
complete -c docker -A -f -n '__fish_seen_subcommand_from export' -a '(__fish_print_docker_containers all)' -d "Container"
# history
complete -c docker -f -n '__fish_docker_no_subcommand' -a history -d 'Show the history of an image'
complete -c docker -A -f -n '__fish_seen_subcommand_from history' -l format -d 'Pretty-print images using a Go template'
complete -c docker -A -f -n '__fish_seen_subcommand_from history' -l help -d 'Print usage'
complete -c docker -A -f -n '__fish_seen_subcommand_from history' -s H -l human -d 'Print sizes and dates in human readable format'
complete -c docker -A -f -n '__fish_seen_subcommand_from history' -l no-trunc -d "Don't truncate output"
complete -c docker -A -f -n '__fish_seen_subcommand_from history' -s q -l quiet -d 'Only show image IDs'
complete -c docker -A -f -n '__fish_seen_subcommand_from history' -a '(__fish_print_docker_images)' -d "Image"
# images
complete -c docker -f -n '__fish_docker_no_subcommand' -a images -d 'List images'
complete -c docker -A -f -n '__fish_seen_subcommand_from images' -s a -l all -d 'Show all images (default hides intermediate images)'
complete -c docker -A -f -n '__fish_seen_subcommand_from images' -l digests -d 'Show digests'
complete -c docker -A -f -n '__fish_seen_subcommand_from images' -s f -l filter -d 'Filter output based on conditions provided'
complete -c docker -A -f -n '__fish_seen_subcommand_from images' -l format -d 'Pretty-print images using a Go template'
complete -c docker -A -f -n '__fish_seen_subcommand_from images' -l help -d 'Print usage'
complete -c docker -A -f -n '__fish_seen_subcommand_from images' -l no-trunc -d "Don't truncate output"
complete -c docker -A -f -n '__fish_seen_subcommand_from images' -s q -l quiet -d 'Only show image IDs'
complete -c docker -A -f -n '__fish_seen_subcommand_from images' -a '(__fish_print_docker_repositories)' -d "Repository"
# import
complete -c docker -f -n '__fish_docker_no_subcommand' -a import -d 'Create a new filesystem image from the contents of a tarball'
complete -c docker -A -f -n '__fish_seen_subcommand_from import' -s c -l change -d 'Apply Dockerfile instruction to the created image'
complete -c docker -A -f -n '__fish_seen_subcommand_from import' -s m -l message -d 'Set commit message for imported image'
complete -c docker -A -f -n '__fish_seen_subcommand_from import' -l help -d 'Print usage'
# info
complete -c docker -f -n '__fish_docker_no_subcommand' -a info -d 'Display system-wide information'
complete -c docker -A -f -n '__fish_seen_subcommand_from info' -s f -l format -d 'Format the output using the given go template'
complete -c docker -A -f -n '__fish_seen_subcommand_from info' -l help -d 'Print usage'
# inspect
complete -c docker -f -n '__fish_docker_no_subcommand' -a inspect -d 'Return low-level information on a container or image'
complete -c docker -A -f -n '__fish_seen_subcommand_from inspect' -s f -l format -d 'Format the output using the given go template.'
complete -c docker -A -f -n '__fish_seen_subcommand_from inspect' -l help -d 'Print usage'
complete -c docker -A -f -n '__fish_seen_subcommand_from inspect' -s s -l size -d 'Display total file sizes if the type is container.'
complete -c docker -A -f -n '__fish_seen_subcommand_from inspect' -l type -d 'Return JSON for specified type'
complete -c docker -A -f -n '__fish_seen_subcommand_from inspect' -a '(__fish_print_docker_images)' -d "Image"
complete -c docker -A -f -n '__fish_seen_subcommand_from inspect' -a '(__fish_print_docker_containers all)' -d "Container"
# kill
complete -c docker -f -n '__fish_docker_no_subcommand' -a kill -d 'Kill a running container'
complete -c docker -A -f -n '__fish_seen_subcommand_from kill' -l help -d 'Print usage'
complete -c docker -A -f -n '__fish_seen_subcommand_from kill' -s s -l signal -d 'Signal to send to the container'
complete -c docker -A -f -n '__fish_seen_subcommand_from kill' -a '(__fish_print_docker_containers running)' -d "Container"
# load
complete -c docker -f -n '__fish_docker_no_subcommand' -a load -d 'Load an image from a tar archive'
complete -c docker -A -f -n '__fish_seen_subcommand_from load' -l help -d 'Print usage'
complete -c docker -A -f -n '__fish_seen_subcommand_from load' -s i -l input -d 'Read from a tar archive file, instead of STDIN'
complete -c docker -A -f -n '__fish_seen_subcommand_from load' -s q -l quiet -d 'Suppress the load output'
# login
complete -c docker -f -n '__fish_docker_no_subcommand' -a login -d 'Log in to a Docker registry server'
complete -c docker -A -f -n '__fish_seen_subcommand_from login' -l help -d 'Print usage'
complete -c docker -A -f -n '__fish_seen_subcommand_from login' -s p -l password -d 'Password'
complete -c docker -A -f -n '__fish_seen_subcommand_from login' -l password-stdin -d 'Take the password from stdin'
complete -c docker -A -f -n '__fish_seen_subcommand_from login' -s u -l username -d 'Username'
# logout
complete -c docker -f -n '__fish_docker_no_subcommand' -a logout -d 'Log out from a Docker registry server'
# logs
complete -c docker -f -n '__fish_docker_no_subcommand' -a logs -d 'Fetch the logs of a container'
complete -c docker -A -f -n '__fish_seen_subcommand_from logs' -s f -l follow -d 'Follow log output'
complete -c docker -A -f -n '__fish_seen_subcommand_from logs' -l help -d 'Print usage'
complete -c docker -A -f -n '__fish_seen_subcommand_from logs' -s t -l timestamps -d 'Show timestamps'
complete -c docker -A -f -n '__fish_seen_subcommand_from logs' -l since -d 'Show logs since timestamp'
complete -c docker -A -f -n '__fish_seen_subcommand_from logs' -s n -l tail -d 'Output the specified number of lines at the end of logs (defaults to all logs)'
complete -c docker -A -f -n '__fish_seen_subcommand_from logs' -a '(__fish_print_docker_containers running)' -d "Container"
# network
complete -c docker -f -n '__fish_docker_no_subcommand' -a network -d 'Manage networks'
complete -c docker -A -f -n '__fish_seen_subcommand_from network' -a connect -d 'Connect a container to a network'
complete -c docker -A -f -n '__fish_seen_subcommand_from network' -a create -d 'Create a network'
complete -c docker -A -f -n '__fish_seen_subcommand_from network' -a disconnect -d 'Disconnect a container from a network'
complete -c docker -A -f -n '__fish_seen_subcommand_from network' -a inspect -d 'Display detailed information on one or more networks'
complete -c docker -A -f -n '__fish_seen_subcommand_from network' -a ls -d 'List networks'
complete -c docker -A -f -n '__fish_seen_subcommand_from network' -a prune -d 'Remove all unused networks'
complete -c docker -A -f -n '__fish_seen_subcommand_from network' -a rm -d 'Remove one or more networks'
complete -c docker -A -f -n '__fish_seen_subcommand_from network' -l help -d 'Print usage'
complete -c docker -A -f -n '__fish_seen_subcommand_from network rm' -a '(__fish_print_docker_networks)' -d "Network"
complete -c docker -A -f -n '__fish_seen_subcommand_from network connect' -a '(__fish_print_docker_networks)' -d "Network"
complete -c docker -A -f -n '__fish_seen_subcommand_from network disconnect' -a '(__fish_print_docker_networks)' -d "Network"
complete -c docker -A -f -n '__fish_seen_subcommand_from network inspect' -a '(__fish_print_docker_networks)' -d "Network"
# port
complete -c docker -f -n '__fish_docker_no_subcommand' -a port -d 'Lookup the public-facing port that is NAT-ed to PRIVATE_PORT'
complete -c docker -A -f -n '__fish_seen_subcommand_from port' -l help -d 'Print usage'
complete -c docker -A -f -n '__fish_seen_subcommand_from port' -a '(__fish_print_docker_containers running)' -d "Container"
# pause
complete -c docker -f -n '__fish_docker_no_subcommand' -a pause -d 'Pause all processes within a container'
complete -c docker -A -f -n '__fish_seen_subcommand_from pause' -a '(__fish_print_docker_containers running)' -d "Container"
# ps
complete -c docker -f -n '__fish_docker_no_subcommand' -a ps -d 'List containers'
complete -c docker -A -f -n '__fish_seen_subcommand_from ps' -s a -l all -d 'Show all containers. Only running containers are shown by default.'
complete -c docker -A -f -n '__fish_seen_subcommand_from ps' -l before -d 'Show only container created before Id or Name, include non-running ones.'
complete -c docker -A -f -n '__fish_seen_subcommand_from ps' -s f -l filter -d 'Provide filter values. Valid filters:'
complete -c docker -A -f -n '__fish_seen_subcommand_from ps' -l help -d 'Print usage'
complete -c docker -A -f -n '__fish_seen_subcommand_from ps' -s l -l latest -d 'Show only the latest created container, include non-running ones.'
complete -c docker -A -f -n '__fish_seen_subcommand_from ps' -s n -d 'Show n last created containers, include non-running ones.'
complete -c docker -A -f -n '__fish_seen_subcommand_from ps' -l no-trunc -d "Don't truncate output"
complete -c docker -A -f -n '__fish_seen_subcommand_from ps' -s q -l quiet -d 'Only display container IDs'
complete -c docker -A -f -n '__fish_seen_subcommand_from ps' -s s -l size -d 'Display total file sizes'
complete -c docker -A -f -n '__fish_seen_subcommand_from ps' -l since -d 'Show only containers created since Id or Name, include non-running ones.'
# pull
complete -c docker -f -n '__fish_docker_no_subcommand' -a pull -d 'Pull an image or a repository from a Docker registry server'
complete -c docker -A -f -n '__fish_seen_subcommand_from pull' -s a -l all-tags -d 'Download all tagged images in the repository'
complete -c docker -A -f -n '__fish_seen_subcommand_from pull' -l help -d 'Print usage'
complete -c docker -A -f -n '__fish_seen_subcommand_from pull' -a '(__fish_print_docker_images)' -d "Image"
complete -c docker -A -f -n '__fish_seen_subcommand_from pull' -a '(__fish_print_docker_repositories)' -d "Repository"
# push
complete -c docker -f -n '__fish_docker_no_subcommand' -a push -d 'Push an image or a repository to a Docker registry server'
complete -c docker -A -f -n '__fish_seen_subcommand_from push' -l help -d 'Print usage'
complete -c docker -A -f -n '__fish_seen_subcommand_from push' -a '(__fish_print_docker_images)' -d "Image"
complete -c docker -A -f -n '__fish_seen_subcommand_from push' -a '(__fish_print_docker_repositories)' -d "Repository"
# rename
complete -c docker -f -n '__fish_docker_no_subcommand' -a rename -d 'Rename an existing container'
# restart
complete -c docker -f -n '__fish_docker_no_subcommand' -a restart -d 'Restart a container'
complete -c docker -A -f -n '__fish_seen_subcommand_from restart' -l help -d 'Print usage'
complete -c docker -A -f -n '__fish_seen_subcommand_from restart' -s t -l time -d 'Number of seconds to try to stop for before killing the container. Once killed it will then be restarted. Default is 10 seconds.'
complete -c docker -A -f -n '__fish_seen_subcommand_from restart' -a '(__fish_print_docker_containers running)' -d "Container"
# rm
complete -c docker -f -n '__fish_docker_no_subcommand' -a rm -d 'Remove one or more containers'
complete -c docker -A -f -n '__fish_seen_subcommand_from rm' -s f -l force -d 'Force the removal of a running container (uses SIGKILL)'
complete -c docker -A -f -n '__fish_seen_subcommand_from rm' -l help -d 'Print usage'
complete -c docker -A -f -n '__fish_seen_subcommand_from rm' -s l -l link -d 'Remove the specified link and not the underlying container'
complete -c docker -A -f -n '__fish_seen_subcommand_from rm' -s v -l volumes -d 'Remove anonymous volumes associated with the container'
complete -c docker -A -f -n '__fish_seen_subcommand_from rm' -a '(__fish_print_docker_containers stopped)' -d "Container"
complete -c docker -A -f -n '__fish_seen_subcommand_from rm' -s f -l force -a '(__fish_print_docker_containers all)' -d "Container"
# rmi
complete -c docker -f -n '__fish_docker_no_subcommand' -a rmi -d 'Remove one or more images'
complete -c docker -A -f -n '__fish_seen_subcommand_from rmi' -s f -l force -d 'Force removal of the image'
complete -c docker -A -f -n '__fish_seen_subcommand_from rmi' -l help -d 'Print usage'
complete -c docker -A -f -n '__fish_seen_subcommand_from rmi' -l no-prune -d 'Do not delete untagged parents'
complete -c docker -A -f -n '__fish_seen_subcommand_from rmi' -a '(__fish_print_docker_images)' -d "Image"
# run
complete -c docker -f -n '__fish_docker_no_subcommand' -a run -d 'Run a command in a new container'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -s a -l attach -d 'Attach to STDIN, STDOUT or STDERR.'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -l add-host -d 'Add a custom host-to-IP mapping (host:ip)'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -s c -l cpu-shares -d 'CPU shares (relative weight)'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -l cap-add -d 'Add Linux capabilities'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -l cap-drop -d 'Drop Linux capabilities'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -l cidfile -d 'Write the container ID to the file'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -l cgroupns -d 'Cgroup namespace mode to use'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -l cpuset -d 'CPUs in which to allow execution (0-3, 0,1)'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -s d -l detach -d 'Detached mode: run the container in the background and print the new container ID'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -l device -d 'Add a host device to the container (e.g. --device=/dev/sdc:/dev/xvdc:rwm)'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l device-cgroup-rule -d 'Add a rule to the cgroup allowed devices list (e.g. --device-cgroup-rule="c 13:37 rwm")'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -l dns -d 'Set custom DNS servers'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -l dns-opt -d "Set custom DNS options (Use --dns-opt='' if you don't wish to set options)"
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -l dns-search -d "Set custom DNS search domains (Use --dns-search=. if you don't wish to set the search domain)"
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -s e -l env -d 'Set environment variables'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -l entrypoint -d 'Overwrite the default ENTRYPOINT of the image'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -l env-file -d 'Read in a line delimited file of environment variables'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -l expose -d 'Expose a port or a range of ports (e.g. --expose=3300-3310) from the container without publishing it to your host'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l group-add -d 'Add additional groups to run as'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -s h -l hostname -d 'Container host name'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -l help -d 'Print usage'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -s i -l interactive -d 'Keep STDIN open even if not attached'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -l ipc -d 'Default is to create a private IPC namespace (POSIX SysV IPC) for the container'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -l link -d 'Add link to another container in the form of <name|id>:alias'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -s m -l memory -d 'Memory limit (format: <number>[<unit>], where unit = b, k, m or g)'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -l mac-address -d 'Container MAC address (e.g., 92:d0:c6:0a:29:33)'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -l memory-swap -d "Total memory usage (memory + swap), set '-1' to disable swap (format: <number>[<unit>], where unit = b, k, m or g)"
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -l mount -d 'Attach a filesystem mount to the container'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -l name -d 'Assign a name to the container'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -l net -d 'Set the Network mode for the container'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -s P -l publish-all -d 'Publish all exposed ports to random ports on the host interfaces'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -s p -l publish -d "Publish a container's port to the host"
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -l pid -d 'Default is to create a private PID namespace for the container'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -l privileged -d 'Give extended privileges to this container'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -l read-only -d "Mount the container's root filesystem as read only"
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -l restart -d 'Restart policy to apply when a container exits (no, on-failure[:max-retry], always)'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -l rm -d 'Automatically remove the container when it exits (incompatible with -d)'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -l security-opt -d 'Security Options'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -l sig-proxy -d 'Proxy received signals to the process (non-TTY mode only). SIGCHLD, SIGSTOP, and SIGKILL are not proxied.'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -l stop-signal -d 'Signal to kill a container'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -s t -l tty -d 'Allocate a pseudo-TTY'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -s u -l user -d 'Username or UID'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -l tmpfs -d 'Mount tmpfs on a directory'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -s v -l volume -d 'Bind mount a volume (e.g., from the host: -v /host:/container, from Docker: -v /container)'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -l volumes-from -d 'Mount volumes from the specified container(s)'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -s w -l workdir -d 'Working directory inside the container'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -a '(__fish_print_docker_images)' -d "Image"
# save
complete -c docker -f -n '__fish_docker_no_subcommand' -a save -d 'Save an image to a tar archive'
complete -c docker -A -f -n '__fish_seen_subcommand_from save' -l help -d 'Print usage'
complete -c docker -A -f -n '__fish_seen_subcommand_from save' -s o -l output -d 'Write to an file, instead of STDOUT'
complete -c docker -A -f -n '__fish_seen_subcommand_from save' -a '(__fish_print_docker_images)' -d "Image"
# search
complete -c docker -f -n '__fish_docker_no_subcommand' -a search -d 'Search for an image on the registry (defaults to the Docker Hub)'
complete -c docker -A -f -n '__fish_seen_subcommand_from search' -l automated -d 'Only show automated builds'
complete -c docker -A -f -n '__fish_seen_subcommand_from search' -l help -d 'Print usage'
complete -c docker -A -f -n '__fish_seen_subcommand_from search' -l no-trunc -d "Don't truncate output"
complete -c docker -A -f -n '__fish_seen_subcommand_from search' -s s -l stars -d 'Only displays with at least x stars'
# start
complete -c docker -f -n '__fish_docker_no_subcommand' -a start -d 'Start a container'
complete -c docker -A -f -n '__fish_seen_subcommand_from start' -s a -l attach -d "Attach container's STDOUT and STDERR and forward all signals to the process"
complete -c docker -A -f -n '__fish_seen_subcommand_from start' -l help -d 'Print usage'
complete -c docker -A -f -n '__fish_seen_subcommand_from start' -s i -l interactive -d "Attach container's STDIN"
complete -c docker -A -f -n '__fish_seen_subcommand_from start' -a '(__fish_print_docker_containers stopped)' -d "Container"
# stats
complete -c docker -f -n '__fish_docker_no_subcommand' -a stats -d "Display a live stream of one or more containers' resource usage statistics"
complete -c docker -A -f -n '__fish_seen_subcommand_from stats' -l help -d 'Print usage'
complete -c docker -A -f -n '__fish_seen_subcommand_from stats' -l no-stream -d 'Disable streaming stats and only pull the first result'
complete -c docker -A -f -n '__fish_seen_subcommand_from stats' -a '(__fish_print_docker_containers running)' -d "Container"
# stop
complete -c docker -f -n '__fish_docker_no_subcommand' -a stop -d 'Stop a container'
complete -c docker -A -f -n '__fish_seen_subcommand_from stop' -l help -d 'Print usage'
complete -c docker -A -f -n '__fish_seen_subcommand_from stop' -s t -l time -d 'Number of seconds to wait for the container to stop before killing it. Default is 10 seconds.'
complete -c docker -A -f -n '__fish_seen_subcommand_from stop' -a '(__fish_print_docker_containers running)' -d "Container"
# tag
complete -c docker -f -n '__fish_docker_no_subcommand' -a tag -d 'Tag an image into a repository'
complete -c docker -A -f -n '__fish_seen_subcommand_from tag' -s f -l force -d 'Force'
complete -c docker -A -f -n '__fish_seen_subcommand_from tag' -l help -d 'Print usage'
# top
complete -c docker -f -n '__fish_docker_no_subcommand' -a top -d 'Lookup the running processes of a container'
complete -c docker -A -f -n '__fish_seen_subcommand_from top' -l help -d 'Print usage'
complete -c docker -A -f -n '__fish_seen_subcommand_from top' -a '(__fish_print_docker_containers running)' -d "Container"
#trust
complete -c docker -f -n '__fish_docker_no_subcommand' -a trust -d 'Manage trust on Docker images'
complete -c docker -A -f -n '__fish_seen_subcommand_from trust' -l help -d 'Print usage'
#trust inspect
complete -c docker -A -f -n '__fish_docker_no_subcommand_trust' -a inspect -d 'Return low-level information about keys and signatures'
complete -c docker -A -f -n '__fish_docker_subcommand_path trust inspect' -l pretty -d 'Print the information in a human friendly format'
#trust key
complete -c docker -A -f -n '__fish_docker_no_subcommand_trust' -a key -d 'Manage keys for signing Docker images'
complete -c docker -A -f -n '__fish_docker_subcommand_path trust key; and __fish_docker_subcommand_path_without generate load' -a generate -d 'Generate and load a signing key-pair'
complete -c docker -A -f -n '__fish_docker_subcommand_path trust key load' -l dir -d 'Directory to generate key in, defaults to current directory'
complete -c docker -A -f -n '__fish_docker_subcommand_path trust key; and __fish_docker_subcommand_path_without generate load' -a load -d 'Load a private key file for signing'
complete -c docker -A -f -n '__fish_docker_subcommand_path trust key load' -l name -d 'Name for the loaded key (default "signer")'
#trust revoke
complete -c docker -A -f -n '__fish_docker_no_subcommand_trust' -a revoke -d 'Remove trust for an image'
complete -c docker -A -f -n '__fish_docker_subcommand_path trust revoke' -s y -l yes -d 'Do not prompt for confirmation'
#trust sign
complete -c docker -A -f -n '__fish_docker_no_subcommand_trust' -a sign -d 'Sign an image'
complete -c docker -A -f -n '__fish_docker_subcommand_path trust sign' -l local -d 'Sign a locally tagged image'
#trust signer
complete -c docker -A -f -n '__fish_docker_no_subcommand_trust' -a signer -d 'Manage entities who can sign Docker images'
complete -c docker -A -f -n '__fish_docker_subcommand_path trust signer; and __fish_docker_subcommand_path_without add remove' -a add -d 'Add a signer'
complete -c docker -A -f -n '__fish_docker_subcommand_path trust signer; and __fish_docker_subcommand_path_without add remove' -a remove -d 'remove a signer'
# unpause
complete -c docker -f -n '__fish_docker_no_subcommand' -a unpause -d 'Unpause a paused container'
complete -c docker -A -f -n '__fish_seen_subcommand_from unpause' -a '(__fish_print_docker_containers running)' -d "Container"
# version
complete -c docker -f -n '__fish_docker_no_subcommand' -a version -d 'Show the Docker version information'
complete -c docker -A -f -n '__fish_seen_subcommand_from version' -s f -l format -d 'Format the output using the given go template'
complete -c docker -A -f -n '__fish_seen_subcommand_from version' -l help -d 'Print usage'
# wait
complete -c docker -f -n '__fish_docker_no_subcommand' -a wait -d 'Block until a container stops, then print its exit code'
complete -c docker -A -f -n '__fish_seen_subcommand_from wait' -l help -d 'Print usage'
complete -c docker -A -f -n '__fish_seen_subcommand_from wait' -a '(__fish_print_docker_containers running)' -d "Container"

318
fish/completions/doctl.fish Normal file
View file

@ -0,0 +1,318 @@
# Completions for the global flags
complete -c doctl -s h -l help -d 'Show help'
complete -c doctl -s t -l access-token -d "API V2 access token"
complete -c doctl -s u -l api-url -d "Overide default API endpoint"
complete -c doctl -s c -l config -d "Specify a custom config file"
complete -c doctl -l context -d "Specify a custom authentication context name"
complete -c doctl -s o -l output -d "Desired output format [text|json] (default \"text\")"
complete -c doctl -l trace -d "Show a log of network activity"
complete -c doctl -s v -l verbose -d "Enable verbose output"
# Completions for the 'doctl' root command
complete -c doctl -n '__fish_use_subcommand' -a account -d "Retrieve account details"
complete -c doctl -n '__fish_use_subcommand' -a auth -d "Authenticating doctl with an account"
complete -c doctl -n '__fish_use_subcommand' -a balance -d "Retrieving your account balance"
complete -c doctl -n '__fish_use_subcommand' -a completion -d "Autocomplete doctl commands"
complete -c doctl -n '__fish_use_subcommand' -a compute -d "Manage infrastructure"
complete -c doctl -n '__fish_use_subcommand' -a databases -d "Manage databases"
complete -c doctl -n '__fish_use_subcommand' -a help -d "Show helps"
complete -c doctl -n '__fish_use_subcommand' -a invoice -d "Retrieving invoices for your account"
complete -c doctl -n '__fish_use_subcommand' -a kubernetes -d "Manage Kubernetes clusters and configurations"
complete -c doctl -n '__fish_use_subcommand' -a projects -d "Manage projects and assign resources to them"
complete -c doctl -n '__fish_use_subcommand' -a version -d "Show the current version"
# Completions for the 'doctl account' command
complete -c doctl -n '__fish_seen_subcommand_from account' -a get -d "Account profile details"
complete -c doctl -n '__fish_seen_subcommand_from account' -a ratelimit -d "API usage and the remaining quota"
# Completions for the 'doctl account get' command
complete -c doctl -n '__fish_seen_subcommand_from account get' -l format -d "Columns for output"
complete -c doctl -n '__fish_seen_subcommand_from account get' -l no-header -d "Return raw data with no headers"
# COmpletions for the 'doctl account ratelimit' command
complete -c doctl -n '__fish_seen_subcommand_from account ratelimit' -l format -d "Columns for output"
complete -c doctl -n '__fish_seen_subcommand_from account ratelimit' -l no-header -d "Return raw data with no headers"
# Completions for the 'doctl auth' command
complete -c doctl -n '__fish_seen_subcommand_from auth' -a init -d "Initialize doctl"
complete -c doctl -n '__fish_seen_subcommand_from auth' -a list -d "List available authentication context"
complete -c doctl -n '__fish_seen_subcommand_from auth' -a switch -d "Switches between authentication contexts"
# COmpletions for the 'doctl auth list' command
complete -c doctl -n '__fish_seen_subcommand_from auth list' -l format -d "Columns for output"
# Completions for the 'doctl balance' command
complete -c doctl -n '__fish_seen_subcommand_from balance' -a get -d "Account balance"
# COmpletions for the 'doctl balance get' command
complete -c doctl -n '__fish_seen_subcommand_from balance get' -l format -d "Columns for output"
complete -c doctl -n '__fish_seen_subcommand_from balance get' -l no-header -d "Return raw data with no headers"
# Completions for the 'doctl completion' command
complete -c doctl -n '__fish_seen_subcommand_from completion' -a bash -d "Generate completion code for bash"
complete -c doctl -n '__fish_seen_subcommand_from completion' -a fish -d "Generate completion code for fish"
complete -c doctl -n '__fish_seen_subcommand_from completion' -a zsh -d "Generate completion code for zsh"
# Completions for the 'doctl compute' command
complete -c doctl -n '__fish_seen_subcommand_from compute' -a action -d "Display commands for retrieving resource action history"
complete -c doctl -n '__fish_seen_subcommand_from compute' -a cdn -d "Display commands that manage CDNs"
complete -c doctl -n '__fish_seen_subcommand_from compute' -a certificate -d "Display commands that manage SSL certificates and private keys"
complete -c doctl -n '__fish_seen_subcommand_from compute' -a domain -d "Display commands that manage domains"
complete -c doctl -n '__fish_seen_subcommand_from compute' -a droplet -d "Manage virtual machines (Droplets)"
complete -c doctl -n '__fish_seen_subcommand_from compute' -a droplet-action -d "Display Droplet action commands"
complete -c doctl -n '__fish_seen_subcommand_from compute' -a firewall -d "Display commands to manage cloud firewalls"
complete -c doctl -n '__fish_seen_subcommand_from compute' -a floating-ip -d "Display commands to manage floating IP addresses"
complete -c doctl -n '__fish_seen_subcommand_from compute' -a floating-ip-action -d "Display commands to associate floating IP addresses with Droplets"
complete -c doctl -n '__fish_seen_subcommand_from compute' -a image -d "Display commands to manage images"
complete -c doctl -n '__fish_seen_subcommand_from compute' -a image-action -d "Display commands to perform actions on images"
complete -c doctl -n '__fish_seen_subcommand_from compute' -a load-balancer -d "Display commands to manage load balancers"
complete -c doctl -n '__fish_seen_subcommand_from compute' -a region -d "Display commands to list datacenter regions"
complete -c doctl -n '__fish_seen_subcommand_from compute' -a size -d "List available Droplet sizes"
complete -c doctl -n '__fish_seen_subcommand_from compute' -a snapshot -d "Access and manage snapshots"
complete -c doctl -n '__fish_seen_subcommand_from compute' -a ssh -d "Access a Droplet using SSH"
complete -c doctl -n '__fish_seen_subcommand_from compute' -a ssh-key -d "Display commands to manage SSH keys on your account"
complete -c doctl -n '__fish_seen_subcommand_from compute' -a tag -d "Display commands to manage tags"
complete -c doctl -n '__fish_seen_subcommand_from compute' -a volume -d "Display commands to manage block storage volumes"
complete -c doctl -n '__fish_seen_subcommand_from compute' -a volume-action -d "Display commands to perform actions on a volume"
# Completions for the 'doctl compute action' command
complete -c doctl -n '__fish_seen_subcommand_from compute action' -a get -d "Retrieve details about a specific action"
complete -c doctl -n '__fish_seen_subcommand_from compute action' -a list -d "Retrieve a list of all recent actions taken on your resources"
complete -c doctl -n '__fish_seen_subcommand_from compute action' -a wait -d "Block thread until an action completes"
# Completions for the 'doctl compute action get' command
complete -c doctl -n '__fish_seen_subcommand_from compute action get' -l format -d "Columns for output"
complete -c doctl -n '__fish_seen_subcommand_from compute action get' -l no-header -d "Return raw data with no headers"
# Completions for the 'doctl compute action list' command
complete -c doctl -n '__fish_seen_subcommand_from compute action list' -l action-type -d "Action type"
complete -c doctl -n '__fish_seen_subcommand_from compute action list' -l after -d "Action completed after in RFC3339 format"
complete -c doctl -n '__fish_seen_subcommand_from compute action list' -l before -d "Action completed before in RFC3339 format"
complete -c doctl -n '__fish_seen_subcommand_from compute action list' -l format -d "Columns for output"
complete -c doctl -n '__fish_seen_subcommand_from compute action list' -l no-header -d "Return raw data with no headers"
complete -c doctl -n '__fish_seen_subcommand_from compute action list' -l region -d "Action region"
complete -c doctl -n '__fish_seen_subcommand_from compute action list' -l resource-type -d "Action resource type"
complete -c doctl -n '__fish_seen_subcommand_from compute action list' -l status -d "Action status"
# Completions for the 'doctl compute action wait' command
complete -c doctl -n '__fish_seen_subcommand_from compute action wait' -l no-header -d "Return raw data with no headers"
complete -c doctl -n '__fish_seen_subcommand_from compute action wait' -l poll-timeout -d "Re-poll time in seconds"
# Completions for the 'doctl databases' command
complete -c doctl -n '__fish_seen_subcommand_from databases' -a backups -d "List database cluster backups"
complete -c doctl -n '__fish_seen_subcommand_from databases' -a connection -d "Retrieve connection details for a database cluster"
complete -c doctl -n '__fish_seen_subcommand_from databases' -a create -d "Create a database cluster"
complete -c doctl -n '__fish_seen_subcommand_from databases' -a db -d "Display commands for managing individual databases within a cluster"
complete -c doctl -n '__fish_seen_subcommand_from databases' -a delete -d "Delete a database cluster"
complete -c doctl -n '__fish_seen_subcommand_from databases' -a get -d "Get details for a database cluster"
complete -c doctl -n '__fish_seen_subcommand_from databases' -a list -d "List your database clusters"
complete -c doctl -n '__fish_seen_subcommand_from databases' -a maintenance-window -d "Display commands for scheduling automatic maintenance on your database cluster"
complete -c doctl -n '__fish_seen_subcommand_from databases' -a migrate -d "Migrate a database cluster to a new region"
complete -c doctl -n '__fish_seen_subcommand_from databases' -a pool -d "Display commands for managing connection pools"
complete -c doctl -n '__fish_seen_subcommand_from databases' -a replica -d "Display commands to manage read-only database replicas"
complete -c doctl -n '__fish_seen_subcommand_from databases' -a resize -d "Resize a database cluster"
complete -c doctl -n '__fish_seen_subcommand_from databases' -a sql-mode -d "Display commands to configure a MySQL database cluster's SQL modes"
complete -c doctl -n '__fish_seen_subcommand_from databases' -a user -d "Display commands for managing database users"
# Completions for the 'doctl databases backups' command
complete -c doctl -n '__fish_seen_subcommand_from databases backups' -l format -d "Columns for output"
complete -c doctl -n '__fish_seen_subcommand_from databases backups' -l no-header -d "Return raw data with no headers"
# Completions for the 'doctl databases connection' command
complete -c doctl -n '__fish_seen_subcommand_from databases connection' -l format -d "Columns for output"
complete -c doctl -n '__fish_seen_subcommand_from databases connection' -l no-header -d "Return raw data with no headers"
# Completions for the 'doctl databases create' command
complete -c doctl -n '__fish_seen_subcommand_from databases create' -l engine -d "Database engine to be used for the cluster"
complete -c doctl -n '__fish_seen_subcommand_from databases create' -l num-nodes -d "Number of nodes in the database cluster"
complete -c doctl -n '__fish_seen_subcommand_from databases create' -l private-network-uuid -d "UUID to use for private network connection"
complete -c doctl -n '__fish_seen_subcommand_from databases create' -l region -d "Region where the database cluster will be created"
complete -c doctl -n '__fish_seen_subcommand_from databases create' -l size -d "Size of the nodes in the database cluster"
complete -c doctl -n '__fish_seen_subcommand_from databases create' -l version -d "Database engine version"
# Completions for the 'doctl databases db' command
complete -c doctl -n '__fish_seen_subcommand_from databases db' -a create -d "Create a database within a cluster"
complete -c doctl -n '__fish_seen_subcommand_from databases db' -a delete -d "Delete the specified database from the cluster"
complete -c doctl -n '__fish_seen_subcommand_from databases db' -a get -d "Retrieve the name of a database within a cluster"
complete -c doctl -n '__fish_seen_subcommand_from databases db' -a list -d "Retrieve a list of databases within a cluster"
# Completions for the 'doctl invoice' command
complete -c doctl -n '__fish_seen_subcommand_from invoice' -a csv -d "Download a CSV file of an invoice"
complete -c doctl -n '__fish_seen_subcommand_from invoice' -a get -d "Retrieve a list of all the items on an invoice"
complete -c doctl -n '__fish_seen_subcommand_from invoice' -a list -d "List all of the invoices for your account"
complete -c doctl -n '__fish_seen_subcommand_from invoice' -a pdf -d "Download a PDF file of an invoice"
complete -c doctl -n '__fish_seen_subcommand_from invoice' -a summary -d "Get a summary of an invoice"
# Completions for the 'doctl invoice get' command
complete -c doctl -n '__fish_seen_subcommand_from invoice get' -l format -d "Columns for output"
complete -c doctl -n '__fish_seen_subcommand_from invoice get' -l no-header -d "Return raw data with no headers"
# Completions for the 'doctl invoice list' command
complete -c doctl -n '__fish_seen_subcommand_from invoice list' -l format -d "Columns for output"
complete -c doctl -n '__fish_seen_subcommand_from invoice list' -l no-header -d "Return raw data with no headers"
# Completions for the 'doctl invoice summary' command
complete -c doctl -n '__fish_seen_subcommand_from invoice summary' -l format -d "Columns for output"
complete -c doctl -n '__fish_seen_subcommand_from invoice summary' -l no-header -d "Return raw data with no headers"
# Completions for the 'doctl kubernetes' command
complete -c doctl -n '__fish_seen_subcommand_from kubernetes' -a cluster -d "Display commands for managing Kubernetes clusters"
complete -c doctl -n '__fish_seen_subcommand_from kubernetes' -a options -d "List possible option values for use inside Kubernetes commands"
# Completions for the 'doctl kubernetes cluster' command
complete -c doctl -n '__fish_seen_subcommand_from kubernetes cluster' -a create -d "Create a Kubernetes cluster"
complete -c doctl -n '__fish_seen_subcommand_from kubernetes cluster' -a delete -d "Delete Kubernetes clusters"
complete -c doctl -n '__fish_seen_subcommand_from kubernetes cluster' -a get -d "Retrieve details about a Kubernetes cluster"
complete -c doctl -n '__fish_seen_subcommand_from kubernetes cluster' -a get-upgrades -d "Retrieve a list of available Kubernetes version upgrades"
complete -c doctl -n '__fish_seen_subcommand_from kubernetes cluster' -a kubeconfig -d "Display commands for managing your local kubeconfig"
complete -c doctl -n '__fish_seen_subcommand_from kubernetes cluster' -a list -d "Retrieve the list of Kubernetes clusters for your account"
complete -c doctl -n '__fish_seen_subcommand_from kubernetes cluster' -a node-pool -d "Display commands for managing node pools"
complete -c doctl -n '__fish_seen_subcommand_from kubernetes cluster' -a update -d "Update a Kubernetes cluster's configuration"
complete -c doctl -n '__fish_seen_subcommand_from kubernetes cluster' -a upgrade -d "Upgrades a cluster to a new Kubernetes version"
# Completions for the 'doctl kubernetes cluster create' command
complete -c doctl -n '__fish_seen_subcommand_from kubernetes cluster create' -l auto-upgrade -d "Boolean specifying whether to enable auto-upgrade for the cluster"
complete -c doctl -n '__fish_seen_subcommand_from kubernetes cluster create' -l count -d "Number of nodes in the default node pool"
complete -c doctl -n '__fish_seen_subcommand_from kubernetes cluster create' -l maintenance-window -d "Sets the beginning of the four hour maintenance window"
complete -c doctl -n '__fish_seen_subcommand_from kubernetes cluster create' -l node-pool -d "Comma-separated list of node pools"
complete -c doctl -n '__fish_seen_subcommand_from kubernetes cluster create' -l size -d "Machine size to use when creating nodes in the default node pool"
complete -c doctl -n '__fish_seen_subcommand_from kubernetes cluster create' -l tag -d "Comma-separated list of tags to apply to the cluster"
complete -c doctl -n '__fish_seen_subcommand_from kubernetes cluster create' -l update-kubeconfig -d "Boolean that specifies whether to add a configuration context"
complete -c doctl -n '__fish_seen_subcommand_from kubernetes cluster create' -l version -d "Kubernetes version"
complete -c doctl -n '__fish_seen_subcommand_from kubernetes cluster create' -l wait -d "Boolean that specifies whether to wait for cluster creation"
# Completions for the 'doctl kubernetes cluster delete' command
complete -c doctl -n '__fish_seen_subcommand_from kubernetes cluster delete' -l force -d "Boolean indicating whether to delete the cluster without a confirmation prompt"
complete -c doctl -n '__fish_seen_subcommand_from kubernetes cluster delete' -l update-kuberconfig -d "Boolean indicating whether to remove the deleted cluster from your kubeconfig"
# Completions for the 'doctl kubernetes cluster get' command
complete -c doctl -n '__fish_seen_subcommand_from kubernetes cluster get' -l format -d "Columns for output"
complete -c doctl -n '__fish_seen_subcommand_from kubernetes cluster get' -l no-header -d "Return raw data with no headers"
# Completions for the 'doctl kubernetes cluster kubeconfig' command
complete -c doctl -n '__fish_seen_subcommand_from kubernetes cluster kubeconfig' -a remove -d "Remove a cluster's credentials from your local kubeconfig"
complete -c doctl -n '__fish_seen_subcommand_from kubernetes cluster kubeconfig' -a save -d "Save a cluster's credentials to your local kubeconfig"
complete -c doctl -n '__fish_seen_subcommand_from kubernetes cluster kubeconfig' -a show -d "Show a Kubernetes cluster's kubeconfig YAML"
# Completions for the 'doctl kubernetes cluster kubeconfig save' command
complete -c doctl -n '__fish_seen_subcommand_from kubernetes cluster kubeconfig save' -a set-current-context -d "Boolean indicating whether to set the current kubectl context"
# Completions for the 'doctl kubernetes cluster list' command
complete -c doctl -n '__fish_seen_subcommand_from kubernetes cluster list' -l format -d "Columns for output"
complete -c doctl -n '__fish_seen_subcommand_from kubernetes cluster list' -l no-header -d "Return raw data with no headers"
# Completions for the 'doctl kubernetes cluster node-pool' command
complete -c doctl -n '__fish_seen_subcommand_from kubernetes cluster node-pool' -a create -d "Create a new node pool for a cluster"
complete -c doctl -n '__fish_seen_subcommand_from kubernetes cluster node-pool' -a delete -d "Delete a node pool"
complete -c doctl -n '__fish_seen_subcommand_from kubernetes cluster node-pool' -a delete-node -d "Delete a node"
complete -c doctl -n '__fish_seen_subcommand_from kubernetes cluster node-pool' -a get -d "Retrieve information about a cluster's node pool"
complete -c doctl -n '__fish_seen_subcommand_from kubernetes cluster node-pool' -a list -d "List a cluster's node pools"
complete -c doctl -n '__fish_seen_subcommand_from kubernetes cluster node-pool' -a replace-node -d "Replace node with a new one"
complete -c doctl -n '__fish_seen_subcommand_from kubernetes cluster node-pool' -a update -d "Update an existing node pool in a cluster"
# Completions for the 'doctl kubernetes cluster node-pool create' command
complete -c doctl -n '__fish_seen_subcommand_from kubernetes cluster node-pool create' -l auto-scale -d "Boolean indicating whether to enable auto-scaling on the node pool"
complete -c doctl -n '__fish_seen_subcommand_from kubernetes cluster node-pool create' -rl count -d "Size of (number of nodes in) the node pool"
complete -c doctl -n '__fish_seen_subcommand_from kubernetes cluster node-pool create' -l label -d "Label in key=value notation to apply to the node pool"
complete -c doctl -n '__fish_seen_subcommand_from kubernetes cluster node-pool create' -l max-nodes -d "Maximum number of nodes in the node pool when autoscaling is enabled"
complete -c doctl -n '__fish_seen_subcommand_from kubernetes cluster node-pool create' -l min-nodes -d "Minimum number of nodes in the node pool when autoscaling is enabled"
complete -c doctl -n '__fish_seen_subcommand_from kubernetes cluster node-pool create' -l name -d "Name of the node pool"
complete -c doctl -n '__fish_seen_subcommand_from kubernetes cluster node-pool create' -rl size -d "Size of the nodes in the node pool"
complete -c doctl -n '__fish_seen_subcommand_from kubernetes cluster node-pool create' -l tag -d "Tag to apply to the node pool"
# Completions for the 'doctl kubernetes cluster node-pool delete' command
complete -c doctl -n '__fish_seen_subcommand_from kubernetes cluster node-pool delete' -l force -d "Delete node pool without confirmation prompt"
# Completions for the 'doctl kubernetes cluster node-pool delete-node' command
complete -c doctl -n '__fish_seen_subcommand_from kubernetes cluster node-pool delete-node' -l force -d "Delete the node without a confirmation prompt"
complete -c doctl -n '__fish_seen_subcommand_from kubernetes cluster node-pool delete-node' -l skip-drain -d "Skip draining the node before deletion"
# Completions for the 'doctl kubernetes cluster node-pool get' command
complete -c doctl -n '__fish_seen_subcommand_from kubernetes cluster node-pool get' -l format -d "Columns for output"
complete -c doctl -n '__fish_seen_subcommand_from kubernetes cluster node-pool get' -l no-header -d "Return raw data with no headers"
# Completions for the 'doctl kubernetes cluster node-pool list' command
complete -c doctl -n '__fish_seen_subcommand_from kubernetes cluster node-pool list' -l format -d "Columns for output"
complete -c doctl -n '__fish_seen_subcommand_from kubernetes cluster node-pool list' -l no-header -d "Return raw data with no headers"
# Completions for the 'doctl kubernetes cluster node-pool replace-node' command
complete -c doctl -n '__fish_seen_subcommand_from kubernetes cluster node-pool replace-node' -l force -d "Delete the node without a confirmation prompt"
complete -c doctl -n '__fish_seen_subcommand_from kubernetes cluster node-pool replace-node' -l skip-drain -d "Skip draining the node before deletion"
# Completions for the 'doctl kubernetes cluster node-pool update' command
complete -c doctl -n '__fish_seen_subcommand_from kubernetes cluster node-pool update' -l auto-scale -d "Boolean indicating whether to enable auto-scaling on the node pool"
complete -c doctl -n '__fish_seen_subcommand_from kubernetes cluster node-pool update' -l count -d "Size of (number of nodes in) the node pool"
complete -c doctl -n '__fish_seen_subcommand_from kubernetes cluster node-pool update' -l label -d "Label in key=value notation to apply to the node pool"
complete -c doctl -n '__fish_seen_subcommand_from kubernetes cluster node-pool update' -l max-nodes -d "Maximum number of nodes in the node pool when autoscaling is enabled"
complete -c doctl -n '__fish_seen_subcommand_from kubernetes cluster node-pool update' -l min-nodes -d "Minimum number of nodes in the node pool when autoscaling is enabled"
complete -c doctl -n '__fish_seen_subcommand_from kubernetes cluster node-pool update' -l name -d "Name of the node pool"
complete -c doctl -n '__fish_seen_subcommand_from kubernetes cluster node-pool update' -l size -d "Size of the nodes in the node pool"
complete -c doctl -n '__fish_seen_subcommand_from kubernetes cluster node-pool update' -l tag -d "Tag to apply to the node pool"
# Completions for the 'doctl kubernetes cluster update' command
complete -c doctl -n '__fish_seen_subcommand_from kubernetes cluster update' -l auto-upgrade -d "Boolean specifying whether to enable auto-upgrade for the cluster"
complete -c doctl -n '__fish_seen_subcommand_from kubernetes cluster update' -l cluster-name -d "Specifies a new cluster name"
complete -c doctl -n '__fish_seen_subcommand_from kubernetes cluster update' -l maintenance-window -d "Sets the beginning of the four hour maintenance window for the cluster"
complete -c doctl -n '__fish_seen_subcommand_from kubernetes cluster update' -l set-current-context -d "Boolean specifying whether to set the current kubectl context"
complete -c doctl -n '__fish_seen_subcommand_from kubernetes cluster update' -l tag -d "A comma-separated list of tags to apply to the cluster"
complete -c doctl -n '__fish_seen_subcommand_from kubernetes cluster update' -l update-kubeconfig -d "Boolean specifying whether to update the cluster"
# Completions for the 'doctl kubernetes cluster upgrade' command
complete -c doctl -n '__fish_seen_subcommand_from kubernetes cluster upgrade' -l version -d "Desired Kubernetes version"
# Completions for the 'doctl kubernetes options' command
complete -c doctl -n '__fish_seen_subcommand_from kubernetes options' -a regions -d "List regions that support DigitalOcean Kubernetes clusters"
complete -c doctl -n '__fish_seen_subcommand_from kubernetes options' -a sizes -d "List machine sizes that can be used in a DigitalOcean Kubernetes cluster"
complete -c doctl -n '__fish_seen_subcommand_from kubernetes options' -a versions -d "List Kubernetes versions that can be used with DigitalOcean clusters"
# Completions for the 'doctl projects' command
complete -c doctl -n '__fish_seen_subcommand_from projects' -a create -d "Create a new project"
complete -c doctl -n '__fish_seen_subcommand_from projects' -a delete -d "Delete the specified project"
complete -c doctl -n '__fish_seen_subcommand_from projects' -a get -d "Retrieve details for a specific project"
complete -c doctl -n '__fish_seen_subcommand_from projects' -a list -d "List existing projects"
complete -c doctl -n '__fish_seen_subcommand_from projects' -a resources -d "Manage resources assigned to a project"
complete -c doctl -n '__fish_seen_subcommand_from projects' -a update -d "Update an existing project"
# Completions for the 'doctl projects create' command
complete -c doctl -n '__fish_seen_subcommand_from projects create' -l description -d "Dscription of the project"
complete -c doctl -n '__fish_seen_subcommand_from projects create' -l environment -d "Environment in which your project resides."
complete -c doctl -n '__fish_seen_subcommand_from projects create' -l format -d "Columns for output in a comma-separated list."
complete -c doctl -n '__fish_seen_subcommand_from projects create' -rl name -d "Name for the project"
complete -c doctl -n '__fish_seen_subcommand_from projects create' -rl no-header -d "Return raw data with no headers"
complete -c doctl -n '__fish_seen_subcommand_from projects create' -rl purpose -d "Project's purpose"
# Completions for the 'doctl projects delete' command
complete -c doctl -n '__fish_seen_subcommand_from doctl projects delete' -l force -d "Delete the project without confirmation"
# Completions for the 'doctl projects get' command
complete -c doctl -n '__fish_seen_subcommand_from projects get' -l format -d "Columns for output"
complete -c doctl -n '__fish_seen_subcommand_from projects get' -l no-header -d "Return raw data with no headers"
# Completions for the 'doctl projects list' command
complete -c doctl -n '__fish_seen_subcommand_from projects list' -l format -d "Columns for output"
complete -c doctl -n '__fish_seen_subcommand_from projects list' -l no-header -d "Return raw data with no headers"
# Completions for the 'doctl projects resources' command
complete -c doctl -n '__fish_seen_subcommand_from projects resources' -a assign -d "Assign one or more resources to a project"
complete -c doctl -n '__fish_seen_subcommand_from projects resources' -a get -d "Retrieve a resource by its URN"
complete -c doctl -n '__fish_seen_subcommand_from projects resources' -a list -d "List resources assigned to a project"
# Completions for the 'doctl projects resources assign' command
complete -c doctl -n '__fish_seen_subcommand_from projects resources assign' -l resource -d "URNs specifying resources to assign to the project"
# Completions for the 'doctl projects resources get' command
complete -c doctl -n '__fish_seen_subcommand_from projects resources get' -l format -d "Columns for output"
complete -c doctl -n '__fish_seen_subcommand_from projects resources get' -l no-header -d "Return raw data with no headers"
# Completions for the 'doctl projects resources list' command
complete -c doctl -n '__fish_seen_subcommand_from projects resources list' -l format -d "Columns for output"
complete -c doctl -n '__fish_seen_subcommand_from projects resources list' -l no-header -d "Return raw data with no headers"
# Completions for the 'doctl projects update' command
complete -c doctl -n '__fish_seen_subcommand_from projects update' -l description -d "Description of the project"
complete -c doctl -n '__fish_seen_subcommand_from projects update' -l environment -d "Environment in which your project resides."
complete -c doctl -n '__fish_seen_subcommand_from projects update' -l format -d "Columns for output in a comma-separated list."
complete -c doctl -n '__fish_seen_subcommand_from projects update' -rl name -d "Name for the project"
complete -c doctl -n '__fish_seen_subcommand_from projects update' -l no-header -d "Return raw data with no headers"
complete -c doctl -n '__fish_seen_subcommand_from projects update' -rl purpose -d "Project's purpose"

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,7 @@
complete fzf_configure_bindings --no-files
complete fzf_configure_bindings --long help --short h --description "Print help"
complete fzf_configure_bindings --long directory --description "Change the key binding for searching directory"
complete fzf_configure_bindings --long git_log --description "Change the key binding for searching git log"
complete fzf_configure_bindings --long git_status --description "Change the key binding for searching git status"
complete fzf_configure_bindings --long history --description "Change the key binding for searching history"
complete fzf_configure_bindings --long variables --description "Change the key binding for searching variables"

View file

@ -0,0 +1,2 @@
complete -f -c gcloud -a '(gcloud_sdk_argcomplete)'

View file

@ -0,0 +1,2 @@
complete -x -c gsutil -a '(gcloud_sdk_argcomplete)'

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,142 @@
function __fish_poetry_34b8720aa1470c44_complete_no_subcommand
for i in (commandline -opc)
if contains -- $i about add build cache check config debug env export help init install lock new publish remove run search self shell show update version
return 1
end
end
return 0
end
# global options
complete -c poetry -n '__fish_poetry_34b8720aa1470c44_complete_no_subcommand' -l ansi -d 'Force ANSI output'
complete -c poetry -n '__fish_poetry_34b8720aa1470c44_complete_no_subcommand' -l help -d 'Display this help message'
complete -c poetry -n '__fish_poetry_34b8720aa1470c44_complete_no_subcommand' -l no-ansi -d 'Disable ANSI output'
complete -c poetry -n '__fish_poetry_34b8720aa1470c44_complete_no_subcommand' -l no-interaction -d 'Do not ask any interactive question'
complete -c poetry -n '__fish_poetry_34b8720aa1470c44_complete_no_subcommand' -l quiet -d 'Do not output any message'
complete -c poetry -n '__fish_poetry_34b8720aa1470c44_complete_no_subcommand' -l verbose -d 'Increase the verbosity of messages: "-v" for normal output, "-vv" for more verbose output and "-vvv" for debug'
complete -c poetry -n '__fish_poetry_34b8720aa1470c44_complete_no_subcommand' -l version -d 'Display this application version'
# commands
complete -c poetry -f -n '__fish_poetry_34b8720aa1470c44_complete_no_subcommand' -a about -d 'Shows information about Poetry.'
complete -c poetry -f -n '__fish_poetry_34b8720aa1470c44_complete_no_subcommand' -a add -d 'Adds a new dependency to pyproject.toml.'
complete -c poetry -f -n '__fish_poetry_34b8720aa1470c44_complete_no_subcommand' -a build -d 'Builds a package, as a tarball and a wheel by default.'
complete -c poetry -f -n '__fish_poetry_34b8720aa1470c44_complete_no_subcommand' -a cache -d 'Interact with Poetry\'s cache'
complete -c poetry -f -n '__fish_poetry_34b8720aa1470c44_complete_no_subcommand' -a check -d 'Checks the validity of the pyproject.toml file.'
complete -c poetry -f -n '__fish_poetry_34b8720aa1470c44_complete_no_subcommand' -a config -d 'Manages configuration settings.'
complete -c poetry -f -n '__fish_poetry_34b8720aa1470c44_complete_no_subcommand' -a debug -d 'Debug various elements of Poetry.'
complete -c poetry -f -n '__fish_poetry_34b8720aa1470c44_complete_no_subcommand' -a env -d 'Interact with Poetry\'s project environments.'
complete -c poetry -f -n '__fish_poetry_34b8720aa1470c44_complete_no_subcommand' -a export -d 'Exports the lock file to alternative formats.'
complete -c poetry -f -n '__fish_poetry_34b8720aa1470c44_complete_no_subcommand' -a help -d 'Display the manual of a command'
complete -c poetry -f -n '__fish_poetry_34b8720aa1470c44_complete_no_subcommand' -a init -d 'Creates a basic pyproject.toml file in the current directory.'
complete -c poetry -f -n '__fish_poetry_34b8720aa1470c44_complete_no_subcommand' -a install -d 'Installs the project dependencies.'
complete -c poetry -f -n '__fish_poetry_34b8720aa1470c44_complete_no_subcommand' -a lock -d 'Locks the project dependencies.'
complete -c poetry -f -n '__fish_poetry_34b8720aa1470c44_complete_no_subcommand' -a new -d 'Creates a new Python project at <path>.'
complete -c poetry -f -n '__fish_poetry_34b8720aa1470c44_complete_no_subcommand' -a publish -d 'Publishes a package to a remote repository.'
complete -c poetry -f -n '__fish_poetry_34b8720aa1470c44_complete_no_subcommand' -a remove -d 'Removes a package from the project dependencies.'
complete -c poetry -f -n '__fish_poetry_34b8720aa1470c44_complete_no_subcommand' -a run -d 'Runs a command in the appropriate environment.'
complete -c poetry -f -n '__fish_poetry_34b8720aa1470c44_complete_no_subcommand' -a search -d 'Searches for packages on remote repositories.'
complete -c poetry -f -n '__fish_poetry_34b8720aa1470c44_complete_no_subcommand' -a self -d 'Interact with Poetry directly.'
complete -c poetry -f -n '__fish_poetry_34b8720aa1470c44_complete_no_subcommand' -a shell -d 'Spawns a shell within the virtual environment.'
complete -c poetry -f -n '__fish_poetry_34b8720aa1470c44_complete_no_subcommand' -a show -d 'Shows information about packages.'
complete -c poetry -f -n '__fish_poetry_34b8720aa1470c44_complete_no_subcommand' -a update -d 'Update the dependencies as according to the pyproject.toml file.'
complete -c poetry -f -n '__fish_poetry_34b8720aa1470c44_complete_no_subcommand' -a version -d 'Shows the version of the project or bumps it when a valid bump rule is provided.'
# command options
# about
# add
complete -c poetry -A -n '__fish_seen_subcommand_from add' -l allow-prereleases -d 'Accept prereleases.'
complete -c poetry -A -n '__fish_seen_subcommand_from add' -l dev -d 'Add as a development dependency.'
complete -c poetry -A -n '__fish_seen_subcommand_from add' -l dry-run -d 'Output the operations but do not execute anything (implicitly enables --verbose).'
complete -c poetry -A -n '__fish_seen_subcommand_from add' -l extras -d 'Extras to activate for the dependency.'
complete -c poetry -A -n '__fish_seen_subcommand_from add' -l lock -d 'Do not perform operations (only update the lockfile).'
complete -c poetry -A -n '__fish_seen_subcommand_from add' -l optional -d 'Add as an optional dependency.'
complete -c poetry -A -n '__fish_seen_subcommand_from add' -l platform -d 'Platforms for which the dependency must be installed.'
complete -c poetry -A -n '__fish_seen_subcommand_from add' -l python -d 'Python version for which the dependency must be installed.'
complete -c poetry -A -n '__fish_seen_subcommand_from add' -l source -d 'Name of the source to use to install the package.'
# build
complete -c poetry -A -n '__fish_seen_subcommand_from build' -l format -d 'Limit the format to either sdist or wheel.'
# cache
# check
# config
complete -c poetry -A -n '__fish_seen_subcommand_from config' -l list -d 'List configuration settings.'
complete -c poetry -A -n '__fish_seen_subcommand_from config' -l local -d 'Set/Get from the project\'s local configuration.'
complete -c poetry -A -n '__fish_seen_subcommand_from config' -l unset -d 'Unset configuration setting.'
# debug
# env
# export
complete -c poetry -A -n '__fish_seen_subcommand_from export' -l dev -d 'Include development dependencies.'
complete -c poetry -A -n '__fish_seen_subcommand_from export' -l extras -d 'Extra sets of dependencies to include.'
complete -c poetry -A -n '__fish_seen_subcommand_from export' -l format -d 'Format to export to. Currently, only requirements.txt is supported.'
complete -c poetry -A -n '__fish_seen_subcommand_from export' -l output -d 'The name of the output file.'
complete -c poetry -A -n '__fish_seen_subcommand_from export' -l with-credentials -d 'Include credentials for extra indices.'
complete -c poetry -A -n '__fish_seen_subcommand_from export' -l without-hashes -d 'Exclude hashes from the exported file.'
# help
# init
complete -c poetry -A -n '__fish_seen_subcommand_from init' -l author -d 'Author name of the package.'
complete -c poetry -A -n '__fish_seen_subcommand_from init' -l dependency -d 'Package to require, with an optional version constraint, e.g. requests:^2.10.0 or requests=2.11.1.'
complete -c poetry -A -n '__fish_seen_subcommand_from init' -l description -d 'Description of the package.'
complete -c poetry -A -n '__fish_seen_subcommand_from init' -l dev-dependency -d 'Package to require for development, with an optional version constraint, e.g. requests:^2.10.0 or requests=2.11.1.'
complete -c poetry -A -n '__fish_seen_subcommand_from init' -l license -d 'License of the package.'
complete -c poetry -A -n '__fish_seen_subcommand_from init' -l name -d 'Name of the package.'
complete -c poetry -A -n '__fish_seen_subcommand_from init' -l python -d 'Compatible Python versions.'
# install
complete -c poetry -A -n '__fish_seen_subcommand_from install' -l dry-run -d 'Output the operations but do not execute anything (implicitly enables --verbose).'
complete -c poetry -A -n '__fish_seen_subcommand_from install' -l extras -d 'Extra sets of dependencies to install.'
complete -c poetry -A -n '__fish_seen_subcommand_from install' -l no-dev -d 'Do not install the development dependencies.'
complete -c poetry -A -n '__fish_seen_subcommand_from install' -l no-root -d 'Do not install the root package (the current project).'
complete -c poetry -A -n '__fish_seen_subcommand_from install' -l remove-untracked -d 'Removes packages not present in the lock file.'
# lock
complete -c poetry -A -n '__fish_seen_subcommand_from lock' -l no-update -d 'Do not update locked versions, only refresh lock file.'
# new
complete -c poetry -A -n '__fish_seen_subcommand_from new' -l name -d 'Set the resulting package name.'
complete -c poetry -A -n '__fish_seen_subcommand_from new' -l src -d 'Use the src layout for the project.'
# publish
complete -c poetry -A -n '__fish_seen_subcommand_from publish' -l build -d 'Build the package before publishing.'
complete -c poetry -A -n '__fish_seen_subcommand_from publish' -l cert -d 'Certificate authority to access the repository.'
complete -c poetry -A -n '__fish_seen_subcommand_from publish' -l client-cert -d 'Client certificate to access the repository.'
complete -c poetry -A -n '__fish_seen_subcommand_from publish' -l dry-run -d 'Perform all actions except upload the package.'
complete -c poetry -A -n '__fish_seen_subcommand_from publish' -l password -d 'The password to access the repository.'
complete -c poetry -A -n '__fish_seen_subcommand_from publish' -l repository -d 'The repository to publish the package to.'
complete -c poetry -A -n '__fish_seen_subcommand_from publish' -l username -d 'The username to access the repository.'
# remove
complete -c poetry -A -n '__fish_seen_subcommand_from remove' -l dev -d 'Remove a package from the development dependencies.'
complete -c poetry -A -n '__fish_seen_subcommand_from remove' -l dry-run -d 'Output the operations but do not execute anything (implicitly enables --verbose).'
# run
# search
# self
# shell
# show
complete -c poetry -A -n '__fish_seen_subcommand_from show' -l all -d 'Show all packages (even those not compatible with current system).'
complete -c poetry -A -n '__fish_seen_subcommand_from show' -l latest -d 'Show the latest version.'
complete -c poetry -A -n '__fish_seen_subcommand_from show' -l no-dev -d 'Do not list the development dependencies.'
complete -c poetry -A -n '__fish_seen_subcommand_from show' -l outdated -d 'Show the latest version but only for packages that are outdated.'
complete -c poetry -A -n '__fish_seen_subcommand_from show' -l tree -d 'List the dependencies as a tree.'
# update
complete -c poetry -A -n '__fish_seen_subcommand_from update' -l dry-run -d 'Output the operations but do not execute anything (implicitly enables --verbose).'
complete -c poetry -A -n '__fish_seen_subcommand_from update' -l lock -d 'Do not perform operations (only update the lockfile).'
complete -c poetry -A -n '__fish_seen_subcommand_from update' -l no-dev -d 'Do not update the development dependencies.'
# version
complete -c poetry -A -n '__fish_seen_subcommand_from version' -l short -d 'Output the version number only'

164
fish/completions/yq.fish Normal file
View file

@ -0,0 +1,164 @@
# fish completion for yq -*- shell-script -*-
function __yq_debug
set file "$BASH_COMP_DEBUG_FILE"
if test -n "$file"
echo "$argv" >> $file
end
end
function __yq_perform_completion
__yq_debug "Starting __yq_perform_completion with: $argv"
set args (string split -- " " "$argv")
set lastArg "$args[-1]"
__yq_debug "args: $args"
__yq_debug "last arg: $lastArg"
set emptyArg ""
if test -z "$lastArg"
__yq_debug "Setting emptyArg"
set emptyArg \"\"
end
__yq_debug "emptyArg: $emptyArg"
if not type -q "$args[1]"
# This can happen when "complete --do-complete yq" is called when running this script.
__yq_debug "Cannot find $args[1]. No completions."
return
end
set requestComp "$args[1] __complete $args[2..-1] $emptyArg"
__yq_debug "Calling $requestComp"
set results (eval $requestComp 2> /dev/null)
set comps $results[1..-2]
set directiveLine $results[-1]
# For Fish, when completing a flag with an = (e.g., <program> -n=<TAB>)
# completions must be prefixed with the flag
set flagPrefix (string match -r -- '-.*=' "$lastArg")
__yq_debug "Comps: $comps"
__yq_debug "DirectiveLine: $directiveLine"
__yq_debug "flagPrefix: $flagPrefix"
for comp in $comps
printf "%s%s\n" "$flagPrefix" "$comp"
end
printf "%s\n" "$directiveLine"
end
# This function does three things:
# 1- Obtain the completions and store them in the global __yq_comp_results
# 2- Set the __yq_comp_do_file_comp flag if file completion should be performed
# and unset it otherwise
# 3- Return true if the completion results are not empty
function __yq_prepare_completions
# Start fresh
set --erase __yq_comp_do_file_comp
set --erase __yq_comp_results
# Check if the command-line is already provided. This is useful for testing.
if not set --query __yq_comp_commandLine
# Use the -c flag to allow for completion in the middle of the line
set __yq_comp_commandLine (commandline -c)
end
__yq_debug "commandLine is: $__yq_comp_commandLine"
set results (__yq_perform_completion "$__yq_comp_commandLine")
set --erase __yq_comp_commandLine
__yq_debug "Completion results: $results"
if test -z "$results"
__yq_debug "No completion, probably due to a failure"
# Might as well do file completion, in case it helps
set --global __yq_comp_do_file_comp 1
return 1
end
set directive (string sub --start 2 $results[-1])
set --global __yq_comp_results $results[1..-2]
__yq_debug "Completions are: $__yq_comp_results"
__yq_debug "Directive is: $directive"
set shellCompDirectiveError 1
set shellCompDirectiveNoSpace 2
set shellCompDirectiveNoFileComp 4
set shellCompDirectiveFilterFileExt 8
set shellCompDirectiveFilterDirs 16
if test -z "$directive"
set directive 0
end
set compErr (math (math --scale 0 $directive / $shellCompDirectiveError) % 2)
if test $compErr -eq 1
__yq_debug "Received error directive: aborting."
# Might as well do file completion, in case it helps
set --global __yq_comp_do_file_comp 1
return 1
end
set filefilter (math (math --scale 0 $directive / $shellCompDirectiveFilterFileExt) % 2)
set dirfilter (math (math --scale 0 $directive / $shellCompDirectiveFilterDirs) % 2)
if test $filefilter -eq 1; or test $dirfilter -eq 1
__yq_debug "File extension filtering or directory filtering not supported"
# Do full file completion instead
set --global __yq_comp_do_file_comp 1
return 1
end
set nospace (math (math --scale 0 $directive / $shellCompDirectiveNoSpace) % 2)
set nofiles (math (math --scale 0 $directive / $shellCompDirectiveNoFileComp) % 2)
__yq_debug "nospace: $nospace, nofiles: $nofiles"
# Important not to quote the variable for count to work
set numComps (count $__yq_comp_results)
__yq_debug "numComps: $numComps"
if test $numComps -eq 1; and test $nospace -ne 0
# To support the "nospace" directive we trick the shell
# by outputting an extra, longer completion.
__yq_debug "Adding second completion to perform nospace directive"
set --append __yq_comp_results $__yq_comp_results[1].
end
if test $numComps -eq 0; and test $nofiles -eq 0
__yq_debug "Requesting file completion"
set --global __yq_comp_do_file_comp 1
end
# If we don't want file completion, we must return true even if there
# are no completions found. This is because fish will perform the last
# completion command, even if its condition is false, if no other
# completion command was triggered
return (not set --query __yq_comp_do_file_comp)
end
# Since Fish completions are only loaded once the user triggers them, we trigger them ourselves
# so we can properly delete any completions provided by another script.
# The space after the the program name is essential to trigger completion for the program
# and not completion of the program name itself.
complete --do-complete "yq " > /dev/null 2>&1
# Using '> /dev/null 2>&1' since '&>' is not supported in older versions of fish.
# Remove any pre-existing completions for the program since we will be handling all of them.
complete -c yq -e
# The order in which the below two lines are defined is very important so that __yq_prepare_completions
# is called first. It is __yq_prepare_completions that sets up the __yq_comp_do_file_comp variable.
#
# This completion will be run second as complete commands are added FILO.
# It triggers file completion choices when __yq_comp_do_file_comp is set.
complete -c yq -n 'set --query __yq_comp_do_file_comp'
# This completion will be run first as complete commands are added FILO.
# The call to __yq_prepare_completions will setup both __yq_comp_results and __yq_comp_do_file_comp.
# It provides the program's completion choices.
complete -c yq -n '__yq_prepare_completions' -f -a '$__yq_comp_results'

35
fish/conf.d/fzf.fish Normal file
View file

@ -0,0 +1,35 @@
# fzf.fish is only meant to be used in interactive mode. If not in interactive mode and not in CI, skip the config to speed up shell startup
if not status is-interactive && test "$CI" != true
exit
end
# Because of scoping rules, to capture the shell variables exactly as they are, we must read
# them before even executing _fzf_search_variables. We use psub to store the
# variables' info in temporary files and pass in the filenames as arguments.
# # This variable is global so that it can be referenced by fzf_configure_bindings and in tests
set --global _fzf_search_vars_command '_fzf_search_variables (set --show | psub) (set --names | psub)'
# Install the default bindings, which are mnemonic and minimally conflict with fish's preset bindings
fzf_configure_bindings
# Doesn't erase autoloaded _fzf_* functions because they are not easily accessible once key bindings are erased
function _fzf_uninstall --on-event fzf_uninstall
_fzf_uninstall_bindings
set --erase _fzf_search_vars_command
functions --erase _fzf_uninstall _fzf_migration_message _fzf_uninstall_bindings fzf_configure_bindings
complete --erase fzf_configure_bindings
set_color cyan
echo "fzf.fish uninstalled."
echo "You may need to manually remove fzf_configure_bindings from your config.fish if you were using custom key bindings."
set_color normal
end
function _fzf_migration_message --on-event fzf_update
set_color FF8C00 # dark orange
printf '\n%s\n' 'If you last updated fzf.fish before 2021-06-11, you need to migrate your key bindings.'
printf '%s\n\n' 'Check out https://github.com/PatrickF1/fzf.fish/wiki/Migration-Guides#v7.'
set_color normal
end

11
fish/conf.d/git.fish Normal file
View file

@ -0,0 +1,11 @@
function _git_install --on-event git_install
__git.init
end
function _git_update --on-event git_update
__git.reset
end
function _git_uninstall --on-event git_uninstall
__git.destroy
end

7
fish/conf.d/omf.fish Normal file
View file

@ -0,0 +1,7 @@
# Path to Oh My Fish install.
set -q XDG_DATA_HOME
and set -gx OMF_PATH "$XDG_DATA_HOME/omf"
or set -gx OMF_PATH "$HOME/.local/share/omf"
# Load Oh My Fish configuration.
source $OMF_PATH/init.fish

46
fish/config.fish Normal file
View file

@ -0,0 +1,46 @@
if status is-interactive
# Commands to run in interactive sessions can go here
end
source ~/.iterm2_shell_integration.fish
# Keyboard repeat
defaults write -g InitialKeyRepeat -int 15 # normal minimum is 15 (225 ms)
defaults write -g KeyRepeat -int 2 # normal minimum is 2 (30 ms)
# Aliases
alias l="ls -lah"
alias vim="nvim"
alias vimdiff="nvim -d"
alias gs="git status --short"
alias gll="git log --graph --oneline --all"
alias k="kubectl"
alias tf="terraform"
alias tfi="terraform init"
alias tfp="terraform plan"
alias tfa="terraform apply"
alias li="linode-cli"
# Environment variables
set -x PATH /Users/bogdan/development/tools/tools/bin $PATH
# Pyenv
status is-login; and pyenv init --path | source
status is-interactive; and pyenv init - | source
# DigitalOcean
source (doctl completion fish|psub)
# Access Keys
set -x KUBE_CONFIG_PATH ~/.kube/config
# The next line updates PATH for the Google Cloud SDK.
if [ -f '/Users/bogdanbuduroiu/google-cloud-sdk/path.fish.inc' ]; . '/Users/bogdanbuduroiu/google-cloud-sdk/path.fish.inc'; end

5
fish/fish_plugins Normal file
View file

@ -0,0 +1,5 @@
jorgebucaran/fisher
PatrickF1/fzf.fish
evanlucas/fish-kubectl-completions
edc/bass
jhillyerd/plugin-git

180
fish/fish_variables Normal file
View file

@ -0,0 +1,180 @@
# This file contains fish universal variable definitions.
# VERSION: 3.0
SETUVAR --export SSH_AGENT_PID:8572
SETUVAR --export SSH_AUTH_SOCK:/var/folders/nx/133kj5n14j1gj1r_t4753b440000gn/T//ssh\x2dv4cYb5FZ1xyo/agent\x2e8571
SETUVAR __fish_initialized:3100
SETUVAR __git_plugin_abbreviations:g\x1ega\x1egaa\x1egapa\x1egap\x1egb\x1egba\x1egban\x1egbd\x1egbD\x1egbl\x1egbs\x1egbsb\x1egbsg\x1egbsr\x1egbss\x1egc\x1egc\x21\x1egcn\x21\x1egca\x1egca\x21\x1egcan\x21\x1egcv\x1egcav\x1egcav\x21\x1egcm\x1egcam\x1egscam\x1egcfx\x1egcf\x1egcl\x1egclean\x1egclean\x21\x1egclean\x21\x21\x1egcount\x1egcp\x1egcpa\x1egcpc\x1egd\x1egdca\x1egds\x1egdsc\x1egdw\x1egdwc\x1egdto\x1egignore\x1egf\x1egfa\x1egfm\x1egfo\x1egl\x1egll\x1eglr\x1eglg\x1eglgg\x1eglgga\x1eglo\x1eglog\x1eglom\x1eglod\x1egloo\x1egm\x1egmt\x1egp\x1egp\x21\x1egpo\x1egpo\x21\x1egpv\x1egpv\x21\x1eggp\x21\x1egpu\x1egr\x1egra\x1egrb\x1egrba\x1egrbc\x1egrbi\x1egrbm\x1egrbmi\x1egrbmia\x1egrbd\x1egrbdi\x1egrbdia\x1egrbs\x1egrev\x1egrh\x1egrhh\x1egrhpa\x1egrm\x1egrmc\x1egrmv\x1egrrm\x1egrs\x1egrset\x1egrss\x1egrup\x1egrv\x1egsh\x1egsd\x1egsr\x1egss\x1egst\x1egsta\x1egstd\x1egstp\x1egsts\x1egsu\x1egsur\x1egsuri\x1egts\x1egtv\x1egsw\x1egswc\x1egunignore\x1egup\x1egupv\x1egupa\x1egupav\x1egwch\x1egco\x1egcb\x1egcod\x1egcom\x1egfb\x1egff\x1egfr\x1egfh\x1egfs\x1egfbs\x1egffs\x1egfrs\x1egfhs\x1egfss\x1egfbt\x1egfft\x1egfrt\x1egfht\x1egfst\x1egfp
SETUVAR __git_plugin_initialized:Wed\x20Oct\x2013\x2011\x3a41\x3a47\x20\x2b08\x202021
SETUVAR _fish_abbr_g:git
SETUVAR _fish_abbr_ga:git\x20add
SETUVAR _fish_abbr_gaa:git\x20add\x20\x2d\x2dall
SETUVAR _fish_abbr_gap:git\x20apply
SETUVAR _fish_abbr_gapa:git\x20add\x20\x2d\x2dpatch
SETUVAR _fish_abbr_gb:git\x20branch\x20\x2dvv
SETUVAR _fish_abbr_gbD:git\x20branch\x20\x2dD
SETUVAR _fish_abbr_gba:git\x20branch\x20\x2da\x20\x2dv
SETUVAR _fish_abbr_gban:git\x20branch\x20\x2da\x20\x2dv\x20\x2d\x2dno\x2dmerged
SETUVAR _fish_abbr_gbd:git\x20branch\x20\x2dd
SETUVAR _fish_abbr_gbl:git\x20blame\x20\x2db\x20\x2dw
SETUVAR _fish_abbr_gbs:git\x20bisect
SETUVAR _fish_abbr_gbsb:git\x20bisect\x20bad
SETUVAR _fish_abbr_gbsg:git\x20bisect\x20good
SETUVAR _fish_abbr_gbsr:git\x20bisect\x20reset
SETUVAR _fish_abbr_gbss:git\x20bisect\x20start
SETUVAR _fish_abbr_gc:git\x20commit\x20\x2dv
SETUVAR _fish_abbr_gc_21_:git\x20commit\x20\x2dv\x20\x2d\x2damend
SETUVAR _fish_abbr_gca:git\x20commit\x20\x2dv\x20\x2da
SETUVAR _fish_abbr_gca_21_:git\x20commit\x20\x2dv\x20\x2da\x20\x2d\x2damend
SETUVAR _fish_abbr_gcam:git\x20commit\x20\x2da\x20\x2dm
SETUVAR _fish_abbr_gcan_21_:git\x20commit\x20\x2dv\x20\x2da\x20\x2d\x2dno\x2dedit\x20\x2d\x2damend
SETUVAR _fish_abbr_gcav:git\x20commit\x20\x2da\x20\x2dv\x20\x2d\x2dno\x2dverify
SETUVAR _fish_abbr_gcav_21_:git\x20commit\x20\x2da\x20\x2dv\x20\x2d\x2dno\x2dverify\x20\x2d\x2damend
SETUVAR _fish_abbr_gcb:git\x20checkout\x20\x2db
SETUVAR _fish_abbr_gcf:git\x20config\x20\x2d\x2dlist
SETUVAR _fish_abbr_gcfx:git\x20commit\x20\x2d\x2dfixup
SETUVAR _fish_abbr_gcl:git\x20clone
SETUVAR _fish_abbr_gclean:git\x20clean\x20\x2ddi
SETUVAR _fish_abbr_gclean_21_:git\x20clean\x20\x2ddfx
SETUVAR _fish_abbr_gclean_21_21_:git\x20reset\x20\x2d\x2dhard\x3b\x20and\x20git\x20clean\x20\x2ddfx
SETUVAR _fish_abbr_gcm:git\x20commit\x20\x2dm
SETUVAR _fish_abbr_gcn_21_:git\x20commit\x20\x2dv\x20\x2d\x2dno\x2dedit\x20\x2d\x2damend
SETUVAR _fish_abbr_gco:git\x20checkout
SETUVAR _fish_abbr_gcod:git\x20checkout\x20develop
SETUVAR _fish_abbr_gcom:git\x20checkout\x20\x28__git\x2edefault_branch\x29
SETUVAR _fish_abbr_gcount:git\x20shortlog\x20\x2dsn
SETUVAR _fish_abbr_gcp:git\x20cherry\x2dpick
SETUVAR _fish_abbr_gcpa:git\x20cherry\x2dpick\x20\x2d\x2dabort
SETUVAR _fish_abbr_gcpc:git\x20cherry\x2dpick\x20\x2d\x2dcontinue
SETUVAR _fish_abbr_gcv:git\x20commit\x20\x2dv\x20\x2d\x2dno\x2dverify
SETUVAR _fish_abbr_gd:git\x20diff
SETUVAR _fish_abbr_gdca:git\x20diff\x20\x2d\x2dcached
SETUVAR _fish_abbr_gds:git\x20diff\x20\x2d\x2dstat
SETUVAR _fish_abbr_gdsc:git\x20diff\x20\x2d\x2dstat\x20\x2d\x2dcached
SETUVAR _fish_abbr_gdto:git\x20difftool
SETUVAR _fish_abbr_gdw:git\x20diff\x20\x2d\x2dword\x2ddiff
SETUVAR _fish_abbr_gdwc:git\x20diff\x20\x2d\x2dword\x2ddiff\x20\x2d\x2dcached
SETUVAR _fish_abbr_gf:git\x20fetch
SETUVAR _fish_abbr_gfa:git\x20fetch\x20\x2d\x2dall\x20\x2d\x2dprune
SETUVAR _fish_abbr_gfb:git\x20flow\x20bugfix
SETUVAR _fish_abbr_gfbs:git\x20flow\x20bugfix\x20start
SETUVAR _fish_abbr_gfbt:git\x20flow\x20bugfix\x20track
SETUVAR _fish_abbr_gff:git\x20flow\x20feature
SETUVAR _fish_abbr_gffs:git\x20flow\x20feature\x20start
SETUVAR _fish_abbr_gfft:git\x20flow\x20feature\x20track
SETUVAR _fish_abbr_gfh:git\x20flow\x20hotfix
SETUVAR _fish_abbr_gfhs:git\x20flow\x20hotfix\x20start
SETUVAR _fish_abbr_gfht:git\x20flow\x20hotfix\x20track
SETUVAR _fish_abbr_gfm:git\x20fetch\x20origin\x20\x28__git\x2edefault_branch\x29\x20\x2d\x2dprune\x3b\x20and\x20git\x20merge\x20FETCH_HEAD
SETUVAR _fish_abbr_gfo:git\x20fetch\x20origin
SETUVAR _fish_abbr_gfp:git\x20flow\x20publish
SETUVAR _fish_abbr_gfr:git\x20flow\x20release
SETUVAR _fish_abbr_gfrs:git\x20flow\x20release\x20start
SETUVAR _fish_abbr_gfrt:git\x20flow\x20release\x20track
SETUVAR _fish_abbr_gfs:git\x20flow\x20support
SETUVAR _fish_abbr_gfss:git\x20flow\x20support\x20start
SETUVAR _fish_abbr_gfst:git\x20flow\x20support\x20track
SETUVAR _fish_abbr_ggp_21_:ggp\x20\x2d\x2dforce\x2dwith\x2dlease
SETUVAR _fish_abbr_gignore:git\x20update\x2dindex\x20\x2d\x2dassume\x2dunchanged
SETUVAR _fish_abbr_gl:git\x20pull
SETUVAR _fish_abbr_glg:git\x20log\x20\x2d\x2dstat\x20\x2d\x2dmax\x2dcount\x3d10
SETUVAR _fish_abbr_glgg:git\x20log\x20\x2d\x2dgraph\x20\x2d\x2dmax\x2dcount\x3d10
SETUVAR _fish_abbr_glgga:git\x20log\x20\x2d\x2dgraph\x20\x2d\x2ddecorate\x20\x2d\x2dall
SETUVAR _fish_abbr_gll:git\x20pull\x20origin
SETUVAR _fish_abbr_glo:git\x20log\x20\x2d\x2doneline\x20\x2d\x2ddecorate\x20\x2d\x2dcolor
SETUVAR _fish_abbr_glod:git\x20log\x20\x2d\x2doneline\x20\x2d\x2ddecorate\x20\x2d\x2dcolor\x20develop\x2e\x2e
SETUVAR _fish_abbr_glog:git\x20log\x20\x2d\x2doneline\x20\x2d\x2ddecorate\x20\x2d\x2dcolor\x20\x2d\x2dgraph
SETUVAR _fish_abbr_glom:git\x20log\x20\x2d\x2doneline\x20\x2d\x2ddecorate\x20\x2d\x2dcolor\x20\x28__git\x2edefault_branch\x29\x2e\x2e
SETUVAR _fish_abbr_gloo:git\x20log\x20\x2d\x2dpretty\x3dformat\x3a\x27\x25C\x28yellow\x29\x25h\x20\x25Cred\x25ad\x20\x25Cblue\x25an\x25Cgreen\x25d\x20\x25Creset\x25s\x27\x20\x2d\x2ddate\x3dshort
SETUVAR _fish_abbr_glr:git\x20pull\x20\x2d\x2drebase
SETUVAR _fish_abbr_gm:git\x20merge
SETUVAR _fish_abbr_gmt:git\x20mergetool\x20\x2d\x2dno\x2dprompt
SETUVAR _fish_abbr_gp:git\x20push
SETUVAR _fish_abbr_gp_21_:git\x20push\x20\x2d\x2dforce\x2dwith\x2dlease
SETUVAR _fish_abbr_gpo:git\x20push\x20origin
SETUVAR _fish_abbr_gpo_21_:git\x20push\x20\x2d\x2dforce\x2dwith\x2dlease\x20origin
SETUVAR _fish_abbr_gpu:ggp\x20\x2d\x2dset\x2dupstream
SETUVAR _fish_abbr_gpv:git\x20push\x20\x2d\x2dno\x2dverify
SETUVAR _fish_abbr_gpv_21_:git\x20push\x20\x2d\x2dno\x2dverify\x20\x2d\x2dforce\x2dwith\x2dlease
SETUVAR _fish_abbr_gr:git\x20remote\x20\x2dvv
SETUVAR _fish_abbr_gra:git\x20remote\x20add
SETUVAR _fish_abbr_grb:git\x20rebase
SETUVAR _fish_abbr_grba:git\x20rebase\x20\x2d\x2dabort
SETUVAR _fish_abbr_grbc:git\x20rebase\x20\x2d\x2dcontinue
SETUVAR _fish_abbr_grbd:git\x20rebase\x20develop
SETUVAR _fish_abbr_grbdi:git\x20rebase\x20develop\x20\x2d\x2dinteractive
SETUVAR _fish_abbr_grbdia:git\x20rebase\x20develop\x20\x2d\x2dinteractive\x20\x2d\x2dautosquash
SETUVAR _fish_abbr_grbi:git\x20rebase\x20\x2d\x2dinteractive
SETUVAR _fish_abbr_grbm:git\x20rebase\x20\x28__git\x2edefault_branch\x29
SETUVAR _fish_abbr_grbmi:git\x20rebase\x20\x28__git\x2edefault_branch\x29\x20\x2d\x2dinteractive
SETUVAR _fish_abbr_grbmia:git\x20rebase\x20\x28__git\x2edefault_branch\x29\x20\x2d\x2dinteractive\x20\x2d\x2dautosquash
SETUVAR _fish_abbr_grbs:git\x20rebase\x20\x2d\x2dskip
SETUVAR _fish_abbr_grev:git\x20revert
SETUVAR _fish_abbr_grh:git\x20reset
SETUVAR _fish_abbr_grhh:git\x20reset\x20\x2d\x2dhard
SETUVAR _fish_abbr_grhpa:git\x20reset\x20\x2d\x2dpatch
SETUVAR _fish_abbr_grm:git\x20rm
SETUVAR _fish_abbr_grmc:git\x20rm\x20\x2d\x2dcached
SETUVAR _fish_abbr_grmv:git\x20remote\x20rename
SETUVAR _fish_abbr_grrm:git\x20remote\x20remove
SETUVAR _fish_abbr_grs:git\x20restore
SETUVAR _fish_abbr_grset:git\x20remote\x20set\x2durl
SETUVAR _fish_abbr_grss:git\x20restore\x20\x2d\x2dsource
SETUVAR _fish_abbr_grup:git\x20remote\x20update
SETUVAR _fish_abbr_grv:git\x20remote\x20\x2dv
SETUVAR _fish_abbr_gscam:git\x20commit\x20\x2dS\x20\x2da\x20\x2dm
SETUVAR _fish_abbr_gsd:git\x20svn\x20dcommit
SETUVAR _fish_abbr_gsh:git\x20show
SETUVAR _fish_abbr_gsr:git\x20svn\x20rebase
SETUVAR _fish_abbr_gss:git\x20status\x20\x2ds
SETUVAR _fish_abbr_gst:git\x20status
SETUVAR _fish_abbr_gsta:git\x20stash
SETUVAR _fish_abbr_gstd:git\x20stash\x20drop
SETUVAR _fish_abbr_gstp:git\x20stash\x20pop
SETUVAR _fish_abbr_gsts:git\x20stash\x20show\x20\x2d\x2dtext
SETUVAR _fish_abbr_gsu:git\x20submodule\x20update
SETUVAR _fish_abbr_gsur:git\x20submodule\x20update\x20\x2d\x2drecursive
SETUVAR _fish_abbr_gsuri:git\x20submodule\x20update\x20\x2d\x2drecursive\x20\x2d\x2dinit
SETUVAR _fish_abbr_gsw:git\x20switch
SETUVAR _fish_abbr_gswc:git\x20switch\x20\x2d\x2dcreate
SETUVAR _fish_abbr_gts:git\x20tag\x20\x2ds
SETUVAR _fish_abbr_gtv:git\x20tag
SETUVAR _fish_abbr_gunignore:git\x20update\x2dindex\x20\x2d\x2dno\x2dassume\x2dunchanged
SETUVAR _fish_abbr_gup:git\x20pull\x20\x2d\x2drebase
SETUVAR _fish_abbr_gupa:git\x20pull\x20\x2d\x2drebase\x20\x2d\x2dautostash
SETUVAR _fish_abbr_gupav:git\x20pull\x20\x2d\x2drebase\x20\x2d\x2dautostash\x20\x2dv
SETUVAR _fish_abbr_gupv:git\x20pull\x20\x2d\x2drebase\x20\x2dv
SETUVAR _fish_abbr_gwch:git\x20whatchanged\x20\x2dp\x20\x2d\x2dabbrev\x2dcommit\x20\x2d\x2dpretty\x3dmedium
SETUVAR _fisher_PatrickF1_2F_fzf_2E_fish_files:/Users/bogdan/\x2econfig/fish/functions/_fzf_configure_bindings_help\x2efish\x1e/Users/bogdan/\x2econfig/fish/functions/_fzf_extract_var_info\x2efish\x1e/Users/bogdan/\x2econfig/fish/functions/_fzf_preview_file\x2efish\x1e/Users/bogdan/\x2econfig/fish/functions/_fzf_report_file_type\x2efish\x1e/Users/bogdan/\x2econfig/fish/functions/_fzf_search_directory\x2efish\x1e/Users/bogdan/\x2econfig/fish/functions/_fzf_search_git_log\x2efish\x1e/Users/bogdan/\x2econfig/fish/functions/_fzf_search_git_status\x2efish\x1e/Users/bogdan/\x2econfig/fish/functions/_fzf_search_history\x2efish\x1e/Users/bogdan/\x2econfig/fish/functions/_fzf_search_variables\x2efish\x1e/Users/bogdan/\x2econfig/fish/functions/_fzf_wrapper\x2efish\x1e/Users/bogdan/\x2econfig/fish/functions/fzf_configure_bindings\x2efish\x1e/Users/bogdan/\x2econfig/fish/conf\x2ed/fzf\x2efish\x1e/Users/bogdan/\x2econfig/fish/completions/fzf_configure_bindings\x2efish
SETUVAR _fisher_edc_2F_bass_files:/Users/bogdan/\x2econfig/fish/functions/__bass\x2epy\x1e/Users/bogdan/\x2econfig/fish/functions/bass\x2efish
SETUVAR _fisher_evanlucas_2F_fish_2D_kubectl_2D_completions_files:/Users/bogdan/\x2econfig/fish/completions/kubectl\x2efish
SETUVAR _fisher_jhillyerd_2F_plugin_2D_git_files:/Users/bogdan/\x2econfig/fish/functions/__git\x2ebranch_has_wip\x2efish\x1e/Users/bogdan/\x2econfig/fish/functions/__git\x2ecurrent_branch\x2efish\x1e/Users/bogdan/\x2econfig/fish/functions/__git\x2edefault_branch\x2efish\x1e/Users/bogdan/\x2econfig/fish/functions/__git\x2edestroy\x2efish\x1e/Users/bogdan/\x2econfig/fish/functions/__git\x2einit\x2efish\x1e/Users/bogdan/\x2econfig/fish/functions/__git\x2ereset\x2efish\x1e/Users/bogdan/\x2econfig/fish/functions/gbage\x2efish\x1e/Users/bogdan/\x2econfig/fish/functions/gbda\x2efish\x1e/Users/bogdan/\x2econfig/fish/functions/gdt\x2efish\x1e/Users/bogdan/\x2econfig/fish/functions/gdv\x2efish\x1e/Users/bogdan/\x2econfig/fish/functions/ggl\x2efish\x1e/Users/bogdan/\x2econfig/fish/functions/ggp\x2efish\x1e/Users/bogdan/\x2econfig/fish/functions/ggpnp\x2efish\x1e/Users/bogdan/\x2econfig/fish/functions/ggsup\x2efish\x1e/Users/bogdan/\x2econfig/fish/functions/ggu\x2efish\x1e/Users/bogdan/\x2econfig/fish/functions/gignored\x2efish\x1e/Users/bogdan/\x2econfig/fish/functions/glp\x2efish\x1e/Users/bogdan/\x2econfig/fish/functions/gpoat\x2efish\x1e/Users/bogdan/\x2econfig/fish/functions/grename\x2efish\x1e/Users/bogdan/\x2econfig/fish/functions/grt\x2efish\x1e/Users/bogdan/\x2econfig/fish/functions/gtl\x2efish\x1e/Users/bogdan/\x2econfig/fish/functions/gunwip\x2efish\x1e/Users/bogdan/\x2econfig/fish/functions/gwip\x2efish\x1e/Users/bogdan/\x2econfig/fish/conf\x2ed/git\x2efish
SETUVAR _fisher_jorgebucaran_2F_fisher_files:/Users/bogdan/\x2econfig/fish/functions/fisher\x2efish\x1e/Users/bogdan/\x2econfig/fish/completions/fisher\x2efish
SETUVAR _fisher_plugins:jorgebucaran/fisher\x1ePatrickF1/fzf\x2efish\x1eevanlucas/fish\x2dkubectl\x2dcompletions\x1eedc/bass\x1ejhillyerd/plugin\x2dgit
SETUVAR fish_color_autosuggestion:555\x1ebrblack
SETUVAR fish_color_cancel:\x2dr
SETUVAR fish_color_command:005fd7
SETUVAR fish_color_comment:990000
SETUVAR fish_color_cwd:green
SETUVAR fish_color_cwd_root:red
SETUVAR fish_color_end:009900
SETUVAR fish_color_error:ff0000
SETUVAR fish_color_escape:00a6b2
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:00a6b2
SETUVAR fish_color_param:00afff
SETUVAR fish_color_quote:999900
SETUVAR fish_color_redirection:00afff
SETUVAR fish_color_search_match:bryellow\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:\x1d
SETUVAR fish_pager_color_description:B3A06D\x1eyellow
SETUVAR fish_pager_color_prefix:normal\x1e\x2d\x2dbold\x1e\x2d\x2dunderline
SETUVAR fish_pager_color_progress:brwhite\x1e\x2d\x2dbackground\x3dcyan
SETUVAR fish_user_paths:/Users/bogdan/\x2epoetry/bin

138
fish/functions/__bass.py Normal file
View file

@ -0,0 +1,138 @@
"""
To be used with a companion fish function like this:
function refish
set -l _x (python /tmp/bass.py source ~/.nvm/nvim.sh ';' nvm use iojs); source $_x; and rm -f $_x
end
"""
from __future__ import print_function
import json
import os
import signal
import subprocess
import sys
import traceback
BASH = 'bash'
FISH_READONLY = [
'PWD', 'SHLVL', 'history', 'pipestatus', 'status', 'version',
'FISH_VERSION', 'fish_pid', 'hostname', '_', 'fish_private_mode'
]
IGNORED = [
'PS1', 'XPC_SERVICE_NAME'
]
def ignored(name):
if name == 'PWD': # this is read only, but has special handling
return False
# ignore other read only variables
if name in FISH_READONLY:
return True
if name in IGNORED or name.startswith("BASH_FUNC"):
return True
return False
def escape(string):
# use json.dumps to reliably escape quotes and backslashes
return json.dumps(string).replace(r'$', r'\$')
def escape_identifier(word):
return escape(word.replace('?', '\\?'))
def comment(string):
return '\n'.join(['# ' + line for line in string.split('\n')])
def gen_script():
# Use the following instead of /usr/bin/env to read environment so we can
# deal with multi-line environment variables (and other odd cases).
env_reader = "%s -c 'import os,json; print(json.dumps({k:v for k,v in os.environ.items()}))'" % (sys.executable)
args = [BASH, '-c', env_reader]
output = subprocess.check_output(args, universal_newlines=True)
old_env = output.strip()
pipe_r, pipe_w = os.pipe()
if sys.version_info >= (3, 4):
os.set_inheritable(pipe_w, True)
command = 'eval $1 && ({}; alias) >&{}'.format(
env_reader,
pipe_w
)
args = [BASH, '-c', command, 'bass', ' '.join(sys.argv[1:])]
p = subprocess.Popen(args, universal_newlines=True, close_fds=False)
os.close(pipe_w)
with os.fdopen(pipe_r) as f:
new_env = f.readline()
alias_str = f.read()
if p.wait() != 0:
raise subprocess.CalledProcessError(
returncode=p.returncode,
cmd=' '.join(sys.argv[1:]),
output=new_env + alias_str
)
new_env = new_env.strip()
old_env = json.loads(old_env)
new_env = json.loads(new_env)
script_lines = []
for k, v in new_env.items():
if ignored(k):
continue
v1 = old_env.get(k)
if not v1:
script_lines.append(comment('adding %s=%s' % (k, v)))
elif v1 != v:
script_lines.append(comment('updating %s=%s -> %s' % (k, v1, v)))
# process special variables
if k == 'PWD':
script_lines.append('cd %s' % escape(v))
continue
else:
continue
if k == 'PATH':
value = ' '.join([escape(directory)
for directory in v.split(':')])
else:
value = escape(v)
script_lines.append('set -g -x %s %s' % (k, value))
for var in set(old_env.keys()) - set(new_env.keys()):
script_lines.append(comment('removing %s' % var))
script_lines.append('set -e %s' % var)
script = '\n'.join(script_lines)
alias_lines = []
for line in alias_str.splitlines():
_, rest = line.split(None, 1)
k, v = rest.split("=", 1)
alias_lines.append("alias " + escape_identifier(k) + "=" + v)
alias = '\n'.join(alias_lines)
return script + '\n' + alias
script_file = os.fdopen(3, 'w')
if not sys.argv[1:]:
print('__bass_usage', file=script_file, end='')
sys.exit(0)
try:
script = gen_script()
except subprocess.CalledProcessError as e:
sys.exit(e.returncode)
except Exception:
print('Bass internal error!', file=sys.stderr)
raise # traceback will output to stderr
except KeyboardInterrupt:
signal.signal(signal.SIGINT, signal.SIG_DFL)
os.kill(os.getpid(), signal.SIGINT)
else:
script_file.write(script)

View file

@ -0,0 +1,3 @@
function __git.branch_has_wip -d "Returns 0 if branch has --wip--, otherwise 1"
git log -n 1 2>/dev/null | grep -qc "\-\-wip\-\-"
end

View file

@ -0,0 +1,6 @@
function __git.current_branch -d "Output git's current branch name"
begin
git symbolic-ref HEAD; or \
git rev-parse --short HEAD; or return
end 2>/dev/null | sed -e 's|^refs/heads/||'
end

View file

@ -0,0 +1,11 @@
function __git.default_branch -d "Fallback to main when master branch is not found"
command git rev-parse --git-dir &>/dev/null; or return
if set -l default_branch (command git config --get init.defaultBranch)
and command git show-ref -q --verify refs/heads/{$default_branch}
echo $default_branch
else if command git show-ref -q --verify refs/heads/master
echo master
else
echo main
end
end

View file

@ -0,0 +1,7 @@
function __git.destroy
for ab in $__git_plugin_abbreviations
abbr -e $ab
end
set -Ue __git_plugin_abbreviations
set -Ue __git_plugin_initialized
end

View file

@ -0,0 +1,166 @@
function __git.init
function __git.create_abbr -d "Create Git plugin abbreviation"
set -l name $argv[1]
set -l body $argv[2..-1]
abbr -a $name $body
set -a __git_plugin_abbreviations $name
end
set -q __git_plugin_initialized; and return 0
set -U __git_plugin_abbreviations
# git abbreviations
__git.create_abbr g git
__git.create_abbr ga git add
__git.create_abbr gaa git add --all
__git.create_abbr gapa git add --patch
__git.create_abbr gap git apply
__git.create_abbr gb git branch -vv
__git.create_abbr gba git branch -a -v
__git.create_abbr gban git branch -a -v --no-merged
__git.create_abbr gbd git branch -d
__git.create_abbr gbD git branch -D
__git.create_abbr gbl git blame -b -w
__git.create_abbr gbs git bisect
__git.create_abbr gbsb git bisect bad
__git.create_abbr gbsg git bisect good
__git.create_abbr gbsr git bisect reset
__git.create_abbr gbss git bisect start
__git.create_abbr gc git commit -v
__git.create_abbr gc! git commit -v --amend
__git.create_abbr gcn! git commit -v --no-edit --amend
__git.create_abbr gca git commit -v -a
__git.create_abbr gca! git commit -v -a --amend
__git.create_abbr gcan! git commit -v -a --no-edit --amend
__git.create_abbr gcv git commit -v --no-verify
__git.create_abbr gcav git commit -a -v --no-verify
__git.create_abbr gcav! git commit -a -v --no-verify --amend
__git.create_abbr gcm git commit -m
__git.create_abbr gcam git commit -a -m
__git.create_abbr gscam git commit -S -a -m
__git.create_abbr gcfx git commit --fixup
__git.create_abbr gcf git config --list
__git.create_abbr gcl git clone
__git.create_abbr gclean git clean -di
__git.create_abbr gclean! git clean -dfx
__git.create_abbr gclean!! "git reset --hard; and git clean -dfx"
__git.create_abbr gcount git shortlog -sn
__git.create_abbr gcp git cherry-pick
__git.create_abbr gcpa git cherry-pick --abort
__git.create_abbr gcpc git cherry-pick --continue
__git.create_abbr gd git diff
__git.create_abbr gdca git diff --cached
__git.create_abbr gds git diff --stat
__git.create_abbr gdsc git diff --stat --cached
__git.create_abbr gdw git diff --word-diff
__git.create_abbr gdwc git diff --word-diff --cached
__git.create_abbr gdto git difftool
__git.create_abbr gignore git update-index --assume-unchanged
__git.create_abbr gf git fetch
__git.create_abbr gfa git fetch --all --prune
__git.create_abbr gfm "git fetch origin (__git.default_branch) --prune; and git merge FETCH_HEAD"
__git.create_abbr gfo git fetch origin
__git.create_abbr gl git pull
__git.create_abbr gll git pull origin
__git.create_abbr glr git pull --rebase
__git.create_abbr glg git log --stat --max-count=10
__git.create_abbr glgg git log --graph --max-count=10
__git.create_abbr glgga git log --graph --decorate --all
__git.create_abbr glo git log --oneline --decorate --color
__git.create_abbr glog git log --oneline --decorate --color --graph
__git.create_abbr glom git log --oneline --decorate --color \(__git.default_branch\)..
__git.create_abbr glod git log --oneline --decorate --color develop..
__git.create_abbr gloo "git log --pretty=format:'%C(yellow)%h %Cred%ad %Cblue%an%Cgreen%d %Creset%s' --date=short"
__git.create_abbr gm git merge
__git.create_abbr gmt git mergetool --no-prompt
__git.create_abbr gp git push
__git.create_abbr gp! git push --force-with-lease
__git.create_abbr gpo git push origin
__git.create_abbr gpo! git push --force-with-lease origin
__git.create_abbr gpv git push --no-verify
__git.create_abbr gpv! git push --no-verify --force-with-lease
__git.create_abbr ggp! ggp --force-with-lease
__git.create_abbr gpu ggp --set-upstream
__git.create_abbr gr git remote -vv
__git.create_abbr gra git remote add
__git.create_abbr grb git rebase
__git.create_abbr grba git rebase --abort
__git.create_abbr grbc git rebase --continue
__git.create_abbr grbi git rebase --interactive
__git.create_abbr grbm git rebase \(__git.default_branch\)
__git.create_abbr grbmi git rebase \(__git.default_branch\) --interactive
__git.create_abbr grbmia git rebase \(__git.default_branch\) --interactive --autosquash
__git.create_abbr grbd git rebase develop
__git.create_abbr grbdi git rebase develop --interactive
__git.create_abbr grbdia git rebase develop --interactive --autosquash
__git.create_abbr grbs git rebase --skip
__git.create_abbr grev git revert
__git.create_abbr grh git reset
__git.create_abbr grhh git reset --hard
__git.create_abbr grhpa git reset --patch
__git.create_abbr grm git rm
__git.create_abbr grmc git rm --cached
__git.create_abbr grmv git remote rename
__git.create_abbr grrm git remote remove
__git.create_abbr grs git restore
__git.create_abbr grset git remote set-url
__git.create_abbr grss git restore --source
__git.create_abbr grup git remote update
__git.create_abbr grv git remote -v
__git.create_abbr gsh git show
__git.create_abbr gsd git svn dcommit
__git.create_abbr gsr git svn rebase
__git.create_abbr gss git status -s
__git.create_abbr gst git status
__git.create_abbr gsta git stash
__git.create_abbr gstd git stash drop
__git.create_abbr gstp git stash pop
__git.create_abbr gsts git stash show --text
__git.create_abbr gsu git submodule update
__git.create_abbr gsur git submodule update --recursive
__git.create_abbr gsuri git submodule update --recursive --init
__git.create_abbr gts git tag -s
__git.create_abbr gtv git tag | sort -V
__git.create_abbr gsw git switch
__git.create_abbr gswc git switch --create
__git.create_abbr gunignore git update-index --no-assume-unchanged
__git.create_abbr gup git pull --rebase
__git.create_abbr gupv git pull --rebase -v
__git.create_abbr gupa git pull --rebase --autostash
__git.create_abbr gupav git pull --rebase --autostash -v
__git.create_abbr gwch git whatchanged -p --abbrev-commit --pretty=medium
# git checkout abbreviations
__git.create_abbr gco git checkout
__git.create_abbr gcb git checkout -b
__git.create_abbr gcod git checkout develop
__git.create_abbr gcom git checkout \(__git.default_branch\)
# git flow abbreviations
__git.create_abbr gfb git flow bugfix
__git.create_abbr gff git flow feature
__git.create_abbr gfr git flow release
__git.create_abbr gfh git flow hotfix
__git.create_abbr gfs git flow support
__git.create_abbr gfbs git flow bugfix start
__git.create_abbr gffs git flow feature start
__git.create_abbr gfrs git flow release start
__git.create_abbr gfhs git flow hotfix start
__git.create_abbr gfss git flow support start
__git.create_abbr gfbt git flow bugfix track
__git.create_abbr gfft git flow feature track
__git.create_abbr gfrt git flow release track
__git.create_abbr gfht git flow hotfix track
__git.create_abbr gfst git flow support track
__git.create_abbr gfp git flow publish
# Cleanup declared functions
functions -e __git.create_abbr
# Mark git plugin as initialized
set -U __git_plugin_initialized (date)
end

View file

@ -0,0 +1,3 @@
function __git.reset
__git.destroy; and __git.init
end

View file

@ -0,0 +1,42 @@
function _fzf_configure_bindings_help --description "Prints the help message for fzf_configure_bindings."
echo "\
USAGE:
fzf_configure_bindings [--FEATURE[=KEY_SEQUENCE]...]
DESCRIPTION
By default, fzf_configure_bindings installs mnemonic key bindings for fzf.fish's features. Each
feature's binding can be customized through a corresponding namesake option:
FEATURE | MNEMONIC KEY SEQUENCE | CORRESPONDING OPTION
Search directory | Ctrl+Alt+F (F for file) | --directory
Search git log | Ctrl+Alt+L (L for log) | --git_log
Search git status | Ctrl+Alt+S (S for status) | --git_status
Search history | Ctrl+R (R for reverse) | --history
Search variables | Ctrl+V (V for variable) | --variables
An option with a key sequence value overrides the binding for its feature, while an option
without a value disables the binding. A feature that is not customized retains its default
menomonic binding specified above. Key bindings are installed for default and insert modes.
In terms of validation, fzf_configure_bindings fails if passed unknown options. Furthermore, it
expects an equals sign between an option's name and value. However, it does not validate key
sequences. Rather, consider using fish_key_reader to manually validate them.
In terms of experimentation, fzf_configure_bindings erases any bindings it previously installed
before installing new ones so it can be repeatedly executed in the same fish session without
problem. Once the desired fzf_configure_bindings command has been found, add it to config.fish
in order to persist the bindings.
The -h and --help options print this help message.
EXAMPLES
Install the default mnemonic bindings
\$ fzf_configure_bindings
Install the default bindings but override git log's binding to Ctrl+G
\$ fzf_configure_bindings --git_log=\cg
Install the default bindings but leave search history unbound
\$ fzf_configure_bindings --history
Alternative style of disabling search history
\$ fzf_configure_bindings --history=
An agglomeration of all the options
\$ fzf_configure_bindings --git_status=\cg --history=\ch --variables --directory --git_log
"
end

View file

@ -0,0 +1,15 @@
# helper function for _fzf_search_variables
function _fzf_extract_var_info --argument-names variable_name set_show_output --description "Extract and reformat lines pertaining to \$variable_name from \$set_show_output."
# Extract only the lines about the variable, all of which begin with either
# $variable_name: ...or... $variable_name[
string match --regex "^\\\$$variable_name(?::|\[).*" <$set_show_output |
# Strip the variable name prefix, including ": " for scope info lines
string replace --regex "^\\\$$variable_name(?:: )?" '' |
# Distill the lines of values, replacing...
# [1]: |value|
# ...with...
# [1] value
string replace --regex ": \|(.*)\|" ' \$1'
end

View file

@ -0,0 +1,43 @@
# helper function for _fzf_search_directory
function _fzf_preview_file --description "Print a preview for the given file based on its file type."
# because there's no way to guarantee that _fzf_search_directory passes the path to _fzf_preview_file
# as one argument, we collect all the arguments into one single variable and treat that as the path
set file_path $argv
if test -L "$file_path" # symlink
# notify user and recurse on the target of the symlink, which can be any of these file types
set -l target_path (realpath "$file_path")
set_color yellow
echo "'$file_path' is a symlink to '$target_path'."
set_color normal
_fzf_preview_file "$target_path"
else if test -f "$file_path" # regular file
if set --query fzf_preview_file_cmd
# need to escape quotes to make sure eval receives file_path as a single arg
eval "$fzf_preview_file_cmd '$file_path'"
else
bat --style=numbers --color=always "$file_path"
end
else if test -d "$file_path" # directory
if set --query fzf_preview_dir_cmd
# see above
eval "$fzf_preview_dir_cmd '$file_path'"
else
# -A list hidden files as well, except for . and ..
# -F helps classify files by appending symbols after the file name
command ls -A -F "$file_path"
end
else if test -c "$file_path"
_fzf_report_file_type "$file_path" "character device file"
else if test -b "$file_path"
_fzf_report_file_type "$file_path" "block device file"
else if test -S "$file_path"
_fzf_report_file_type "$file_path" socket
else if test -p "$file_path"
_fzf_report_file_type "$file_path" "named pipe"
else
echo "$file_path doesn't exist." >&2
end
end

View file

@ -0,0 +1,6 @@
# helper function for _fzf_preview_file
function _fzf_report_file_type --argument-names file_path file_type --description "Explain the file type for a file."
set_color red
echo "Cannot preview '$file_path': it is a $file_type."
set_color normal
end

View file

@ -0,0 +1,41 @@
function _fzf_search_directory --description "Search the current directory. Replace the current token with the selected file paths."
set fd_opts --color=always $fzf_fd_opts
set fzf_arguments --multi --ansi $fzf_dir_opts
set token (commandline --current-token)
# expand any variables or leading tilde (~) in the token
set expanded_token (eval echo -- $token)
# unescape token because it's already quoted so backslashes will mess up the path
set unescaped_exp_token (string unescape -- $expanded_token)
# If the current token is a directory and has a trailing slash,
# then use it as fd's base directory.
if string match --quiet -- "*/" $unescaped_exp_token && test -d "$unescaped_exp_token"
set --append fd_opts --base-directory=$unescaped_exp_token
# use the directory name as fzf's prompt to indicate the search is limited to that directory
set --prepend fzf_arguments --prompt="$unescaped_exp_token" --preview="_fzf_preview_file $expanded_token{}"
set file_paths_selected $unescaped_exp_token(fd $fd_opts 2>/dev/null | _fzf_wrapper $fzf_arguments)
else
set --prepend fzf_arguments --query="$unescaped_exp_token" --preview='_fzf_preview_file {}'
set file_paths_selected (fd $fd_opts 2>/dev/null | _fzf_wrapper $fzf_arguments)
end
if test $status -eq 0
# Fish will cd implicitly if a directory name ending in a slash is provided.
# To help the user leverage this feature, we automatically append / to the selected path if
# - only one path was selected,
# - the user was in the middle of inputting the first token,
# - the path is a directory
# Then, the user only needs to hit Enter once more to cd into that directory.
if test (count $file_paths_selected) = 1
set commandline_tokens (commandline --tokenize)
if test "$commandline_tokens" = "$token" -a -d "$file_paths_selected"
set file_paths_selected $file_paths_selected/
end
end
commandline --current-token --replace -- (string escape -- $file_paths_selected | string join ' ')
end
commandline --function repaint
end

View file

@ -0,0 +1,24 @@
function _fzf_search_git_log --description "Search the output of git log and preview commits. Replace the current token with the selected commit hash."
if not git rev-parse --git-dir >/dev/null 2>&1
echo '_fzf_search_git_log: Not in a git repository.' >&2
else
# see documentation for git format placeholders at https://git-scm.com/docs/git-log#Documentation/git-log.txt-emnem
# %h gives you the abbreviated commit hash, which is useful for saving screen space, but we will have to expand it later below
set log_fmt_str '%C(bold blue)%h%C(reset) - %C(cyan)%ad%C(reset) %C(yellow)%d%C(reset) %C(normal)%s%C(reset) %C(dim normal)[%an]%C(reset)'
set selected_log_line (
git log --color=always --format=format:$log_fmt_str --date=short | \
_fzf_wrapper --ansi \
--tiebreak=index \
--preview='git show --color=always {1}' \
--query=(commandline --current-token) \
$fzf_git_log_opts
)
if test $status -eq 0
set abbreviated_commit_hash (string split --max 1 " " $selected_log_line)[1]
set commit_hash (git rev-parse $abbreviated_commit_hash)
commandline --current-token --replace $commit_hash
end
end
commandline --function repaint
end

View file

@ -0,0 +1,33 @@
function _fzf_search_git_status --description "Search the output of git status. Replace the current token with the selected file paths."
if not git rev-parse --git-dir >/dev/null 2>&1
echo '_fzf_search_git_status: Not in a git repository.' >&2
else
set selected_paths (
# Pass configuration color.status=always to force status to use colors even though output is sent to a pipe
git -c color.status=always status --short |
_fzf_wrapper --ansi \
--multi \
--query=(commandline --current-token) \
$fzf_git_status_opts
)
if test $status -eq 0
# git status --short automatically escapes the paths of most files for us so not going to bother trying to handle
# the few edges cases of weird file names that should be extremely rare (e.g. "this;needs;escaping")
set cleaned_paths
for path in $selected_paths
if test (string sub --length 1 $path) = R
# path has been renamed and looks like "R LICENSE -> LICENSE.md"
# extract the path to use from after the arrow
set --append cleaned_paths (string split -- "-> " $path)[-1]
else
set --append cleaned_paths (string sub --start=4 $path)
end
end
commandline --current-token --replace -- (string escape -- $cleaned_paths | string join ' ')
end
end
commandline --function repaint
end

View file

@ -0,0 +1,24 @@
function _fzf_search_history --description "Search command history. Replace the command line with the selected command."
# history merge incorporates history changes from other fish sessions
builtin history merge
set command_with_ts (
# Reference https://devhints.io/strftime to understand strftime format symbols
builtin history --null --show-time="%m-%d %H:%M:%S │ " |
_fzf_wrapper --read0 \
--tiebreak=index \
--query=(commandline) \
# preview current command using fish_ident in a window at the bottom 3 lines tall
--preview="echo -- {4..} | fish_indent --ansi" \
--preview-window="bottom:3:wrap" \
$fzf_history_opts |
string collect
)
if test $status -eq 0
set command_selected (string split --max 1 " │ " $command_with_ts)[2]
commandline --replace -- $command_selected
end
commandline --function repaint
end

View file

@ -0,0 +1,45 @@
# This function expects the following two arguments:
# argument 1 = output of (set --show | psub), i.e. a file with the scope info and values of all variables
# argument 2 = output of (set --names | psub), i.e. a file with all variable names
function _fzf_search_variables --argument-names set_show_output set_names_output --description "Search and preview shell variables. Replace the current token with the selected variable."
if test -z "$set_names_output"
printf '%s\n' '_fzf_search_variables requires 2 arguments.' >&2
commandline --function repaint
return 22 # 22 means invalid argument in POSIX
end
# Exclude the history variable from being piped into fzf because
# 1. it's not included in $set_names_output
# 2. it tends to be a very large value => increases computation time
# 3._fzf_search_history is a much better way to examine history anyway
set all_variable_names (string match --invert history <$set_names_output)
set current_token (commandline --current-token)
# Use the current token to pre-populate fzf's query. If the current token begins
# with a $, remove it from the query so that it will better match the variable names
set cleaned_curr_token (string replace -- '$' '' $current_token)
set variable_names_selected (
printf '%s\n' $all_variable_names |
_fzf_wrapper --preview "_fzf_extract_var_info {} $set_show_output" \
--multi \
--query=$cleaned_curr_token \
$fzf_shell_vars_opts
)
if test $status -eq 0
# If the current token begins with a $, do not overwrite the $ when
# replacing the current token with the selected variable.
# Uses brace expansion to prepend $ to each variable name.
commandline --current-token --replace (
if string match --quiet -- '$*' $current_token
string join " " \${$variable_names_selected}
else
string join " " $variable_names_selected
end
)
end
commandline --function repaint
end

View file

@ -0,0 +1,20 @@
function _fzf_wrapper --description "Prepares some environment variables before executing fzf."
# Make sure fzf uses fish to execute preview commands, some of which
# are autoloaded fish functions so don't exist in other shells.
# Use --local so that it doesn't clobber SHELL outside of this function.
set --local --export SHELL (command --search fish)
# If FZF_DEFAULT_OPTS is not set, then set some sane defaults.
# See https://github.com/junegunn/fzf#environment-variables
if not set --query FZF_DEFAULT_OPTS
# cycle allows jumping between the first and last results, making scrolling faster
# layout=reverse lists results top to bottom, mimicking the familiar layouts of git log, history, and env
# border shows where the fzf window begins and ends
# height=90% leaves space to see the current command and some scrollback, maintaining context of work
# preview-window=wrap wraps long lines in the preview window, making reading easier
# marker=* makes the multi-select marker more distinguishable from the pointer (since both default to >)
set --export FZF_DEFAULT_OPTS '--cycle --layout=reverse --border --height=90% --preview-window=wrap --marker="*"'
end
fzf $argv
end

29
fish/functions/bass.fish Normal file
View file

@ -0,0 +1,29 @@
function bass
set -l bash_args $argv
set -l bass_debug
if test "$bash_args[1]_" = '-d_'
set bass_debug true
set -e bash_args[1]
end
set -l script_file (mktemp)
if command -v python3 >/dev/null 2>&1
command python3 -sS (dirname (status -f))/__bass.py $bash_args 3>$script_file
else
command python -sS (dirname (status -f))/__bass.py $bash_args 3>$script_file
end
set -l bass_status $status
if test $bass_status -ne 0
return $bass_status
end
if test -n "$bass_debug"
cat $script_file
end
source $script_file
command rm $script_file
end
function __bass_usage
echo "Usage: bass [-d] <bash-command>"
end

View file

@ -0,0 +1,14 @@
# Green and red depending on exit status.
function fish_prompt
if [ $status = 0 ]
set_color green
else
set_color red
end
echo -n '≫'
set_color normal
echo -n ' '
end

209
fish/functions/fisher.fish Normal file
View file

@ -0,0 +1,209 @@
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.3.0
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 or --version Print version"
echo " -h or --help Print this help message"
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
if ! set --query argv[2]
if test "$cmd" != update
echo "fisher: Not enough arguments for command: \"$cmd\"" >&2 && return 1
else if test ! -e $fish_plugins
echo "fisher: \"$fish_plugins\" file not found: \"$cmd\"" >&2 && return 1
end
set arg_plugins (string match --regex -- '^[^\s]+$' <$fish_plugins)
end
for plugin in $arg_plugins
test -e "$plugin" && set plugin (realpath $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
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,functions}
fish --command "
if test -e $plugin
command cp -Rf $plugin/* $source
else
set temp (command mktemp -d)
set name (string split \@ $plugin) || set name[2] HEAD
set url https://codeload.github.com/\$name[1]/tar.gz/\$name[2]
echo Fetching (set_color --underline)\$url(set_color normal)
if curl --silent \$url | 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
end
command rm -rf $$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 _fisher_plugins[$index]
set --erase $plugin_files_var
end
end
if set --query update_plugins[1] || set --query install_plugins[1]
command mkdir -p $fisher_path/{functions,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,conf.d,completions}/*
if set --local index (contains --index -- $plugin $install_plugins)
set --local user_files $fisher_path/{functions,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 -Rf $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)
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
for file in (string match --regex -- '.+/[^/]+\.fish$' $$plugin_files_var)
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
set --query _fisher_plugins[1] || set --erase _fisher_plugins
set --query _fisher_plugins &&
printf "%s\n" $_fisher_plugins >$fish_plugins ||
command rm -f $fish_plugins
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
## Migrations ##
function _fisher_fish_postexec --on-event fish_postexec
if functions --query _fisher_list
fisher update >/dev/null 2>/dev/null
set --query XDG_DATA_HOME || set --local XDG_DATA_HOME ~/.local/share
test -e $XDG_DATA_HOME/fisher && command rm -rf $XDG_DATA_HOME/fisher
functions --erase _fisher_list _fisher_plugin_parse
set --erase fisher_data
end
functions --erase _fisher_fish_postexec
end

View file

@ -0,0 +1,44 @@
# Always installs bindings for insert and default mode for simplicity and b/c it has almost no side-effect
# https://gitter.im/fish-shell/fish-shell?at=60a55915ee77a74d685fa6b1
function fzf_configure_bindings --description "Installs the default key bindings for fzf.fish with user overrides passed as options."
# no need to install bindings if not in interactive mode or running tests
status is-interactive || test "$CI" = true; or return
set options_spec h/help 'directory=?' 'git_log=?' 'git_status=?' 'history=?' 'variables=?'
argparse --max-args=0 --ignore-unknown $options_spec -- $argv 2>/dev/null
if test $status -ne 0
echo "Invalid option or a positional argument was provided." 1>&2
_fzf_configure_bindings_help
return 22
else if set --query _flag_help
_fzf_configure_bindings_help
return
else
# Initialize with default key sequences and then override or disable them based on flags
# index 1 = directory, 2 = git_log, 3 = git_status, 4 = history, 5 = variables
set key_sequences \cp \cg \cs \cr \cv # \c = control, \e = escape
set --query _flag_directory && set key_sequences[1] "$_flag_directory"
set --query _flag_git_log && set key_sequences[2] "$_flag_git_log"
set --query _flag_git_status && set key_sequences[3] "$_flag_git_status"
set --query _flag_history && set key_sequences[4] "$_flag_history"
set --query _flag_variables && set key_sequences[5] "$_flag_variables"
# If fzf bindings already exists, uninstall it first for a clean slate
if functions --query _fzf_uninstall_bindings
_fzf_uninstall_bindings
end
for mode in default insert
test -n $key_sequences[1] && bind --mode $mode $key_sequences[1] _fzf_search_directory
test -n $key_sequences[2] && bind --mode $mode $key_sequences[2] _fzf_search_git_log
test -n $key_sequences[3] && bind --mode $mode $key_sequences[3] _fzf_search_git_status
test -n $key_sequences[4] && bind --mode $mode $key_sequences[4] _fzf_search_history
test -n $key_sequences[5] && bind --mode $mode $key_sequences[5] "$_fzf_search_vars_command"
end
function _fzf_uninstall_bindings --inherit-variable key_sequences
bind --erase -- $key_sequences
bind --erase --mode insert -- $key_sequences
end
end
end

View file

@ -0,0 +1,5 @@
function gbage -d "List local branches and display their age"
git for-each-ref --sort=committerdate refs/heads/ \
--format="%(HEAD) %(color:yellow)%(refname:short)%(color:reset) - %(color:red)%(objectname:short)%(color:reset) - %(contents:subject) - %(authorname) (%(color:green)%(committerdate:relative)%(color:reset))"
end

5
fish/functions/gbda.fish Normal file
View file

@ -0,0 +1,5 @@
function gbda -d "Delete all branches merged in current HEAD"
git branch --merged | \
command grep -vE '^\*|^\s*(master|main|develop)\s*$' | \
command xargs -n 1 git branch -d
end

View file

@ -0,0 +1,155 @@
function __log --description 'Logs to a file for debugging'
# Uncomment this line to enable debug logging:
# echo -e $argv >> ~/.fspy
end
function __cut
set -l str $argv[1]
set -l pos $argv[2]
echo (string sub -l $pos -- $str)
echo (string sub -s (math 1+$pos) -- $str)
end
function __right
set -l str $argv[1]
set -l pos $argv[2]
string sub -s (math 1+$pos) -- $str
end
function __substr --description 'Classic substr(str, start, end) with 0-based indexing, start inclusive, end exclusive'
set -l str $argv[1]
set -l start (math $argv[2] + 1)
set -l len (math $argv[3] - $argv[2])
string sub -s $start -l $len -- $str
end
function __ltrim_ifmatch --description 'Trims arg2 from the left of arg1, if they match, returns 1 otherwise'
set -l ln (string length -- $argv[2])
set -l left (string sub -l $ln -- $argv[1])
if test $left = $argv[2]
string sub -s (math $ln + 1) -- $argv[1]
else
return 1
end
end
function __ltrim_unsafe --description 'Trims arg2 from the left of arg1, even if they not match'
set -l ln (string length -- $argv[2])
string sub -s (math $ln + 1) -- $argv[1]
end
function __rtrim_unsafe --description 'Trims arg2 from the right of arg1, even if they not match'
set -l ln (string length -- $argv[1])
set -l ln (math $ln - (string length -- $argv[2]))
string sub -l $ln -- $argv[1]
end
function __rtrim_ifmatch --description 'Trims arg2 from the right of arg1, if they match, returns 1 otherwise'
set -l ln (string length -- $argv[2])
set -l start (math (string length -- $argv[1]) - $ln + 1)
set -l right (string sub -s $start -- $argv[1])
if test $right = $argv[2]
string sub -s (math $start - 1) -- $argv[1]
else
return 1
end
end
function __call_argcomplete
__log "Call argcomplete:" $argv
set -lx input $argv[1]
set -lx COMP_POINT $argv[2]
set -lx tokenStart $argv[3]
set -lx prefix $argv[4]
set -lx COMP_LINE (string sub -l $tokenStart -- $input)
set -lx words (string split ' ' -- (string sub -l $COMP_POINT -- $input))
set -lx lastWord $words[-1]
set -lx _ARGCOMPLETE_COMP_WORDBREAKS \n'"\'@><=;|&(:'
set -lx _ARGCOMPLETE 1
set -lx CMD $words[1]
set -l rval (eval $CMD 8>&1 9>&2 1>/dev/null 2>/dev/null)
__log "CloudSDK returned: '$rval'"
if test $status -ne 0
return
end
if test ! $rval
if test (count $words) -gt 2 -a -n $lastWord
# Fallback scenario 1: try to ignore the last word if it's not complete:
# Note: this can only happen in the first call on the stack, since we then fallback by words
set -l trimmed (__rtrim_unsafe $input $lastWord)
set -l fallbackPos (string length -- $trimmed)
__call_argcomplete $input $fallbackPos $fallbackPos ''
end
if test (count $words) -gt 3 -a -z $lastWord
# Fallback scenario 2: if last word is blank try fallback to the previous word
set -l prevWordLen (string length -- $words[-2])
set -l fallbackPos (math $COMP_POINT - $prevWordLen - 1)
__call_argcomplete $input $fallbackPos $tokenStart ''
return
end
end
set -l options (string split \v -- $rval)
set -l pattern (__substr $input $COMP_POINT $tokenStart)
for opt in $options
set opt (string replace -r '^(\w+)\\\\://' '$1://' -- $opt)
set -l match (__ltrim_ifmatch $opt $pattern)
if test $status -eq 0
set -l args (string split -m 1 ' ' -- $match)
if test (count $args) -gt 1
echo -n "$prefix$args[1]"
echo -n -e "\t"
echo "$args[2]"
else
echo "$prefix$args[1]"
end
end
end
end
function gcloud_sdk_argcomplete
__log '$>' (date)
set -l token (commandline -t)
set -l input (commandline -cp)
set -l fullLine (commandline -p)
set -l cursorAt (string length -- $input)
set -lx words (string split ' ' -- $input)
set -lx prefix ''
if string match -q -- '*@*' $words[-1]
if string match -q -- '* ssh *' $input
set -l parts (string split '@' $words[-1])
set prefix "$parts[1]@"
set words[-1] (string replace -- $prefix '' $words[-1])
set cursorAt (math $cursorAt - (string length -- $prefix))
end
end
if string match -q -- '--*=*' $words[-1]
set -l parts (string split '=' -- $words[-1])
set words[-1] (string join ' ' -- $parts)
set prefix "$parts[1]="
end
set input (string join ' ' -- $words)
# well, this is a bit strage, but seemingly 8 \-s will actually print 1 \, a bit of escaping hell
set -l escaped (string replace -a -r '(\s\w+)://' '${1}\\\\\\\\://' -- $input)
set -l ilen (string length -- $input)
set -l elen (string length -- $escaped)
if test $elen -gt $ilen
set input $escaped
set cursorAt (math $cursorAt - $ilen + $elen)
end
__call_argcomplete $input $cursorAt $cursorAt $prefix
end

3
fish/functions/gdt.fish Normal file
View file

@ -0,0 +1,3 @@
function gdt -w "git diff" -d "List changed files"
git diff-tree --no-commit-id --name-only -r $argv
end

3
fish/functions/gdv.fish Normal file
View file

@ -0,0 +1,3 @@
function gdv -w "git diff -w" -d "Pipe `git diff` to `view` command"
git diff -w $argv | view -
end

3
fish/functions/ggl.fish Normal file
View file

@ -0,0 +1,3 @@
function ggl -w "git pull origin master" -d "git pull origin <current branch>"
git pull origin (__git.current_branch) $argv
end

3
fish/functions/ggp.fish Normal file
View file

@ -0,0 +1,3 @@
function ggp -w "git push origin master" -d "git push origin <current branch>"
git push origin (__git.current_branch) $argv
end

View file

@ -0,0 +1,5 @@
function ggpnp -d "git pull & push origin <current branch>"
set -l current_branch (__git.current_branch)
and git pull origin $current_branch
and git push origin $current_branch
end

View file

@ -0,0 +1,3 @@
function ggsup -d "git set upstream to origin/<current branch>"
git branch --set-upstream-to=origin/(__git.current_branch)
end

3
fish/functions/ggu.fish Normal file
View file

@ -0,0 +1,3 @@
function ggu -d "Rebase the current branch on top of the upstream branch after fetching"
git pull --rebase origin (__git.current_branch)
end

View file

@ -0,0 +1,3 @@
function gignored -w 'grep "^[[:lower:]]"' -d "list temporarily ignored files"
git ls-files -v | grep "^[[:lower:]]" $argv
end

5
fish/functions/glp.fish Normal file
View file

@ -0,0 +1,5 @@
function glp -d "git log at requested pretty level" -a format
set -q format[1]; and git log --pretty=$format
end
complete -c glp -x -a "(complete -C 'git log --pretty=' | sed 's/^--pretty=//')"

View file

@ -0,0 +1,3 @@
function gpoat -d "git push all + tags to origin"
git push origin --all; and git push origin --tags
end

View file

@ -0,0 +1,11 @@
function grename -d "Rename 'old' branch to 'new', including in origin remote" -a old new
if test (count $argv) -ne 2
echo "Usage: "(status -u)" old_branch new_branch"
return 1
end
git branch -m $old $new
git push origin :$old
and git push --set-upstream origin $new
end
complete -c grename -x -a "(complete -C 'git branch ')"

3
fish/functions/grt.fish Normal file
View file

@ -0,0 +1,3 @@
function grt -d "cd into the top of the current repository or submodule"
cd (git rev-parse --show-toplevel; or echo ".")
end

3
fish/functions/gtl.fish Normal file
View file

@ -0,0 +1,3 @@
function gtl -d "List tags matching prefix" -a prefix
git tag --sort=-v:refname -n -l $prefix\*
end

View file

@ -0,0 +1,7 @@
# Work In Progress (wip)
# These features allow to pause a branch development and switch to another one
# When you want to go back to work, just unwip it
#
function gunwip -d "git uncommit the work-in-progress branch"
git log -n 1 | grep -q -c "\-\-wip\-\-"; and git reset HEAD~1
end

7
fish/functions/gwip.fish Normal file
View file

@ -0,0 +1,7 @@
# Work In Progress (wip)
# These features allow to pause a branch development and switch to another one
# When you want to go back to work, just unwip it
#
function gwip -d "git commit a work-in-progress branch"
git add -A; git rm (git ls-files --deleted) 2> /dev/null; git commit -m "--wip--"
end

View file

@ -0,0 +1,3 @@
function is_status_okay
[ $status = 0 ]
end

View file

@ -0,0 +1,3 @@
function iterm2_print_user_vars
iterm2_set_user_var kubecontext "☸️"(kubectl config current-context)
end

3
fish/functions/rmrf.fish Normal file
View file

@ -0,0 +1,3 @@
function rmrf --wraps='rm -rfi' --description 'alias rmrf=rm -rfi'
rm -rfi $argv;
end

View file

@ -0,0 +1,7 @@
function ssh_agent
if test -z (pgrep ssh-agent | string collect)
eval (ssh-agent -c)
set -Ux SSH_AUTH_SOCK $SSH_AUTH_SOCK
set -Ux SSH_AGENT_PID $SSH_AGENT_PID
end
end

218
init.vim Normal file
View file

@ -0,0 +1,218 @@
set number
set relativenumber
set autoindent
" coc.nvim Setup
set cmdheight=2
set updatetime=1000
" don't use arrowkeys
noremap <Up> <NOP>
noremap <Down> <NOP>
noremap <Left> <NOP>
noremap <Right> <NOP>
" really, just don't
inoremap <Up> <NOP>
inoremap <Down> <NOP>
inoremap <Left> <NOP>
inoremap <Right> <NOP>
call plug#begin("~/.vim/plugged")
Plug 'scrooloose/nerdtree'
Plug 'Xuyuanp/nerdtree-git-plugin'
Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'airblade/vim-gitgutter' " Show git diff of lines edited
Plug 'tpope/vim-fugitive' " :Gblame
Plug 'tpope/vim-rhubarb' " :GBrowse
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
Plug 'edkolev/tmuxline.vim' " vim-airline compatible tmux bar
Plug 'tpope/vim-endwise' " Autocomplete end after a do
Plug 'mileszs/ack.vim' " Use ack in Vim
Plug 'pangloss/vim-javascript' " JavaScript support
Plug 'leafgarland/typescript-vim' " TypeScript syntax
Plug 'peitalin/vim-jsx-typescript'
Plug 'maxmellon/vim-jsx-pretty' " JS and JSX syntax
Plug 'jparise/vim-graphql' " GraphQL syntax
Plug 'styled-components/vim-styled-components'
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --bin' }
Plug 'junegunn/fzf.vim'
Plug 'Yggdroot/indentLine' " Indentation Lines
Plug 'APZelos/blamer.nvim' " Git Blame
Plug 'dracula/vim'
Plug 'voldikss/vim-floaterm' " Floaterm
Plug 'ryanoasis/vim-devicons' " Keep this last always
call plug#end()
autocmd BufEnter *.{js,jsx,ts,tsx,py} :syntax sync fromstart
autocmd BufLeave *.{js,jsx,ts,tsx,py} :syntax sync clear
if (has("termguicolors"))
set termguicolors
endif
syntax enable
colorscheme dracula
" NERDTree on ctrl+n
let NERDTreeShowHidden=1
nnoremap <leader>n :NERDTreeFocus<CR>
nnoremap <C-n> :NERDTree<CR>
nnoremap <C-t> :NERDTreeToggle<CR>
nnoremap <C-f> :NERDTreeFind<CR>
map <C-j> <C-W>j
map <C-k> <C-W>k
map <C-h> <C-W>h
map <C-l> <C-W>l
" NERDTree config
let g:NERDTreeWinPos = 1 " open on right
let g:NERDTreeWinSize = 45
let g:NERDTreeShowHidden = 1
let g:NERDTreeMinimalUI = 1
let g:NERDTreeDirArrows = 1
let g:NERDTreeIgnore = []
let g:NERDTreeStatusline = ''
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif
" Integrated Terminal
" open new split panes to right and below
set splitright
set splitbelow
" turn terminal to normal mode with escape
" tnoremap <Esc> <C-\><C-n>
" start terminal in insert mode
au BufEnter * if &buftype == 'terminal' | :startinsert | endif
" open terminal on ctrl+n
"function! OpenTerminal()
" split term://fish
" resize 10
"endfunction
"nnoremap <c-b> :call OpenTerminal()<CR>
nnoremap <c-b> :FloatermToggle<CR>
let g:floaterm_wintype = 'split'
" FZF Mapping
let g:fzf_action = {
\ 'ctrl-t': 'tab split',
\ 'ctrl-s': 'split',
\ 'ctrl-v': 'vsplit'
\}
let $FZF_DEFAULT_COMMAND = 'ag -g ""'
" COC namp
"" Remap keys for applying codeAction to the current line.
nmap <leader>ac <Plug>(coc-codeaction)
"" Apply AutoFix to problem on the current line.
nmap <leader>qf <Plug>(coc-fix-current)
"" Rename
nmap <leader>rn <Plug>(coc-rename)
"" GoTo code navigation.
nmap <silent> gd <Plug>(coc-definition)
nmap <silent> gD :vsplit<CR><Plug>(coc-definition)
nmap <silent> gy <Plug>(coc-type-definition)
nmap <silent> gY :vsplit<CR><Plug>(coc-type-definition)
nmap <silent> gi <Plug>(coc-implementation)
nmap <silent> gI :vsplit<CR><Plug>(coc-implementation)
nmap <silent> gr <Plug>(coc-references)
nmap <silent> [g <Plug>(coc-diagnostic-prev)
nmap <silent> ]g <Plug>(coc-diagnostic-next)
nnoremap <silent> <space>d :<C-u>CocList diagnostics<cr>
nnoremap <silent> <space>s :<C-u>CocList -I symbols<cr>
inoremap <silent><expr> <TAB>
\ pumvisible() ? "\<C-n>" :
\ <SID>check_back_space() ? "\<TAB>" :
\ coc#refresh()
inoremap <silent><expr> <CR> coc#pum#visible() ? coc#pum#confirm()
inoremap <expr><S-TAB> pumvisible() ? "\<C-p>" : "\<C-h>"
function! s:check_back_space() abort
let col = col('.') - 1
return !col || getline('.')[col - 1] =~# '\s'
endfunction
inoremap <silent><expr> <c-space> coc#refresh()
nnoremap <silent> K :call <SID>show_documentation()<CR>
function! s:show_documentation()
if (index(['vim','help'], &filetype) >= 0)
execute 'h '.expand('<cword>')
elseif (coc#rpc#ready())
call CocActionAsync('doHover')
else
execute '!' . &keywordprg . " " . expand('<cword>')
endif
endfunction
function! ShowDocIfNoDiagnostic(timer_id)
if (coc#float#has_float() == 0 && CocHasProvider('hover') == 1)
silent call CocActionAsync('doHover')
endif
endfunction
function! s:show_hover_doc()
call timer_start(200, 'ShowDocIfNoDiagnostic')
endfunction
autocmd CursorHoldI * :call <SID>show_hover_doc()
autocmd CursorHold * :call <SID>show_hover_doc()
" Diagnostics color
hi! CocErrorSign guifg=#d1666a
hi! CocInfoSign guibg=#353b45
hi! CocWarningSign guifg=#d1cd66
" make FZF respect gitignore if `ag` is installed
" you will obviously need to install `ag` for this to work
if (executable('ag'))
let $FZF_DEFAULT_COMMAND = 'ag --hidden --ignore .git -g ""'
endif
nnoremap <C-P> :Files<CR>
" VimWiki settings
set nocompatible
filetype plugin on
syntax on
" VimWiki let
let g:vimwiki_list = [{'path': '~/Nextcloud/vimwiki/', 'ext': '.md'}]
" COC let
let g:coc_global_extensions = [ 'coc-tsserver' ]
" ESLint & Prettier
if isdirectory('./node_modules') && isdirectory('./node_modules/prettier')
let g:coc_global_extensions += ['coc-prettier']
endif
if isdirectory('./node_modules') && isdirectory('./node_modules/eslint')
let g:coc_global_extensions += ['coc-eslint']
endif
let g:typescript_indent_disable = 1
" YAML config
autocmd FileType yaml setlocal ts=2 sts=2 sw=2 expandtab
autocmd FileType ts setlocal ts=2 sts=2 sw=2 expandtab
autocmd FileType js setlocal ts=2 sts=2 sw=2 expandtab
autocmd FileType tf setlocal ts=2 sts=2 sw=2 expandtab
let g:indentLine_char = '⦙'
" Increase win size
nnoremap <silent> <Leader>= :exe "resize " . (winheight(0) * 3/2)<CR>
nnoremap <silent> <Leader>- :exe "resize " . (winheight(0) * 2/3)<CR>