Changed . token to _dot

This change allows the dotfiles to work with chezmoi (e.g: on windows)
and improves grepability with neovim/telescope
This commit is contained in:
2024-11-07 13:52:17 +00:00
parent 83b02bd753
commit 896af887ca
2351 changed files with 0 additions and 0 deletions

View File

@@ -0,0 +1,44 @@
# aliases for modern unix rebindings
export alias cat = bat
# export alias ls = lsd
export alias du = dust
export alias df = duf
export alias grep = rg
export alias cp = xcp
export alias find = fd
export alias top = btm
export alias htop = btm
export alias burn = rm # sometimes, you ACTUALLY need rm
export alias rm = rip
# Personal convenience aliases
export alias free = free -m
export alias npkg = nano -w PKGBUILD
export alias q = exit
export alias ':q' = exit
export alias c = clear
export alias h = history
export alias lsa = ls -a
export alias lsl = ls -l
export alias lsla = ls -la
export alias .. = cd ..
export alias ... = cd ../..
export alias .... = cd ../../..
export alias ..... = cd ../../../..
# export alias pip = python -m pip
export alias pip-upgrade = python -m pip install --upgrade pip
export alias pypy = pypy3
export alias poem = poetry run python
export alias bashpoem = poetry run bash
export alias nupoem = poetry run nu
export alias jupyterpoem = poetry run jupyter
# Aliases for custom git commands
export alias git-ammend = git commit -a --amend -C HEAD
# Who even uses vim or *especially* vi in this day and age?
export alias vim = nvim
export alias vi = nvim
# NixOS specific aliases
export alias nix-nu = nix-shell --command nu

View File

@@ -0,0 +1,73 @@
# Source this in your ~/.config/nushell/config.nu
$env.ATUIN_SESSION = (atuin uuid)
hide-env -i ATUIN_HISTORY_ID
# Magic token to make sure we don't record commands run by keybindings
let ATUIN_KEYBINDING_TOKEN = $"# (random uuid)"
let _atuin_pre_execution = {||
if ($nu | get -i history-enabled) == false {
return
}
let cmd = (commandline)
if ($cmd | is-empty) {
return
}
if not ($cmd | str starts-with $ATUIN_KEYBINDING_TOKEN) {
$env.ATUIN_HISTORY_ID = (atuin history start -- $cmd)
}
}
let _atuin_pre_prompt = {||
let last_exit = $env.LAST_EXIT_CODE
if 'ATUIN_HISTORY_ID' not-in $env {
return
}
with-env { ATUIN_LOG: error } {
do { atuin history end $'--exit=($last_exit)' -- $env.ATUIN_HISTORY_ID } | complete
}
hide-env ATUIN_HISTORY_ID
}
def _atuin_search_cmd [...flags: string] {
let nu_version = ($env.NU_VERSION | split row '.' | each { || into int })
[
$ATUIN_KEYBINDING_TOKEN,
([
`with-env { ATUIN_LOG: error, ATUIN_QUERY: (commandline) } {`,
(if $nu_version.0 <= 0 and $nu_version.1 <= 90 { 'commandline' } else { 'commandline edit' }),
(if $nu_version.1 >= 92 { '(run-external atuin search' } else { '(run-external --redirect-stderr atuin search' }),
($flags | append [--interactive] | each {|e| $'"($e)"'}),
(if $nu_version.1 >= 92 { ' e>| str trim)' } else {' | complete | $in.stderr | str substring ..-1)'}),
`}`,
] | flatten | str join ' '),
] | str join "\n"
}
$env.config = ($env | default {} config).config
$env.config = ($env.config | default {} hooks)
$env.config = (
$env.config | upsert hooks (
$env.config.hooks
| upsert pre_execution (
$env.config.hooks | get -i pre_execution | default [] | append $_atuin_pre_execution)
| upsert pre_prompt (
$env.config.hooks | get -i pre_prompt | default [] | append $_atuin_pre_prompt)
)
)
$env.config = ($env.config | default [] keybindings)
$env.config = (
$env.config | upsert keybindings (
$env.config.keybindings
| append {
name: atuin
modifier: control
keycode: char_r
mode: [vi_insert, vi_normal, emacs]
event: { send: executehostcommand cmd: (_atuin_search_cmd) }
}
)
)

View File

@@ -0,0 +1,22 @@
source ~/.config/nushell/nu_scripts/custom-completions/bitwarden-cli/bitwarden-cli-completions.nu
source ~/.config/nushell/nu_scripts/custom-completions/btm/btm-completions.nu
source ~/.config/nushell/nu_scripts/custom-completions/cargo/cargo-completions.nu
source ~/.config/nushell/nu_scripts/custom-completions/curl/curl-completions.nu
source ~/.config/nushell/nu_scripts/custom-completions/docker/docker-completions.nu
source ~/.config/nushell/nu_scripts/custom-completions/flutter/flutter-completions.nu
source ~/.config/nushell/nu_scripts/custom-completions/gh/gh-completions.nu
source ~/.config/nushell/nu_scripts/custom-completions/git/git-completions.nu
source ~/.config/nushell/nu_scripts/custom-completions/glow/glow-completions.nu
source ~/.config/nushell/nu_scripts/custom-completions/man/man-completions.nu
source ~/.config/nushell/nu_scripts/custom-completions/mix/mix-completions.nu
source ~/.config/nushell/nu_scripts/custom-completions/nano/nano-completions.nu
source ~/.config/nushell/nu_scripts/custom-completions/nix/nix-completions.nu
source ~/.config/nushell/nu_scripts/custom-completions/poetry/poetry-completions.nu
source ~/.config/nushell/nu_scripts/custom-completions/pre-commit/pre-commit-completions.nu
source ~/.config/nushell/nu_scripts/custom-completions/pytest/pytest-completions.nu
source ~/.config/nushell/nu_scripts/custom-completions/rg/rg-completions.nu
source ~/.config/nushell/nu_scripts/custom-completions/rustup/rustup-completions.nu
source ~/.config/nushell/nu_scripts/custom-completions/rye/rye-completions.nu
source ~/.config/nushell/nu_scripts/custom-completions/tealdeer/tldr-completions.nu
source ~/.config/nushell/nu_scripts/custom-completions/vscode/vscode-completions.nu
source ~/.config/nushell/nu_scripts/custom-completions/zellij/zellij-completions.nu

View File

@@ -0,0 +1,60 @@
# Code generated by zoxide. DO NOT EDIT.
# =============================================================================
#
# Hook configuration for zoxide.
#
# Initialize hook to add new entries to the database.
if (not ($env | default false __zoxide_hooked | get __zoxide_hooked)) {
$env.__zoxide_hooked = true
$env.config = ($env | default {} config).config
$env.config = ($env.config | default {} hooks)
$env.config = ($env.config | update hooks ($env.config.hooks | default {} env_change))
$env.config = ($env.config | update hooks.env_change ($env.config.hooks.env_change | default [] PWD))
$env.config = ($env.config | update hooks.env_change.PWD ($env.config.hooks.env_change.PWD | append {|_, dir|
zoxide add -- $dir
}))
}
# =============================================================================
#
# When using zoxide with --no-cmd, alias these internal functions as desired.
#
# Jump to a directory using only keywords.
def --env __zoxide_z [...rest:string] {
let arg0 = ($rest | append '~').0
let path = if (($rest | length) <= 1) and ($arg0 == '-' or ($arg0 | path expand | path type) == dir) {
$arg0
} else {
(zoxide query --exclude $env.PWD -- ...$rest | str trim -r -c "\n")
}
cd $path
}
# Jump to a directory using interactive search.
def --env __zoxide_zi [...rest:string] {
cd $'(zoxide query --interactive -- ...$rest | str trim -r -c "\n")'
}
# =============================================================================
#
# Commands for zoxide. Disable these using --no-cmd.
#
alias cd = __zoxide_z
alias cdi = __zoxide_zi
# =============================================================================
#
# Add this to your env file (find it by running `$nu.env-path` in Nushell):
#
# zoxide init nushell | save -f ~/.zoxide.nu
#
# Now, add this to the end of your config file (find it by running
# `$nu.config-path` in Nushell):
#
# source ~/.zoxide.nu
#
# Note: zoxide only supports Nushell v0.89.0+.

View File

@@ -0,0 +1,17 @@
# Imports of custom modules from init to help keep my config file clean
use ~/.config/nushell/default_config.nu
use ~/.config/nushell/init.nu *
# Combine config records to create the final config
$env.config = (
(default_config) | merge (theme) | merge (my_config)
)
# Initialise the plugins
source ~/.config/nushell/nu_scripts.nu
# initialise the completion plugins
source ~/.config/nushell/completions/atuin.nu
source ~/.config/nushell/completions/zoxide.nu
source ~/.config/nushell/completions/nu_scripts.nu
# import nushell libs
use task.nu
# Finally, we run a system info fetch
sysfetch

View File

@@ -0,0 +1,13 @@
# Imports of custom modules from init to help keep my config file clean
use ~/.config/nushell/default_config.nu
use ~/.config/nushell/init.nu *
# Combine config records to create the final config
$env.config = (
(default_config) | merge (theme) | merge (my_config)
)
# Initialise the plugins
source ~/.config/nushell/nu_scripts.nu
# Finally, initialise the completion plugins
source ~/.config/nushell/completions/atuin.nu
source ~/.config/nushell/completions/zoxide.nu
source ~/.config/nushell/completions/nu_scripts.nu

View File

@@ -0,0 +1,620 @@
# The default config record. This is where much of your global configuration is setup.
export def main [] {
{
show_banner: true # true or false to enable or disable the welcome banner at startup
ls: {
use_ls_colors: true # use the LS_COLORS environment variable to colorize output
clickable_links: true # enable or disable clickable links. Your terminal has to support links.
}
rm: {
always_trash: false # always act as if -t was given. Can be overridden with -p
}
table: {
mode: rounded # basic, compact, compact_double, light, thin, with_love, rounded, reinforced, heavy, none, other
index_mode: always # "always" show indexes, "never" show indexes, "auto" = show indexes when a table has "index" column
show_empty: true # show 'empty list' and 'empty record' placeholders for command output
padding: { left: 1, right: 1 } # a left right padding of each column in a table
trim: {
methodology: wrapping # wrapping or truncating
wrapping_try_keep_words: true # A strategy used by the 'wrapping' methodology
truncating_suffix: "..." # A suffix used by the 'truncating' methodology
}
header_on_separator: false # show header text on separator/border line
# abbreviated_row_count: 10 # limit data rows from top and bottom after reaching a set point
}
error_style: "fancy" # "fancy" or "plain" for screen reader-friendly error messages
# datetime_format determines what a datetime rendered in the shell would look like.
# Behavior without this configuration point will be to "humanize" the datetime display,
# showing something like "a day ago."
datetime_format: {
# normal: '%a, %d %b %Y %H:%M:%S %z' # shows up in displays of variables or other datetime's outside of tables
# table: '%m/%d/%y %I:%M:%S%p' # generally shows up in tabular outputs such as ls. commenting this out will change it to the default human readable datetime format
}
explore: {
status_bar_background: {fg: "#1D1F21", bg: "#C4C9C6"},
command_bar_text: {fg: "#C4C9C6"},
highlight: {fg: "black", bg: "yellow"},
status: {
error: {fg: "white", bg: "red"},
warn: {}
info: {}
},
table: {
split_line: {fg: "#404040"},
selected_cell: {bg: light_blue},
selected_row: {},
selected_column: {},
},
}
history: {
max_size: 100_000 # Session has to be reloaded for this to take effect
sync_on_enter: true # Enable to share history between multiple sessions, else you have to close the session to write history to file
file_format: "plaintext" # "sqlite" or "plaintext"
isolation: false # only available with sqlite file_format. true enables history isolation, false disables it. true will allow the history to be isolated to the current session using up/down arrows. false will allow the history to be shared across all sessions.
}
completions: {
case_sensitive: false # set to true to enable case-sensitive completions
quick: true # set this to false to prevent auto-selecting completions when only one remains
partial: true # set this to false to prevent partial filling of the prompt
algorithm: "prefix" # prefix or fuzzy
external: {
enable: true # set to false to prevent nushell looking into $env.PATH to find more suggestions, `false` recommended for WSL users as this look up may be very slow
max_results: 100 # setting it lower can improve completion performance at the cost of omitting some options
completer: null # check 'carapace_completer' above as an example
}
}
filesize: {
metric: false # true => KB, MB, GB (ISO standard), false => KiB, MiB, GiB (Windows standard)
format: "auto" # b, kb, kib, mb, mib, gb, gib, tb, tib, pb, pib, eb, eib, auto
}
cursor_shape: {
emacs: line # block, underscore, line, blink_block, blink_underscore, blink_line, inherit to skip setting cursor shape (line is the default)
vi_insert: block # block, underscore, line, blink_block, blink_underscore, blink_line, inherit to skip setting cursor shape (block is the default)
vi_normal: underscore # block, underscore, line, blink_block, blink_underscore, blink_line, inherit to skip setting cursor shape (underscore is the default)
}
# color_config: dark_theme # if you want a more interesting theme, you can replace the empty record with `$dark_theme`, `$light_theme` or another custom record
footer_mode: "auto" # always, never, auto
float_precision: 2 # the precision for displaying floats in tables
buffer_editor: "" # command that will be used to edit the current line buffer with ctrl+o, if unset fallback to $env.EDITOR and $env.VISUAL
use_ansi_coloring: true
bracketed_paste: true # enable bracketed paste, currently useless on windows
edit_mode: emacs # emacs, vi
shell_integration: false # enables terminal shell integration. Off by default, as some terminals have issues with this.
render_right_prompt_on_last_line: false # true or false to enable or disable right prompt to be rendered on last line of the prompt.
use_kitty_protocol: false # enables keyboard enhancement protocol implemented by kitty console, only if your terminal support this.
# highlight_resolved_externals: false # true enables highlighting of external commands in the repl resolved by which.
hooks: {
pre_prompt: [{ null }] # run before the prompt is shown
pre_execution: [{ null }] # run before the repl input is run
env_change: {
PWD: [{|before, after| null }] # run if the PWD environment is different since the last repl input
}
display_output: "if (term size).columns >= 100 { table -e } else { table }" # run to display the output of a pipeline
command_not_found: { null } # return an error message when a command is not found
}
menus: [
# Configuration for default nushell menus
# Note the lack of source parameter
{
name: completion_menu
only_buffer_difference: false
marker: "| "
type: {
layout: columnar
columns: 4
col_width: 20 # Optional value. If missing all the screen width is used to calculate column width
col_padding: 2
}
style: {
text: green
selected_text: green_reverse
description_text: yellow
}
}
{
name: history_menu
only_buffer_difference: true
marker: "? "
type: {
layout: list
page_size: 10
}
style: {
text: green
selected_text: green_reverse
description_text: yellow
}
}
{
name: help_menu
only_buffer_difference: true
marker: "? "
type: {
layout: description
columns: 4
col_width: 20 # Optional value. If missing all the screen width is used to calculate column width
col_padding: 2
selection_rows: 4
description_rows: 10
}
style: {
text: green
selected_text: green_reverse
description_text: yellow
}
}
]
keybindings: [
{
name: completion_menu
modifier: none
keycode: tab
mode: [emacs vi_normal vi_insert]
event: {
until: [
{ send: menu name: completion_menu }
{ send: menunext }
{ edit: complete }
]
}
}
{
name: history_menu
modifier: control
keycode: char_r
mode: [emacs, vi_insert, vi_normal]
event: { send: menu name: history_menu }
}
{
name: help_menu
modifier: none
keycode: f1
mode: [emacs, vi_insert, vi_normal]
event: { send: menu name: help_menu }
}
{
name: completion_previous_menu
modifier: shift
keycode: backtab
mode: [emacs, vi_normal, vi_insert]
event: { send: menuprevious }
}
{
name: next_page_menu
modifier: control
keycode: char_x
mode: emacs
event: { send: menupagenext }
}
{
name: undo_or_previous_page_menu
modifier: control
keycode: char_z
mode: emacs
event: {
until: [
{ send: menupageprevious }
{ edit: undo }
]
}
}
{
name: escape
modifier: none
keycode: escape
mode: [emacs, vi_normal, vi_insert]
event: { send: esc } # NOTE: does not appear to work
}
{
name: cancel_command
modifier: control
keycode: char_c
mode: [emacs, vi_normal, vi_insert]
event: { send: ctrlc }
}
{
name: quit_shell
modifier: control
keycode: char_d
mode: [emacs, vi_normal, vi_insert]
event: { send: ctrld }
}
{
name: clear_screen
modifier: control
keycode: char_l
mode: [emacs, vi_normal, vi_insert]
event: { send: clearscreen }
}
{
name: search_history
modifier: control
keycode: char_q
mode: [emacs, vi_normal, vi_insert]
event: { send: searchhistory }
}
{
name: open_command_editor
modifier: control
keycode: char_o
mode: [emacs, vi_normal, vi_insert]
event: { send: openeditor }
}
{
name: move_up
modifier: none
keycode: up
mode: [emacs, vi_normal, vi_insert]
event: {
until: [
{send: menuup}
{send: up}
]
}
}
{
name: move_down
modifier: none
keycode: down
mode: [emacs, vi_normal, vi_insert]
event: {
until: [
{send: menudown}
{send: down}
]
}
}
{
name: move_left
modifier: none
keycode: left
mode: [emacs, vi_normal, vi_insert]
event: {
until: [
{send: menuleft}
{send: left}
]
}
}
{
name: move_right_or_take_history_hint
modifier: none
keycode: right
mode: [emacs, vi_normal, vi_insert]
event: {
until: [
{send: historyhintcomplete}
{send: menuright}
{send: right}
]
}
}
{
name: move_one_word_left
modifier: control
keycode: left
mode: [emacs, vi_normal, vi_insert]
event: {edit: movewordleft}
}
{
name: move_one_word_right_or_take_history_hint
modifier: control
keycode: right
mode: [emacs, vi_normal, vi_insert]
event: {
until: [
{send: historyhintwordcomplete}
{edit: movewordright}
]
}
}
{
name: move_to_line_start
modifier: none
keycode: home
mode: [emacs, vi_normal, vi_insert]
event: {edit: movetolinestart}
}
{
name: move_to_line_start
modifier: control
keycode: char_a
mode: [emacs, vi_normal, vi_insert]
event: {edit: movetolinestart}
}
{
name: move_to_line_end_or_take_history_hint
modifier: none
keycode: end
mode: [emacs, vi_normal, vi_insert]
event: {
until: [
{send: historyhintcomplete}
{edit: movetolineend}
]
}
}
{
name: move_to_line_end_or_take_history_hint
modifier: control
keycode: char_e
mode: [emacs, vi_normal, vi_insert]
event: {
until: [
{send: historyhintcomplete}
{edit: movetolineend}
]
}
}
{
name: move_to_line_start
modifier: control
keycode: home
mode: [emacs, vi_normal, vi_insert]
event: {edit: movetolinestart}
}
{
name: move_to_line_end
modifier: control
keycode: end
mode: [emacs, vi_normal, vi_insert]
event: {edit: movetolineend}
}
{
name: move_up
modifier: control
keycode: char_p
mode: [emacs, vi_normal, vi_insert]
event: {
until: [
{send: menuup}
{send: up}
]
}
}
{
name: move_down
modifier: control
keycode: char_t
mode: [emacs, vi_normal, vi_insert]
event: {
until: [
{send: menudown}
{send: down}
]
}
}
{
name: delete_one_character_backward
modifier: none
keycode: backspace
mode: [emacs, vi_insert]
event: {edit: backspace}
}
{
name: delete_one_word_backward
modifier: control
keycode: backspace
mode: [emacs, vi_insert]
event: {edit: backspaceword}
}
{
name: delete_one_character_forward
modifier: none
keycode: delete
mode: [emacs, vi_insert]
event: {edit: delete}
}
{
name: delete_one_character_forward
modifier: control
keycode: delete
mode: [emacs, vi_insert]
event: {edit: delete}
}
{
name: delete_one_character_forward
modifier: control
keycode: char_h
mode: [emacs, vi_insert]
event: {edit: backspace}
}
{
name: delete_one_word_backward
modifier: control
keycode: char_w
mode: [emacs, vi_insert]
event: {edit: backspaceword}
}
{
name: move_left
modifier: none
keycode: backspace
mode: vi_normal
event: {edit: moveleft}
}
{
name: newline_or_run_command
modifier: none
keycode: enter
mode: emacs
event: {send: enter}
}
{
name: move_left
modifier: control
keycode: char_b
mode: emacs
event: {
until: [
{send: menuleft}
{send: left}
]
}
}
{
name: move_right_or_take_history_hint
modifier: control
keycode: char_f
mode: emacs
event: {
until: [
{send: historyhintcomplete}
{send: menuright}
{send: right}
]
}
}
{
name: redo_change
modifier: control
keycode: char_g
mode: emacs
event: {edit: redo}
}
{
name: undo_change
modifier: control
keycode: char_z
mode: emacs
event: {edit: undo}
}
{
name: paste_before
modifier: control
keycode: char_y
mode: emacs
event: {edit: pastecutbufferbefore}
}
{
name: cut_word_left
modifier: control
keycode: char_w
mode: emacs
event: {edit: cutwordleft}
}
{
name: cut_line_to_end
modifier: control
keycode: char_k
mode: emacs
event: {edit: cuttoend}
}
{
name: cut_line_from_start
modifier: control
keycode: char_u
mode: emacs
event: {edit: cutfromstart}
}
{
name: swap_graphemes
modifier: control
keycode: char_t
mode: emacs
event: {edit: swapgraphemes}
}
{
name: move_one_word_left
modifier: alt
keycode: left
mode: emacs
event: {edit: movewordleft}
}
{
name: move_one_word_right_or_take_history_hint
modifier: alt
keycode: right
mode: emacs
event: {
until: [
{send: historyhintwordcomplete}
{edit: movewordright}
]
}
}
{
name: move_one_word_left
modifier: alt
keycode: char_b
mode: emacs
event: {edit: movewordleft}
}
{
name: move_one_word_right_or_take_history_hint
modifier: alt
keycode: char_f
mode: emacs
event: {
until: [
{send: historyhintwordcomplete}
{edit: movewordright}
]
}
}
{
name: delete_one_word_forward
modifier: alt
keycode: delete
mode: emacs
event: {edit: deleteword}
}
{
name: delete_one_word_backward
modifier: alt
keycode: backspace
mode: emacs
event: {edit: backspaceword}
}
{
name: delete_one_word_backward
modifier: alt
keycode: char_m
mode: emacs
event: {edit: backspaceword}
}
{
name: cut_word_to_right
modifier: alt
keycode: char_d
mode: emacs
event: {edit: cutwordright}
}
{
name: upper_case_word
modifier: alt
keycode: char_u
mode: emacs
event: {edit: uppercaseword}
}
{
name: lower_case_word
modifier: alt
keycode: char_l
mode: emacs
event: {edit: lowercaseword}
}
{
name: capitalize_char
modifier: alt
keycode: char_c
mode: emacs
event: {edit: capitalizechar}
}
]
}
}

87
dot_config/nushell/env.nu Normal file
View File

@@ -0,0 +1,87 @@
# Nushell Environment Config File
#
# version = "0.89.0"
use ~/.config/nushell/prompt.nu *
# Use nushell functions to define your right and left prompt
$env.PROMPT_COMMAND = {|| create_left_prompt }
$env.PROMPT_COMMAND_RIGHT = {|| create_right_prompt }
# Variables that represent the state of the prompt
$env.PROMPT_INDICATOR = {|| "" }
$env.PROMPT_INDICATOR_VI_INSERT = {|| ": " }
$env.PROMPT_INDICATOR_VI_NORMAL = {|| "> " }
$env.PROMPT_MULTILINE_INDICATOR = {|| create_continuation_prompt }
$env.TRANSIENT_PROMPT_COMMAND = {|| create_transient_prompt_left }
$env.TRANSIENT_PROMPT_INDICATOR = {|| create_transient_prompt_indicator }
# $env.TRANSIENT_PROMPT_INDICATOR_VI_INSERT = {|| "" }
# $env.TRANSIENT_PROMPT_INDICATOR_VI_NORMAL = {|| "" }
# $env.TRANSIENT_PROMPT_MULTILINE_INDICATOR = {|| "" }
# $env.TRANSIENT_PROMPT_COMMAND_RIGHT = {|| "" }
# Specifies how environment variables are:
# - converted from a string to a value on Nushell startup (from_string)
# - converted from a value back to a string when running external commands (to_string)
# Note: The conversions happen *after* config.nu is loaded
$env.ENV_CONVERSIONS = {
"PATH": {
from_string: { |s| $s | split row (char esep) | path expand --no-symlink }
to_string: { |v| $v | path expand --no-symlink | str join (char esep) }
}
"Path": {
from_string: { |s| $s | split row (char esep) | path expand --no-symlink }
to_string: { |v| $v | path expand --no-symlink | str join (char esep) }
}
}
# Directories to search for scripts when calling source or use
# The default for this is $nu.default-config-dir/scripts
$env.NU_LIB_DIRS = [
($nu.default-config-dir | path join "scripts"), # add <nushell-config-dir>/scripts
]
# Directories to search for plugin binaries when calling register
# The default for this is $nu.default-config-dir/plugins
$env.NU_PLUGIN_DIRS = [
($nu.default-config-dir | path join "plugins"), # add <nushell-config-dir>/plugins
]
# Personal env vars
$env.EDITOR = "nvim"
$env.GIT_EDITOR = "nvim"
$env.PIPENV_VERBOSITY = -1
$env.MAKEFLAGS = $"-j((nproc | into int) + 1)"
$env.JULIA_NUM_THREADS = $"(nproc)"
$env.BAT_THEME = "tokyonight_night"
$env.YAOURT_COLORS = "nb=1:pkg=1:ver=1;32:lver=1;45:installed=1;42:grp=1;34:od=1;41;5:votes=1;44:dsc=0:other=1;35"
$env.XDG_CONFIG_HOME = $"($env.HOME)/.config"
$env.GPG_TTY = $"(/usr/bin/env tty)"
$env.PASSWORD_STORE_DIR = $"($env.HOME)/.cache/password-store"
$env.GLAMOUR_STYLE = $"($env.XDG_CONFIG_HOME)/glamour/tokyo_night.json"
$env.RYE_HOME = $"($env.XDG_CONFIG_HOME)/.rye"
# Config for less
$env.LESS_TERMCAP_mb = (ansi --escape "01;31m") # begin blinking
$env.LESS_TERMCAP_md = (ansi --escape "01;31m") # begin bold
$env.LESS_TERMCAP_me = (ansi --escape "0m") # end mode
$env.LESS_TERMCAP_so = (ansi --escape "01;44;36m") # begin standout-mode (bottom of screen)
$env.LESS_TERMCAP_se = (ansi --escape "0m") # end standout-mode
$env.LESS_TERMCAP_us = (ansi --escape "00;36m") # begin underline
$env.LESS_TERMCAP_ue = (ansi --escape "0m") # end underline
# Set a custom copy of TERM so that shells under multiplexors behave correctly
if not ("MAIN_TERM" in $env) {
$env.MAIN_TERM = $env.TERM
}
# Finally, add session path variables
$env.PATH = (
$env.PATH
| split row (char esep)
| append (
open $"($nu.default-config-dir)/path.env"
| from csv --noheaders --trim all
| get "column0"
| path expand --no-symlink
)
)

View File

@@ -0,0 +1,5 @@
export use utils.nu * # utility functions
export use aliases.nu * # aliases for common functions
# Then we have the various config records that will be combined in config.nu
export use theme.nu
export use my_config.nu

View File

@@ -0,0 +1,49 @@
export def main [] {
{
show_banner: false # disable the welcome banner at startup
# For some reason wezterm adds a newline every keypress
shell_integration: {
osc2: true
osc7: true
osc8: true
# OSC9.9 causes swaync to notify end of every command under kitty
osc9_9: (not (("TERM" in $env) and ("kitty" in $env.TERM)))
osc133: true
osc633: true
reset_application_mode: true
}
# use kitty protocol when running inside kitty or wezterm
use_kitty_protocol: (
(
("TERM" in $env) and ("kitty" in $env.TERM)
) or (
not ("WEZTERM_EXECUTABLE" in $env)
)
)
history: {
file_format: "sqlite"
}
render_right_prompt_on_last_line: true
hooks: {
env_change: {
PWD: [
{|before, after| # This hook runs onefetch when the current directory is a git repository
if ".git\n" in ($after | ls -a | str join) {
print (^onefetch)
}
},
{||
if (exists direnv) {
direnv export json | from json | default {} | load-env
}
}
]
}
}
cursor_shape: {
emacs: line
vi_normal: blink_block
vi_insert: blink_line
}
}
}

View File

@@ -0,0 +1,9 @@
source ~/.config/nushell/nu_scripts/modules/background_task/task.nu
source ~/.config/nushell/nu_scripts/modules/nix/nix.nu
use ~/.config/nushell/nu_scripts/modules/nvim/mod.nu [
tcd,
nvim-lua,
nve,
nvc,
nvs,
]

View File

@@ -0,0 +1,2 @@
# Example of a `.gitattributes` file which reclassifies `.nu` files as Nushell:
*.nu linguist-language=Nushell

View File

@@ -0,0 +1,27 @@
on:
pull_request:
env:
NUSHELL_CARGO_PROFILE: ci
NU_LOG_LEVEL: DEBUG
jobs:
nu-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: "Fetch main branch"
run: |
git fetch origin main --depth 1
- uses: hustcer/setup-nu@v3.9
with:
version: "*"
check-latest: true
# features: full # dataframe and extra included
- name: toolkit check pr
shell: nu {0}
# nix STUB_IDE_CHECK when nushell/nushell#12208 fixed
run: |
use ${{ github.workspace }}/toolkit.nu *
STUB_IDE_CHECK=true check pr --and-exit

View File

@@ -0,0 +1,38 @@
name: Compress Images on Push to main branch
on:
push:
branches:
- main
paths:
- '**.jpg'
- '**.jpeg'
- '**.png'
- '**.webp'
jobs:
build:
name: calibreapp/image-actions
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v4.1.2
- name: Compress Images
id: calibre
uses: calibreapp/image-actions@main
with:
pngQuality: '90'
webpQuality: '90'
jpegQuality: '90'
compressOnly: true
jpegProgressive: false
# ignorePaths: 'node_modules/**,build'
# The `GITHUB_TOKEN` is automatically generated by GitHub and scoped only to the repository that is currently running the action. By default, the action cant update Pull Requests initiated from forked repositories.
# See https://docs.github.com/en/actions/reference/authentication-in-a-workflow and https://help.github.com/en/articles/virtual-environments-for-github-actions#token-permissions
githubToken: ${{ secrets.GITHUB_TOKEN }}
- name: Create New Pull Request If Needed
if: steps.calibre.outputs.markdown != ''
uses: peter-evans/create-pull-request@v6.0.3
with:
title: Compressed Images
branch-suffix: timestamp
commit-message: Compressed Images
body: ${{ steps.calibre.outputs.markdown }}

View File

@@ -0,0 +1,8 @@
.DS_Store
# ignore the git mailmap file
.mailmap
check-files.nu
.vscode/

View File

@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2021 Nushell Project
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@@ -0,0 +1,24 @@
# Nushell Scripts
This is a place to share Nushell scripts with each other. If you'd like to share your scripts, fork this repository, and [create a PR](https://github.com/nushell/nu_scripts/compare) that adds it to the repo.
## Sections
- [aliases](./aliases/)
- [benchmarks](./benchmarks/)
- [cool-oneliners](./sourced/cool-oneliners/)
- [custom-completions](./custom-completions/) - collection of custom completions for external commands.
- [custom-menus](./custom-menus/) - collection of custom nushell menus
- [example-config](./example-config/)
- [nu-hooks](./nu-hooks/)
- [modules](./modules/) - This has its dedicated [readme](./modules/README.md)
- [nu_101](./sourced/nu_101/) - Beginner introduction to nushell concepts.
- [prompt](./modules/prompt/)
- [themes](./themes/)
## Running Scripts
You can run nushell scripts in a few different ways.
1. You can type `nu <script name>`.
2. From with nushell, you can type `source <script name>` and if the script is just a bunch of commands it will run the script. If the script is a custom command it will load those custom commands into your current scope so you can run them like any other command.

View File

@@ -0,0 +1,9 @@
# Custom aliases
This current directory provides custom aliases. They can be used by importing their exported aliases via:
```nushell
use path/to/<command>/<command>-aliases.nu *
```
With `path/to/<command>` being either the relative path of the file to your current working directory or its absolute path.

View File

@@ -0,0 +1,6 @@
export alias b = bat
export alias bn = bat --number
export alias bnl = bat --number --line-range
export alias bp = bat --plain
export alias bpl = bat --plain --line-range
export alias bl = bat --line-range

View File

@@ -0,0 +1,6 @@
export alias ch = chezmoi
export alias chad = chezmoi add
export alias chap = chezmoi apply
export alias chd = chezmoi diff
export alias chda = chezmoi data
export alias chs = chezmoi status

View File

@@ -0,0 +1,53 @@
# docker alias in nushell
This plugin adds the following aliases:
| Alias | Command | Description |
| ------- | --------------------------------- | ---------------------------------------------------------------------------------------- |
| dbl | docker build | Build an image from a Dockerfile |
| dcin | docker container inspect | Display detailed information on one or more containers |
| dcls | docker container ls | List all the running docker containers |
| dclsa | docker container ls -a | List all running and stopped containers |
| dib | docker image build | Build an image from a Dockerfile (same as docker build) |
| dii | docker image inspect | Display detailed information on one or more images |
| dils | docker image ls | List docker images |
| dipu | docker image push | Push an image or repository to a remote registry |
| dirm | docker image rm | Remove one or more images |
| dit | docker image tag | Add a name and tag to a particular image |
| dlo | docker container logs | Fetch the logs of a docker container |
| dnc | docker network create | Create a new network |
| dncn | docker network connect | Connect a container to a network |
| dndcn | docker network disconnect | Disconnect a container from a network |
| dni | docker network inspect | Return information about one or more networks |
| dnls | docker network ls | List all networks the engine daemon knows about, including those spanning multiple hosts |
| dnrm | docker network rm | Remove one or more networks |
| dpo | docker container port | List port mappings or a specific mapping for the container |
| dpu | docker pull | Pull an image or a repository from a registry |
| dr | docker container run | Create a new container and start it using the specified command |
| drit | docker container run -it | Create a new container and start it in an interactive shell |
| drm | docker container rm | Remove the specified container(s) |
| drm! | docker container rm -f | Force the removal of a running container (uses SIGKILL) |
| dst | docker container start | Start one or more stopped containers |
| drs | docker container restart | Restart one or more containers |
| dstp | docker container stop | Stop one or more running containers |
| dtop | docker top | Display the running processes of a container |
| dvi | docker volume inspect | Display detailed information about one or more volumes |
| dvls | docker volume ls | List all the volumes known to docker |
| dvprune | docker volume prune | Cleanup dangling volumes |
| dxc | docker container exec | Run a new command in a running container |
| dxcit | docker container exec -it | Run a new command in a running container in an interactive shell |
| dsta | docker ps -q \| xargs docker stop | Stop all running containers |
## install and use
- install
```nushell
use {project_path}/aliases/docker/docker.nu
```
- use
```nushell
docker-aliases + tab
```

View File

@@ -0,0 +1,37 @@
export alias dbl = docker build
export alias dcin = docker container inspect
export alias dcls = docker container ls
export alias dclsa = docker container ls -a
export alias dib = docker image build
export alias dii = docker image inspect
export alias dils = docker image ls
export alias dipu = docker image push
export alias dirm = docker image rm
export alias dit = docker image tag
export alias dlo = docker container logs
export alias dnc = docker network create
export alias dncn = docker network connect
export alias dndcn = docker network disconnect
export alias dni = docker network inspect
export alias dnls = docker network ls
export alias dnrm = docker network rm
export alias dpo = docker container port
export alias dpu = docker pull
export alias dr = docker container run
export alias drit = docker container run -it
export alias drm = docker container rm
export alias drm! = docker container rm -f
export alias dst = docker container start
export alias drs = docker container restart
export alias dstp = docker container stop
export alias dtop = docker top
export alias dvi = docker volume inspect
export alias dvls = docker volume ls
export alias dvprune = docker volume prune
export alias dxc = docker container exec
export alias dxcit = docker container exec -it
# Alias for `docker ps -q | xargs docker stop`
export def dsta [] {
docker ps -q | xargs docker stop
}

View File

@@ -0,0 +1,6 @@
export alias x = exa --icons
export alias xa = exa --icons --all
export alias xl = exa --long
export alias xla = exa --long --all
export alias xt = exa --icons --tree
export alias xta = exa --icons --tree --all

View File

@@ -0,0 +1,6 @@
export alias x = eza --icons
export alias xa = eza --icons --all
export alias xl = eza --long
export alias xla = eza --long --all
export alias xt = eza --icons --tree
export alias xta = eza --icons --tree --all

View File

@@ -0,0 +1,214 @@
export def git_current_branch [] {
(gstat).branch
}
export def git_main_branch [] {
git remote show origin
| lines
| str trim
| find --regex 'HEAD .*?[: ].+'
| first
| str replace --regex 'HEAD .*?[: ]\s*(.+)' '$1'
}
#
# Aliases
# (sorted alphabetically)
#
export alias ga = git add
export alias gaa = git add --all
export alias gapa = git add --patch
export alias gau = git add --update
export alias gav = git add --verbose
export alias gap = git apply
export alias gapt = git apply --3way
export alias gb = git branch
export alias gba = git branch --all
export alias gbd = git branch --delete
export alias gbD = git branch --delete --force
export alias gbl = git blame -b -w
export alias gbm = git branch --move
export alias gbmc = git branch --move (git_current_branch)
export alias gbnm = git branch --no-merged
export alias gbr = git branch --remote
export alias gbs = git bisect
export alias gbsb = git bisect bad
export alias gbsg = git bisect good
export alias gbsn = git bisect new
export alias gbso = git bisect old
export alias gbsr = git bisect reset
export alias gbss = git bisect start
export alias gc = git commit --verbose
export alias gc! = git commit --verbose --amend
export alias gcn = git commit --verbose --no-edit
export alias gcn! = git commit --verbose --no-edit --amend
export alias gca = git commit --verbose --all
export alias gca! = git commit --verbose --all --amend
export alias gcan! = git commit --verbose --all --no-edit --amend
export alias gcans! = git commit --verbose --all --signoff --no-edit --amend
export alias gcam = git commit --all --message
export alias gcsm = git commit --signoff --message
export alias gcas = git commit --all --signoff
export alias gcasm = git commit --all --signoff --message
export alias gcb = git checkout -b
export alias gcd = git checkout develop
export alias gcf = git config --list
export alias gcl = git clone --recurse-submodules
export alias gclean = git clean --interactive -d
export def gpristine [] {
git reset --hard
git clean -d --force -x
}
export alias gcm = git checkout (git_main_branch)
export alias gcmsg = git commit --message
export alias gco = git checkout
export alias gcor = git checkout --recurse-submodules
export alias gcount = git shortlog --summary --numbered
export alias gcp = git cherry-pick
export alias gcpa = git cherry-pick --abort
export alias gcpc = git cherry-pick --continue
export alias gcs = git commit --gpg-sign
export alias gcss = git commit --gpg-sign --signoff
export alias gcssm = git commit --gpg-sign --signoff --message
export alias gd = git diff
export alias gdca = git diff --cached
export alias gdcw = git diff --cached --word-diff
export alias gdct = git describe --tags (git rev-list --tags --max-count=1)
export alias gds = git diff --staged
export alias gdt = git diff-tree --no-commit-id --name-only -r
export alias gdup = git diff @{upstream}
export alias gdw = git diff --word-diff
export alias gf = git fetch
export alias gfa = git fetch --all --prune
export alias gfo = git fetch origin
export alias gg = git gui citool
export alias gga = git gui citool --amend
export alias ghh = git help
export alias gignore = git update-index --assume-unchanged
export alias gl = git log
export alias glg = git log --stat
export alias glgp = git log --stat --patch
export alias glgg = git log --graph
export alias glgga = git log --graph --decorate --all
export alias glgm = git log --graph --max-count=10
export alias glo = git log --oneline --decorate
export alias glod = git log --graph $'--pretty=%Cred%h%Creset -%C(char lp)auto(char rp)%d%Creset %s %Cgreen(char lp)%ad(char rp) %C(char lp)bold blue(char rp)<%an>%Creset'
export alias glods = git log --graph $'--pretty=%Cred%h%Creset -%C(char lp)auto(char rp)%d%Creset %s %Cgreen(char lp)%ad(char rp) %C(char lp)bold blue(char rp)<%an>%Creset' --date=short
export alias glog = git log --oneline --decorate --graph
export alias gloga = git log --oneline --decorate --graph --all
export alias glol = git log --graph $'--pretty=%Cred%h%Creset -%C(char lp)auto(char rp)%d%Creset %s %Cgreen(char lp)%ar(char rp) %C(char lp)bold blue(char rp)<%an>%Creset'
export alias glola = git log --graph $'--pretty=%Cred%h%Creset -%C(char lp)auto(char rp)%d%Creset %s %Cgreen(char lp)%ar(char rp) %C(char lp)bold blue(char rp)<%an>%Creset' --all
export alias glols = git log --graph $'--pretty=%Cred%h%Creset -%C(char lp)auto(char rp)%d%Creset %s %Cgreen(char lp)%ar(char rp) %C(char lp)bold blue(char rp)<%an>%Creset' --stat
export alias gm = git merge
export alias gmtl = git mergetool --no-prompt
export alias gmtlvim = git mergetool --no-prompt --tool=vimdiff
export alias gma = git merge --abort
export def gmom [] {
let main = (git_main_branch)
git merge $"origin/($main)"
}
export alias gp = git push
export alias gpd = git push --dry-run
export alias gpf = git push --force-with-lease
export alias gpf! = git push --force
export alias gpl = git pull
export def gpoat [] {
git push origin --all; git push origin --tags
}
export alias gpod = git push origin --delete
export alias gpodc = git push origin --delete (git_current_branch)
export alias gpr = git pull --rebase
export alias gpu = git push upstream
export alias gpv = git push --verbose
export alias gr = git remote
export alias gpra = git pull --rebase --autostash
export alias gprav = git pull --rebase --autostash --verbose
export alias gprv = git pull --rebase --verbose
export alias gpsup = git push --set-upstream origin (git_current_branch)
export alias gra = git remote add
export alias grb = git rebase
export alias grba = git rebase --abort
export alias grbc = git rebase --continue
export alias grbd = git rebase develop
export alias grbi = git rebase --interactive
export alias grbm = git rebase (git_main_branch)
export alias grbo = git rebase --onto
export alias grbs = git rebase --skip
export alias grev = git revert
export alias grh = git reset
export alias grhh = git reset --hard
export alias groh = git reset $"origin/(git_current_branch)" --hard
export alias grm = git rm
export alias grmc = git rm --cached
export alias grmv = git remote rename
export alias grrm = git remote remove
export alias grs = git restore
export alias grset = git remote set-url
export alias grss = git restore --source
export alias grst = git restore --staged
export alias grt = cd (git rev-parse --show-toplevel or echo .)
export alias gru = git reset --
export alias grup = git remote update
export alias grv = git remote --verbose
export alias gsb = git status --short --branch
export alias gsd = git svn dcommit
export alias gsh = git show
export alias gshs = git show -s
export alias gsi = git submodule init
export alias gsps = git show --pretty=short --show-signature
export alias gsr = git svn rebase
export alias gss = git status --short
export alias gst = git status
export alias gsta = git stash push
export alias gstaa = git stash apply
export alias gstc = git stash clear
export alias gstd = git stash drop
export alias gstl = git stash list
export alias gstp = git stash pop
export alias gsts = git stash show --text
export alias gstu = gsta --include-untracked
export alias gstall = git stash --all
export alias gsu = git submodule update
export alias gsw = git switch
export alias gswc = git switch --create
export alias gts = git tag --sign
export def gtv [] {
git tag | lines | sort
}
export alias glum = git pull upstream (git_main_branch)
export alias gunignore = git update-index --no-assume-unchanged
export alias gup = git pull --rebase
export alias gupv = git pull --rebase --verbose
export alias gupa = git pull --rebase --autostash
export alias gupav = git pull --rebase --autostash --verbose
export alias gwch = git whatchanged -p --abbrev-commit --pretty=medium
export alias gwt = git worktree
export alias gwta = git worktree add
export alias gwtls = git worktree list
export alias gwtmv = git worktree move
export alias gwtrm = git worktree remove
export alias gam = git am
export alias gamc = git am --continue
export alias gams = git am --skip
export alias gama = git am --abort
export alias gamscp = git am --show-current-patch

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,3 @@
# transform the aligned text output of aws s3 ls into something useful
# presumes you have the aws CLI
aws s3 ls s3://your-bucket-and-path | lines | each { echo $it | str find-replace ' ' ' ' | str find-replace ' ' ' ' } | split column ' '

View File

@@ -0,0 +1,5 @@
# Benchmark Scripts
### Definition
These scripts are used to benchmark certain aspects of nushell.

View File

@@ -0,0 +1,17 @@
#!/usr/bin/env nu
# This is a much less efficient, recursive version of fibonacci that can be used to test our
# command call performance.
use std bench
def fib [n: int] {
match $n {
0 => 0,
1 => 1,
$n => { (fib ($n - 1)) + (fib ($n - 2)) },
}
}
def main [] {
print (bench { 0..20 | each { |n| fib $n } } | reject times)
}

View File

@@ -0,0 +1,24 @@
#!/usr/bin/env nu
# This benchmark covers the evaluation performance of some very simple, iterative Nushell code that
# doesn't require a bunch of calls into nested closures and doesn't rely on commands to do any
# heavy lifting.
#
# Originally added by @devyn to show what absolute best case performance for IR evaluation can look
# like. Not super representative of normal Nushell code.
use std bench
def fib [n: int] {
mut a = 0
mut b = 1
for _ in 2..=$n {
let c = $a + $b
$a = $b
$b = $c
}
$b
}
def main [] {
print (bench -n 1000 { 0..50 | each { |n| fib $n } } | reject times)
}

View File

@@ -0,0 +1,20 @@
# this script will print a blue gradient on the screen
# it's intended to simulate nushell v0.44 with autoview
let height = (term size).rows - 3 # calculate height
let width = (term size).columns - 5 # calculate width
let stamp_start = $width * 1.25 # calculate where to start Nu stamp
let stamp_end = $width * 1.3 # calculate where to stop Nu stamp
let stamp = 'Nu'
seq 0 $height | par-each {|| # create these in parallel
let row_data = (seq 0 $width | each { |col|
let fgcolor = 2 + 2 * $col
if $fgcolor > $stamp_start and $fgcolor < $stamp_end {
$"(ansi -e '48;2;0;0;')($fgcolor)m($stamp)(ansi -e '0m')"
} else {
$"(ansi -e '48;2;0;0;')($fgcolor)m (ansi -e '0m')"
}
} | str join)
print -n $"($row_data)" | table
null
} | compact

View File

@@ -0,0 +1,41 @@
# this script will print a blue gradient on the screen
# We can get the terminal width and height now with term size
# but we like to use the script as a benchmark, so let's keep
# it a constant size for now
let height = 40 # really need to get the terminal height here
let width = 160 # really need to get the terminal width here
let stamp = 'Nu'
seq 0 $height | each { |row|
let row_data = (seq 0 $width | each { |col|
let fgcolor = (iter_inc 2 2 $col)
if $fgcolor > 200 and $fgcolor < 210 {
$"(ansi -e '48;2;0;0;')($fgcolor)m($stamp)(ansi -e '0m')"
} else {
$"(ansi -e '48;2;0;0;')($fgcolor)m(char sp)(ansi -e '0m')"
}
} | str join)
print -n $"($row_data)(char newline)"
} | str join
def iter_inc [incr mult iter] {
$incr + $mult * $iter
}
# ╭────────────────────┬──────────────────────────────────────────────────────╮
# │ version │ 0.1.0 │
# │ branch │ main │
# │ short_commit │ ec94ca46 │
# │ commit_hash │ ec94ca46bb64f3aa95f1366d76d60da2ddc53782 │
# │ commit_date │ 2022-01-24 19:45:20 +00:00 │
# │ build_os │ windows-x86_64 │
# │ rust_version │ rustc 1.58.1 (db9d1b20b 2022-01-20) │
# │ rust_channel │ stable-x86_64-pc-windows-msvc │
# │ cargo_version │ cargo 1.58.0 (f01b232bc 2022-01-19) │
# │ pkg_version │ 0.1.0 │
# │ build_time │ 2022-01-24 15:04:00 -06:00 │
# │ build_rust_channel │ debug │
# │ features │ dataframe, default, which, zip │
# │ installed_plugins │ gstat, inc, nu-example-1, nu-example-2, nu-example-3 │
# ╰────────────────────┴──────────────────────────────────────────────────────╯

View File

@@ -0,0 +1,37 @@
# height = 40
# width = 160
# stamp = "py"
# for line in range(0, height):
# row_data = ""
# for col in range(0, width):
# fgcolor = 2 + 2 * col
# if fgcolor > 200 and fgcolor < 210:
# row_data = row_data + color(stamp, bg='rgb(0, 0, %d)' % fgcolor)
# else:
# fg = fgcolor % 256
# row_data = row_data + color(' ', bg='rgb(0, 0, %d)' % fg)
# print(row_data)
const height = 40
const width = 160
const stamp = "Nu"
for line in 0..$height {
mut row_data = ""
for col in 0..$width {
let fgcolor = 2 + 2 * $col
if $fgcolor > 200 and $fgcolor < 210 {
$row_data += $"(ansi -e '48;2;0;0;')($fgcolor)m($stamp)(ansi -e '0m')"
} else {
let fg = $fgcolor mod 256
$row_data += $"(ansi -e '48;2;0;0;')($fg)m (ansi -e '0m')"
}
}
print $row_data
}

View File

@@ -0,0 +1,23 @@
# this script will print a blue gradient on the screen
# First:
# pip install ansicolors
from colors import *
height = 40
width = 160
stamp = "py"
for line in range(0, height):
row_data = ""
for col in range(0, width):
fgcolor = 2 + 2 * col
if fgcolor > 200 and fgcolor < 210:
row_data = row_data + color(stamp, bg='rgb(0, 0, %d)' % fgcolor)
else:
fg = fgcolor % 256
row_data = row_data + color(' ', bg='rgb(0, 0, %d)' % fg)
print(row_data)

View File

@@ -0,0 +1,158 @@
# Kubouch wrote this on/around 01/26/2022
def iter_inc [incr mult iter] {
$incr + $mult * $iter
}
let is_release = (input "Did you compile in a release mode? y/n ")
if ($is_release | str downcase | str trim) == "y" {
print $"running test 0 at (date now | format date '%Y-%m-%d %H:%M:%S.%3f')"
# 0. this has wrong output
let 0 = (seq 1 10 | each { timeit {
let height = 40
let width = 160
let stamp = 'Nu'
seq 0 $height | each { |row|
let row_data = (seq 0 $width | each { |col|
let fgcolor = (iter_inc 2 2 $col)
if $fgcolor > 200 and $fgcolor < 210 {
$"(ansi -e '48;2;0;0;')($fgcolor)m($stamp)(ansi -e '0m')"
} else {
$"(ansi -e '48;2;0;0;')($fgcolor)m(char sp)(ansi -e '0m')"
}
} | str join)
$"($row_data)(char newline)"
} | str join
}} | math avg)
print $"running test 1 at (date now | format date '%Y-%m-%d %H:%M:%S.%3f')"
# 1. Fixed newline to fix the output (char cr)
let 1 = (seq 1 10 | each { timeit {
let height = 40
let width = 160
let stamp = 'Nu'
seq 0 $height | each { |row|
let row_data = (seq 0 $width | each { |col|
let fgcolor = (iter_inc 2 2 $col)
if $fgcolor > 200 and $fgcolor < 210 {
$"(ansi -e '48;2;0;0;')($fgcolor)m($stamp)(ansi -e '0m')"
} else {
$"(ansi -e '48;2;0;0;')($fgcolor)m(char sp)(ansi -e '0m')"
}
} | str join)
$"($row_data)(char cr)"
} | str join
}} | math avg)
print $"running test 2 at (date now | format date '%Y-%m-%d %H:%M:%S.%3f')"
# 2. Replace (char sp) with just space
let 2 = (seq 1 10 | each { timeit {
let height = 40
let width = 160
let stamp = 'Nu'
seq 0 $height | each { |row|
let row_data = (seq 0 $width | each { |col|
let fgcolor = (iter_inc 2 2 $col)
if $fgcolor > 200 and $fgcolor < 210 {
$"(ansi -e '48;2;0;0;')($fgcolor)m($stamp)(ansi -e '0m')"
} else {
$"(ansi -e '48;2;0;0;')($fgcolor)m (ansi -e '0m')"
}
} | str join)
$"($row_data)(char cr)"
} | str join
}} | math avg)
print $"running test 3 at (date now | format date '%Y-%m-%d %H:%M:%S.%3f')"
# 3. Precompute (ansi -e '48;2;0;0;') and (ansi -e '0m') -- seems to be slower
let 3 = (seq 1 10 | each { timeit {
let height = 40
let width = 160
let stamp = 'Nu'
let ansi1 = (ansi -e '48;2;0;0;')
let ansi2 = (ansi -e '0m')
seq 0 $height | each { |row|
let row_data = (seq 0 $width | each { |col|
let fgcolor = (iter_inc 2 2 $col)
if $fgcolor > 200 and $fgcolor < 210 {
$"($ansi1)($fgcolor)m($stamp)($ansi2)"
} else {
$"($ansi1)($fgcolor)m(char sp)($ansi2)"
}
} | str join)
$"($row_data)(char cr)"
} | str join
}} | math avg)
print $"running test 4 at (date now | format date '%Y-%m-%d %H:%M:%S.%3f')"
# 4. Inline iter_inc call
let 4 = (seq 1 10 | each { timeit {
let height = 40
let width = 160
let stamp = 'Nu'
seq 0 $height | each { |row|
let row_data = (seq 0 $width | each { |col|
let fgcolor = 2 + 2 * $col
if $fgcolor > 200 and $fgcolor < 210 {
$"(ansi -e '48;2;0;0;')($fgcolor)m($stamp)(ansi -e '0m')"
} else {
$"(ansi -e '48;2;0;0;')($fgcolor)m(char sp)(ansi -e '0m')"
}
} | str join)
$"($row_data)(char cr)"
} | str join
}} | math avg)
print $"running test 5 at (date now | format date '%Y-%m-%d %H:%M:%S.%3f')"
# 5. Combine (char sp) substitution and iter_inc inlining
let 5 = (seq 1 10 | each { timeit {
let height = 40
let width = 160
let stamp = 'Nu'
seq 0 $height | each { |row|
let row_data = (seq 0 $width | each { |col|
let fgcolor = 2 + 2 * $col
if $fgcolor > 200 and $fgcolor < 210 {
$"(ansi -e '48;2;0;0;')($fgcolor)m($stamp)(ansi -e '0m')"
} else {
$"(ansi -e '48;2;0;0;')($fgcolor)m (ansi -e '0m')"
}
} | str join)
$"($row_data)(char cr)"
} | str join
}} | math avg)
print $"running test 6 at (date now | format date '%Y-%m-%d %H:%M:%S.%3f')"
# 6. The above with par-each outer loop (using par-each anywhere else breaks the output)
let 6 = (seq 1 10 | each { timeit {
let height = 40
let width = 160
let stamp = 'Nu'
seq 0 $height | par-each -t 100 { |row|
let row_data = (seq 0 $width | each { |col|
let fgcolor = 2 + 2 * $col
if $fgcolor > 200 and $fgcolor < 210 {
$"(ansi -e '48;2;0;0;')($fgcolor)m($stamp)(ansi -e '0m')"
} else {
$"(ansi -e '48;2;0;0;')($fgcolor)m (ansi -e '0m')"
}
} | str join)
$"($row_data)(char cr)"
} | str join
}} | math avg)
print 'collating tests'
{
wrong_output: $0
newline: $1
span: $2
precompute_ansi: $3
inline_call: $4
space_and_inline_call: $5
par_each: $6
}
} else {
print "Compile in a release mode!"
}

View File

@@ -0,0 +1,153 @@
# Kubouch wrote this on/around 01/26/2022
def iter_inc [incr mult iter] {
$incr + $mult * $iter
}
#let is_release = input "Did you compile in a release mode? y/n "
let is_release = "y"
if ($is_release | str downcase | str trim) == "y" {
print $"running test 0 at (date now | format date '%Y-%m-%d %H:%M:%S.%3f')"
# 0. this has wrong output
let 0 = (seq 10 | timeit {
let height = 40
let width = 160
let stamp = 'Nu'
seq 0 $height | each { |row|
let row_data = (seq 0 $width | each { |col|
let fgcolor = (iter_inc 2 2 $col)
if $fgcolor > 200 and $fgcolor < 210 {
$"(ansi -e '48;2;0;0;')($fgcolor)m($stamp)(ansi -e '0m')"
} else {
$"(ansi -e '48;2;0;0;')($fgcolor)m(char sp)(ansi -e '0m')"
}
} | str join)
$"($row_data)(char newline)"
} | str join
} | math avg)
print $"running test 1 at (date now | format date '%Y-%m-%d %H:%M:%S.%3f')"
# 1. Fixed newline to fix the output (char cr)
let 1 = (seq 10 | timeit {
let height = 40
let width = 160
let stamp = 'Nu'
seq 0 $height | each { |row|
let row_data = (seq 0 $width | each { |col|
let fgcolor = (iter_inc 2 2 $col)
if $fgcolor > 200 and $fgcolor < 210 {
$"(ansi -e '48;2;0;0;')($fgcolor)m($stamp)(ansi -e '0m')"
} else {
$"(ansi -e '48;2;0;0;')($fgcolor)m(char sp)(ansi -e '0m')"
}
} | str join)
$"($row_data)(char cr)"
} | str join
} | math avg)
print $"running test 2 at (date now | format date '%Y-%m-%d %H:%M:%S.%3f')"
# 2. Replace (char sp) with just space
let 2 = (seq 10 | timeit {
let height = 40
let width = 160
let stamp = 'Nu'
seq 0 $height | each { |row|
let row_data = (seq 0 $width | each { |col|
let fgcolor = (iter_inc 2 2 $col)
if $fgcolor > 200 and $fgcolor < 210 {
$"(ansi -e '48;2;0;0;')($fgcolor)m($stamp)(ansi -e '0m')"
} else {
$"(ansi -e '48;2;0;0;')($fgcolor)m (ansi -e '0m')"
}
} | str join)
$"($row_data)(char cr)"
} | str join
} | math avg)
print $"running test 3 at (date now | format date '%Y-%m-%d %H:%M:%S.%3f')"
# 3. Precompute (ansi -e '48;2;0;0;') and (ansi -e '0m') -- seems to be slower
let 3 = (seq 10 | timeit {
let height = 40
let width = 160
let stamp = 'Nu'
let ansi1 = (ansi -e '48;2;0;0;')
let ansi2 = (ansi -e '0m')
seq 0 $height | each { |row|
let row_data = (seq 0 $width | each { |col|
let fgcolor = (iter_inc 2 2 $col)
if $fgcolor > 200 and $fgcolor < 210 {
$"($ansi1)($fgcolor)m($stamp)($ansi2)"
} else {
$"($ansi1)($fgcolor)m(char sp)($ansi2)"
}
} | str join)
$"($row_data)(char cr)"
} | str join
} | math avg)
print $"running test 4 at (date now | format date '%Y-%m-%d %H:%M:%S.%3f')"
# 4. Inline iter_inc call
let 4 = (seq 10 | timeit {
let height = 40
let width = 160
let stamp = 'Nu'
seq 0 $height | each { |row|
let row_data = (seq 0 $width | each { |col|
let fgcolor = 2 + 2 * $col
if $fgcolor > 200 and $fgcolor < 210 {
$"(ansi -e '48;2;0;0;')($fgcolor)m($stamp)(ansi -e '0m')"
} else {
$"(ansi -e '48;2;0;0;')($fgcolor)m(char sp)(ansi -e '0m')"
}
} | str join)
$"($row_data)(char cr)"
} | str join
} | math avg)
print $"running test 5 at (date now | format date '%Y-%m-%d %H:%M:%S.%3f')"
# 5. Combine (char sp) substitution and iter_inc inlining
let 5 = (seq 10 | timeit {
let height = 40
let width = 160
let stamp = 'Nu'
seq 0 $height | each { |row|
let row_data = (seq 0 $width | each { |col|
let fgcolor = 2 + 2 * $col
if $fgcolor > 200 and $fgcolor < 210 {
$"(ansi -e '48;2;0;0;')($fgcolor)m($stamp)(ansi -e '0m')"
} else {
$"(ansi -e '48;2;0;0;')($fgcolor)m (ansi -e '0m')"
}
} | str join)
$"($row_data)(char cr)"
} | str join
} | math avg)
print $"running test 6 at (date now | format date '%Y-%m-%d %H:%M:%S.%3f')"
# 6. The above with par-each outer loop (using par-each anywhere else breaks the output)
let 6 = (seq 10 | timeit {
let height = 40
let width = 160
let stamp = 'Nu'
seq 0 $height | par-each -t 100 { |row|
let row_data = (seq 0 $width | each { |col|
let fgcolor = 2 + 2 * $col
if $fgcolor > 200 and $fgcolor < 210 {
$"(ansi -e '48;2;0;0;')($fgcolor)m($stamp)(ansi -e '0m')"
} else {
$"(ansi -e '48;2;0;0;')($fgcolor)m (ansi -e '0m')"
}
} | str join)
$"($row_data)(char cr)"
} | str join
} | math avg)
print 'collating tests'
[ $0 $1 $2 $3 $4 $5 $6 ]
} else {
print "Compile in a release mode!"
}

View File

@@ -0,0 +1,20 @@
use std bench
def "random bytes" [n: int]: nothing -> binary {
seq 1 ($n / 8 + 1)
| each { random int }
| into binary
| enumerate
| reduce -f 0x[] {|it, acc|
$acc | bytes add $it.item
}
| first $n
}
let ns = [10, 100, 1_000, 10_000, 100_000]
let report = $ns | each {|n|
bench { random bytes $n } --rounds 10 --pretty --verbose
} | wrap time | merge ($ns | wrap n)
$report

View File

@@ -0,0 +1,102 @@
# This is just for benchmarking
# it uses the no check benchmark so it doesn't prompt you
print (source gradient_benchmark_no_check.nu)
print (source gradient_benchmark_no_check.nu)
print (source gradient_benchmark_no_check.nu)
print (source gradient_benchmark_no_check.nu)
print (source gradient_benchmark_no_check.nu)
print (source gradient_benchmark_no_check.nu)
print (source gradient_benchmark_no_check.nu)
print (source gradient_benchmark_no_check.nu)
print (source gradient_benchmark_no_check.nu)
print (source gradient_benchmark_no_check.nu)
print (source gradient_benchmark_no_check.nu)
print (source gradient_benchmark_no_check.nu)
print (source gradient_benchmark_no_check.nu)
print (source gradient_benchmark_no_check.nu)
print (source gradient_benchmark_no_check.nu)
print (source gradient_benchmark_no_check.nu)
print (source gradient_benchmark_no_check.nu)
print (source gradient_benchmark_no_check.nu)
print (source gradient_benchmark_no_check.nu)
print (source gradient_benchmark_no_check.nu)
print (source gradient_benchmark_no_check.nu)
print (source gradient_benchmark_no_check.nu)
print (source gradient_benchmark_no_check.nu)
print (source gradient_benchmark_no_check.nu)
print (source gradient_benchmark_no_check.nu)
print (source gradient_benchmark_no_check.nu)
print (source gradient_benchmark_no_check.nu)
print (source gradient_benchmark_no_check.nu)
print (source gradient_benchmark_no_check.nu)
print (source gradient_benchmark_no_check.nu)
print (source gradient_benchmark_no_check.nu)
print (source gradient_benchmark_no_check.nu)
print (source gradient_benchmark_no_check.nu)
print (source gradient_benchmark_no_check.nu)
print (source gradient_benchmark_no_check.nu)
print (source gradient_benchmark_no_check.nu)
print (source gradient_benchmark_no_check.nu)
print (source gradient_benchmark_no_check.nu)
print (source gradient_benchmark_no_check.nu)
print (source gradient_benchmark_no_check.nu)
print (source gradient_benchmark_no_check.nu)
print (source gradient_benchmark_no_check.nu)
print (source gradient_benchmark_no_check.nu)
print (source gradient_benchmark_no_check.nu)
print (source gradient_benchmark_no_check.nu)
print (source gradient_benchmark_no_check.nu)
print (source gradient_benchmark_no_check.nu)
print (source gradient_benchmark_no_check.nu)
print (source gradient_benchmark_no_check.nu)
print (source gradient_benchmark_no_check.nu)
print (source gradient_benchmark_no_check.nu)
print (source gradient_benchmark_no_check.nu)
print (source gradient_benchmark_no_check.nu)
print (source gradient_benchmark_no_check.nu)
print (source gradient_benchmark_no_check.nu)
print (source gradient_benchmark_no_check.nu)
print (source gradient_benchmark_no_check.nu)
print (source gradient_benchmark_no_check.nu)
print (source gradient_benchmark_no_check.nu)
print (source gradient_benchmark_no_check.nu)
print (source gradient_benchmark_no_check.nu)
print (source gradient_benchmark_no_check.nu)
print (source gradient_benchmark_no_check.nu)
print (source gradient_benchmark_no_check.nu)
print (source gradient_benchmark_no_check.nu)
print (source gradient_benchmark_no_check.nu)
print (source gradient_benchmark_no_check.nu)
print (source gradient_benchmark_no_check.nu)
print (source gradient_benchmark_no_check.nu)
print (source gradient_benchmark_no_check.nu)
print (source gradient_benchmark_no_check.nu)
print (source gradient_benchmark_no_check.nu)
print (source gradient_benchmark_no_check.nu)
print (source gradient_benchmark_no_check.nu)
print (source gradient_benchmark_no_check.nu)
print (source gradient_benchmark_no_check.nu)
print (source gradient_benchmark_no_check.nu)
print (source gradient_benchmark_no_check.nu)
print (source gradient_benchmark_no_check.nu)
print (source gradient_benchmark_no_check.nu)
print (source gradient_benchmark_no_check.nu)
print (source gradient_benchmark_no_check.nu)
print (source gradient_benchmark_no_check.nu)
print (source gradient_benchmark_no_check.nu)
print (source gradient_benchmark_no_check.nu)
print (source gradient_benchmark_no_check.nu)
print (source gradient_benchmark_no_check.nu)
print (source gradient_benchmark_no_check.nu)
print (source gradient_benchmark_no_check.nu)
print (source gradient_benchmark_no_check.nu)
print (source gradient_benchmark_no_check.nu)
print (source gradient_benchmark_no_check.nu)
print (source gradient_benchmark_no_check.nu)
print (source gradient_benchmark_no_check.nu)
print (source gradient_benchmark_no_check.nu)
print (source gradient_benchmark_no_check.nu)
print (source gradient_benchmark_no_check.nu)
print (source gradient_benchmark_no_check.nu)
print (source gradient_benchmark_no_check.nu)
print (source gradient_benchmark_no_check.nu)

View File

@@ -0,0 +1,10 @@
# The infamous turtle benchmark
def turtle [column: string] {
wrap $column | table
}
print $"Turtle 1 = ('turtle' | turtle '1' | str length)"
print $"Turtle 2 = ('turtle' | turtle '1' | turtle '2' | str length)"
print $"Turtle 3 = ('turtle' | turtle '1' | turtle '2' | turtle '3' | str length)"
print $"Turtle 4 = ('turtle' | turtle '1' | turtle '2' | turtle '3' | turtle '4' | str length)"
print $"Turtle 5 = ('turtle' | turtle '1' | turtle '2' | turtle '3' | turtle '4' | turtle '5' | str length)"

View File

@@ -0,0 +1,23 @@
# Custom completions
This current directory provides custom completions. They can be used by importing their exported commands via:
```nushell
use path/to/<command>/<command>-completions.nu *
# or
source path/to/<command>/<command>-completions.nu
# without the `*` at the end
```
With `path/to/<command>` being either the relative path of the file to your current working directory or its absolute path.
Bear in mind that if you import the `use <path> *`, it is important that you don't name a function with the same name of the file
```nu
# file: rustup.nu
export extern rustup [
...args
]
```
`use ./rustup.nu *` won't work here

View File

@@ -0,0 +1,66 @@
# copied from auto-generated completions
export extern "ack" [
--ignore-case(-i) # Ignore case
--smart-case # Ignore case when pattern contains no uppercase
--no-smart-case # Dont ignore case
--invert-match(-v) # Invert match
--word-regexp(-w) # Match only whole words
--literal(-Q) # Quote all metacharacters
--lines # Only print line(s) NUM of each file
--files-with-matches(-l) # Only print filenames containing matches
--files-without-matches(-L) # Only print filenames with no matches
--output # Output the evaluation of Perl expression for each line
--passthru # Print all lines
--match # Specify pattern explicitly
--max-count(-m) # Stop searching in each file after NUM matches
--with-filename(-H) # Print the filename for each match
--no-filename(-h) # Suppress the prefixing filename on output
--count(-c) # Show number of lines matching per file
--column # Show column number of first match
--no-column # Dont show column number of first match
--print0 # Print null byte as separator between filenames
--pager # Pipes all ack output through command
--no-pager # Do not send output through a pager
--heading # Prints a filename heading above files results
--no-heading # Dont print a filename heading above files results
--break # Print a break between results
--no-break # Dont print a break between results
--group # Filename heading and line break between results
--no-group # No filename heading and no line breaks between results
--color # Highlight the matching text
--no-colour # Dont highlight the matching text
--color-filename # Set the color for filenames
--color-match # Set the color for matches
--color-lineno # Set the color for line numbers
--flush # Flush output immediately
--sort-files # Sort the found files lexically
--show-types # Show which types each file has
--files-from # Read the list of files to search from file
--ignore-directory # Ignore directory
--no-ignore-directory # Dont ignore directory
--ignore-file # Add filter for ignoring files
--recurse(-R) # Recurse into subdirectories
--no-recurse(-n) # No descending into subdirectories
--follow # Follow symlinks
--no-follow # Dont follow symlinks
--known-types(-k) # Include only recognized files
--type # Include only X files
--type-set # Replaces definition of type
--type-add # Specify definition of type
--type-del # Removes all filters associated with type
--no-env # Ignores environment variables and ackrc files
--ackrc # Specifies location of ackrc file
--ignore-ack-defaults # Ignore default definitions ack includes
--create-ackrc # Outputs default ackrc
--help(-?) # Shows help
--help-types # Shows all known types
--dump # Dump information on which options are loaded
--filter # Forces ack to treat input as a pipe
--no-filter # Forces ack to treat input as tty
--man # Shows man page
--version # Displays version and copyright
--thpppt # Bill the Cat
--bar # The warning admiral
...args
]

View File

@@ -0,0 +1,304 @@
def "nu-complete adb one-device-args" [] {
[SERIAL USB]
}
def "nu-complete adb compression-algorithm" [] {
[any none brotli lz4 zstd]
}
def "nu-complete adb sync-partations" [] {
[all data odm oem product system system_ext vendor]
}
def "nu-complete adb wait-for-state" [] {
[-device -recovery -rescue -sideload -bootloader -disconnect]
}
def "nu-complete adb wait-for-transport" [] {
[-usb -local -any]
}
def "nu-complete adb reboot-type" [] {
[
bootloader
recovery
edl
sideload # Reboots into recovery and automatically starts sideload mode.
sideload-auto-reboot
" "
]
}
export extern "adb" [
-a # listen on all network interfaces, not just localhost
-d # use USB device (error if multiple devices connected)
-e # use TCP/IP device (error if multiple TCP/IP devices available)
-s: string # use device with given serial (overrides $ANDROID_SERIAL)
-t: string # use device with given transport id
-H: string # name of adb server host [default=localhost]
-P: int # port of adb server [default=5037]
-L: string # listen on given socket for adb server [default=tcp:localhost:5037]
--exit-on-write-error # exit if stdout is closed
]
# Show this help message.
export extern "adb help" []
# Show version number.
export extern "adb version" []
# Connect to a device via TCP/IP [default PORT=5555].
export extern "adb connect" [
host_port: string # Connect to a device via TCP/IP [default PORT=5555].
]
# Disconnect from given TCP/IP device [default PORT=5555], or all.
export extern "adb disconnect" [
host_port?: string # Disconnect device via TCP/IP [default PORT=5555] (disconnec all if no ip given).
]
# Pair with a device for secure TCP/IP communication.
export extern "adb pair" [
host_port: string # Connect to a device via TCP/IP [default PORT=5555].
PAIRING_CODE: string
]
export extern "adb forward" [
--list # List all forward socket connections.
--no-rebind
LOCAL_REMOTE: string # Forward socket connection using one of the followings. tcp:PORT (local may be “tcp:0” to pick any open port. localreserved:UNIX_DOMAIN_SOCKET_NAME. localfilesystem:UNIX_DOMAIN_SOCKET_NAME. jdwp:PROCESS PID (remote only). vsock:CID:PORT (remote only). acceptfd:FD (listen only). dev:DEVICE_NAME. dev-raw:DEVICE_NAME. (open device in raw mode)**.
--remove: string # Remove specific forward socket connection.
--remove-all # Remove all forward socket connections.
]
export extern "adb reverse" [
--list # List all forward socket connections.
--no-rebind
LOCAL_REMOTE: string # Forward socket connection using one of the followings. tcp:PORT (local may be “tcp:0” to pick any open port. localreserved:UNIX_DOMAIN_SOCKET_NAME. localfilesystem:UNIX_DOMAIN_SOCKET_NAME. jdwp:PROCESS PID (remote only). vsock:CID:PORT (remote only). acceptfd:FD (listen only). dev:DEVICE_NAME. dev-raw:DEVICE_NAME. (open device in raw mode)**.
--remove: string # Remove specific forward socket connection.
--remove-all # Remove all forward socket connections.
]
export extern "adb mdns" [
check # Check if mdns discovery is available.
services # List all discovered services.
]
# List connected devices.
export extern "adb devices" [
-l # Use long output.
]
# Push a single package to the device and install it
export extern "adb install" [
Package: string
-r # Replace existing application.
-t # Allow test packages.
-d # Allow version code downgrade (debuggable packages only).
-p # Partial application install (install-multiple only).
-g # Grant all runtime permissions.
--abi:string # Override platform's default ABI.
--instant # Cause the app to be installed as an ephemeral install app.
--no-streaming # Always push APK to device and invoke Package Manager as separate steps.
--streaming # Force streaming APK directly into Package Manager.
--fastdeploy # Use fast deploy.
--no-fastdeploy # Prevent use of fast deploy.
--force-agent # Force update of deployment agent when using fast deploy.
--date-check-agent # Update deployment agent when local version is newer and using fast deploy.
--version-check-agent # Update deployment agent when local version has different version code and using fast deploy.
--local-agent # Locate agent files from local source build (instead of SDK location). See also adb shell pm help for more options.
]
# Push one or more packages to the device and install them atomically
export extern "adb install-multiple" [
Package: string
-r # Replace existing application.
-t # Allow test packages.
-d # Allow version code downgrade (debuggable packages only).
-p # Partial application install (install-multiple only).
-g # Grant all runtime permissions.
--abi:string # Override platform's default ABI.
--instant # Cause the app to be installed as an ephemeral install app.
--no-streaming # Always push APK to device and invoke Package Manager as separate steps.
--streaming # Force streaming APK directly into Package Manager.
--fastdeploy # Use fast deploy.
--no-fastdeploy # Prevent use of fast deploy.
--force-agent # Force update of deployment agent when using fast deploy.
--date-check-agent # Update deployment agent when local version is newer and using fast deploy.
--version-check-agent # Update deployment agent when local version has different version code and using fast deploy.
--local-agent # Locate agent files from local source build (instead of SDK location). See also adb shell pm help for more options.
]
export extern "adb install-multi-package" [
Package: string
-r # Replace existing application.
-t # Allow test packages.
-d # Allow version code downgrade (debuggable packages only).
-p # Partial application install (install-multiple only).
-g # Grant all runtime permissions.
--abi:string # Override platform's default ABI.
--instant # Cause the app to be installed as an ephemeral install app.
--no-streaming # Always push APK to device and invoke Package Manager as separate steps.
--streaming # Force streaming APK directly into Package Manager.
--fastdeploy # Use fast deploy.
--no-fastdeploy # Prevent use of fast deploy.
--force-agent # Force update of deployment agent when using fast deploy.
--date-check-agent # Update deployment agent when local version is newer and using fast deploy.
--version-check-agent # Update deployment agent when local version has different version code and using fast deploy.
--local-agent # Locate agent files from local source build (instead of SDK location). See also adb shell pm help for more options.
]
# Remove specified application from the device
export extern "adb uninstall" [
APPLICATION_ID: string # Remove this APPLICATION_ID from the device.
-k
]
# Run remote shell command (interactive shell if no command given)
export extern "adb shell" [
-e # Choose escape character, or “none”; default ~.
-n # Don't read from stdin
-T # Disable pty allocation.
-t # Allocate a pty if on a tty (-tt force pty allocation).
-x # Disable remote exit codes and stdout/stderr separation.
COMMAND?:string # Run emulator console COMMAND
]
# Copy local files/directories to device.
export extern "adb push" [
--sync # Only push files that are newer on the host than the device.
-n # Dry run, push files to device without storing to the filesystem.
-z:string@"nu-complete adb compression-algorithm" # enable compression with a specified algorithm (any/none/brotli/lz4/zstd).
-Z # Disable compression.
]
# Copy files/dirs from device
export extern "adb pull" [
-a # preserve file timestamp and mode.
--sync # Only push files that are newer on the host than the device.
-n # Dry run. Push files to device without storing to the filesystem.
-z:string@"nu-complete adb compression-algorithm" # enable compression with a specified algorithm (any/none/brotli/lz4/zstd).
-Z # Disable compression.
...remote: string
local: string
]
# Sync a local build from $ANDROID_PRODUCT_OUT to the device (default all)
export extern "adb sync" [
parations: string@"nu-complete adb sync-partations"
-n # Dry run. Push files to device without storing to the filesystem.
-z:string@"nu-complete adb compression-algorithm" # enable compression with a specified algorithm (any/none/brotli/lz4/zstd).
-Z # Disable compression.
-l # List files that would be copied, but don't copy them.
]
# Ensure that there is a server running.
export extern "adb start-server" [ # only allowed with 'start-server' or 'server nodaemon',
--one-device: string@"nu-complete adb one-device-args" #server will only connect to one USB device, specified by a serial number or USB device address.
]
# Kill the server if it is running.
export extern "adb kill-server" []
# Close connection from host or device side to force reconnect.
export extern "adb reconnect" [
device?: string
]
# Close connection from device side to force reconnect.
export extern "adb reconnect device" []
# Reset offline/unauthorized devices to force reconnect.
export extern "adb reconnect offline" []
# Attach a detached USB device identified by its SERIAL number.
export extern "adb attach" [
SERIAL: string
]
# Detach from a USB device identified by its SERIAL to allow use by other processes.
export extern "adb detach" [
SERIAL: string
]
# list features supported by adb server.
export extern "adb host-features" []
# list features supported by both adb server and device.
export extern "adb features" []
# Write bugreport
export extern "adb bugreport" [
PATH: string # PATH [default=bugreport.zip]; if PATH is a directory, the bug report is saved in that directory. devices that don't support zipped bug reports output to stdout.
]
# List pids of processes hosting a JDWP transport.
export extern "adb jdwp" []
# Show device log (logcat --help for more).
export extern "adb logcat" []
# Disable dm-verity checking on userdebug builds.
export extern "adb disable-verity" []
# Re-enable dm-verity checking on userdebug builds.
export extern "adb enable-verity" []
# Generate adb public/private key; private key stored in FILE.
export extern "adb keygen" [
FILE: string
]
# Wait for device to be in a given state.
export extern "adb wait-for" [
STATE: string@"nu-complete adb wait-for-state"
TRANSPORT: string@"nu-complete adb wait-for-transport"
]
# Print offline | bootloader | device.
export extern "adb get-state" []
# Print SERIAL_NUMBER.
export extern "adb get-serialno" []
# Print DEVICE_PATH.
export extern "adb get-devpath" []
# Remount partitions read-write.
export extern "adb remount" [
-R # Automatically reboot the device.
]
# Reboot the device; defaults to booting system image but supports bootloader and recovery too.
export extern "adb reboot" [
type:string@"nu-complete adb reboot-type"
]
# Sideload the given full OTA package
export extern "adb sideload" [
OTAPACKAGE: string
]
# Restart adbd with root permissions.
export extern "adb root" []
# Restart adbd without root permissions.
export extern "adb unroot" []
# Restart adbd listening on USB.
export extern "adb usb" []
# Restart adbd listening on TCP on PORT.
export extern "adb tcpip" [
PORT:string
]

View File

@@ -0,0 +1,24 @@
# SDK Platform Tools completions
A Nushell extern definition and completers for [Android Debugger Bridge `adb`](https://developer.android.com/tools/adb).
This module provides extern definitions for almost all of the `adb` commands and their flags.
## Usage
simply import the extern definitions with
```nu
use path/to/adb-completions.nu * # don't forget the star `*`
```
or
```nu
source path/to/adb-completions.nu
```
Once imported completions will be available for commands, flags, options, and some values as well.
Display the commands by entering the `→ tab` key in the command line after `adb`or any of it's command options.

View File

@@ -0,0 +1,51 @@
# author: HirschBerge
# inspired by DWTW
def videoQuality [] {
[ "worst", "360p", "480p", "720p", "1080p", "4K", "best" ]
}
def common_episodes [] {
[ "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13" ]
}
def common_ranges [] {
[ "1-5", "5-10", "1-13", "14-26", "1-26" ]
}
# Anime Search and Streaming Tool
export extern "ani-cli" [
string?
-q: int@videoQuality # Specify video quality
--quality: int@videoQuality # Specify video quality
-s # Use Syncplay to watch with friends
--syncplay # Use Syncplay to watch with friends
-f # Use FZF for selection
--fzf # Use FZF for selection
-e: string@common_episodes # Specify episode number
--episode: string@common_episodes # Specify episode number
-d # Download the episode instead of playing it
--download # Download the episode instead of playing it
-p # Download episode to a specified directory
--path: string # Download episode to a specified directory
-c # Continue watching from history
--continue # Continue watching from history
-h # Show help text
--help # Show help text
-D # Delete history
--delete # Delete history
-l # Show logs
--log-view # Show logs
-U # Update the script
--update # Update the script
-V # Show the version of the script
--version # Show the version of the script
-r: string@common_ranges # Specify range number
--range: string@common_ranges # Specify range number
--skip # Use ani-skip to skip intros (mpv only)
--dub # Play dubbed version
--rofi # Use rofi instead of fzf for menu
--no-detach # Don't detach the player (mpv only)
--exit-after-play # Exit after playing (mpv only)
--skip-title: string # Use the given title for ani-skip query
-N # Display a countdown to the next episode
--nextep-countdown # Display a countdown to the next episode
]

View File

@@ -0,0 +1,67 @@
# Omit false conditionals
export extern "as" [
--alternate # Initially turn on alternate macro syntax
--nocompress-debug-sections # Dont compress DWARF debug sections
--execstack # Require executable stack for this object
--noexecstack # Dont require executable stack for this object
--elf-stt-common # Generate ELF common symbols with STT_COMMON type
--sectname-subst # Enable section name substitution sequences
--gen-debug(-g) # Generate debugging information
--gstabs # Generate STABS debugging information
# --gstabs+ # (breaks the nu parser) Generate STABS debug info with GNU extensions
--gdwarf-2 # Generate DWARF2 debugging information
--gdwarf-sections # Generate per-function section names for DWARF line information
--help # Show help message and exit
--target-help # Show target specific options
--mri(-M) # Assemble in MRI compatibility mode
--reduce-memory-overheads # Prefer smaller memory use
--statistics # Print various measured statistics from execution
--strip-local-absolute # Strip local absolute symbols
--traditional-format # Use same format as native assembler when possible
--version # Print assembler version number and exit
--no-warn(-W) # Suppress warnings
--warn # Dont suppress warnings
--fatal-warnings # Treat warnings as errors
--listing-lhs-width
--listing-lhs-width2
--listing-rhs-width
--listing-cont-lines
--32 # Generate 32 bits code
--64 # Generate 64 bits code
--x32 # Generate x32 code
...args
]
# Generate ELF common symbols with STT_COMMON type
export extern "as yes no" [
--alternate # Initially turn on alternate macro syntax
--nocompress-debug-sections # Dont compress DWARF debug sections
--execstack # Require executable stack for this object
--noexecstack # Dont require executable stack for this object
--elf-stt-common # Generate ELF common symbols with STT_COMMON type
--sectname-subst # Enable section name substitution sequences
--gen-debug(-g) # Generate debugging information
--gstabs # Generate STABS debugging information
# --gstabs+ # (breaks the nu parser) Generate STABS debug info with GNU extensions
--gdwarf-2 # Generate DWARF2 debugging information
--gdwarf-sections # Generate per-function section names for DWARF line information
--help # Show help message and exit
--target-help # Show target specific options
--mri(-M) # Assemble in MRI compatibility mode
--reduce-memory-overheads # Prefer smaller memory use
--statistics # Print various measured statistics from execution
--strip-local-absolute # Strip local absolute symbols
--traditional-format # Use same format as native assembler when possible
--version # Print assembler version number and exit
--no-warn(-W) # Suppress warnings
--warn # Dont suppress warnings
--fatal-warnings # Treat warnings as errors
--listing-lhs-width
--listing-lhs-width2
--listing-rhs-width
--listing-cont-lines
--32 # Generate 32 bits code
--64 # Generate 64 bits code
--x32 # Generate x32 code
...args
]

View File

@@ -0,0 +1,101 @@
# auto-generate completions
- basic helpers to parse --help information from cli commands and export nu completions source
- basic helpers tp parse .fish complete files and export nu completions source
# parse-fish
## current
- only parses out simple complete's with no complete's boolean arguments like -f
- does not map fish autocomplete helpers to nu-complete helps (a nu library of autocomplete utils would be neat)
## usage
be in a directory with one or more .fish completion scripts
A good one is
`git clone https://github.com/fish-shell/fish-shell`
`cd fish-shell/share/completions`
To build all .fish files in the current directory `build-completions-from-pwd`
```nu
build-completions-from-pwd
ls *.nu
```
To build a single .fish file and choose the output file
```nu
build-completion cargo.fish cargo.nu
```
# parse-help
## current limitations
- Only flags are parsed, arguments are not parsed and ...args is injected at the end to catch all
- Some examples of `--flags` in descriptions can throw off the regex and get included in the parsed flags
- `<format>` (types) to flags are parsed, but not added to the nu shell completion type hints
## usage
generate and save source to a file
```nu
source parse-help.nu
cargo --help | parse-help | make-completion cargo | save cargo.nu
```
## example
This can be saved to a file and sourced. Example of output
```nu
extern "cargo" [
--version(-V) #Print version info and exit
--list #List installed commands
--explain #Run `rustc --explain CODE`
--verbose(-v) #Use verbose output (-vv very verbose/build.rs output)
--quiet(-q) #Do not print cargo log messages
--color #Coloring: auto, always, never
--frozen #Require Cargo.lock and cache are up to date
--locked #Require Cargo.lock is up to date
--offline #Run without accessing the network
--config #Override a configuration value (unstable)
--help(-h) #Print help information
...args
]
extern "nu" [
--help(-h) #Display this help message
--stdin #redirect the stdin
--login(-l) #start as a login shell
--interactive(-i) #start as an interactive shell
--version(-v) #print the version
--perf(-p) #start and print performance metrics during startup
--testbin #run internal test binary
--commands(-c) #run the given commands and then exit
--config #start with an alternate config file
--env-config #start with an alternate environment config file
--log-level #log level for performance logs
--threads(-t) #threads to use for parallel commands
...args
]
```
Which outputs like so on tab completion for `cargo --`
```
| cargo --
--color Coloring: auto, always, never
--config Override a configuration value (unstable)
--explain Run `rustc --explain CODE`
--frozen Require Cargo.lock and cache are up to date
--help Display this help message
--help Print help information
--list List installed commands
--locked Require Cargo.lock is up to date
--offline Run without accessing the network
--quiet Do not print cargo log messages
--verbose Use verbose output (-vv very verbose/build.rs output)
--version Print version info and exit
```

View File

@@ -0,0 +1,71 @@
# Add
extern "7z a" [
...args
]
# Benchmark
extern "7z b" [
...args
]
# Delete
extern "7z d" [
...args
]
# Extract
extern "7z e" [
...args
]
# Hash
extern "7z h" [
...args
]
# Show information about supported formats
extern "7z i" [
...args
]
# List
extern "7z l" [
...args
]
# Rename
extern "7z rn" [
...args
]
# Test
extern "7z t" [
...args
]
# Update
extern "7z u" [
...args
]
# Extract with full paths
extern "7z x" [
...args
]
# Stop switches parsing
extern "7z" [
...args
]

View File

@@ -0,0 +1,4 @@
extern "7za" [
...args
]

View File

@@ -0,0 +1,4 @@
extern "7zr" [
...args
]

View File

@@ -0,0 +1,17 @@
# Enable or disamble VRDE server or don't change setting
extern "VBoxHeadless on off config" [
--vrde(-v) # Enable or disamble VRDE server or don't change setting
--settingspwfile # Specify file containing setting password
--start-paused # Start VM in paused state
--filename(-f) # File name when recording
...args
]
# Specify file containing setting password
extern "VBoxHeadless" [
--vrde(-v) # Enable or disamble VRDE server or don't change setting
--settingspwfile # Specify file containing setting password
--start-paused # Start VM in paused state
--filename(-f) # File name when recording
...args
]

View File

@@ -0,0 +1,29 @@
# Run separate VM process or attach to a running VM
extern "VBoxSDL" [
--seperate # Run separate VM process or attach to a running VM
--hda # Set temporary first hard disk
--fda # Set temporary first floppy disk
--fullscreen # Start VM in fullscreen mode
--fullscreenresize # Resize guest on fullscreen
--nofstoggle # Forbid switching to/from fullscreen mode
--noresize # Make SDL frame non resizable
--nohostkey # Disable all hoskey combinations
--nohostkeys # Disable specific hostkey combinations
--nograbonclick # Disable mouse/keyboard grabbing on mouse click w/o additions
--detecthostkey # Get hostkey identifier and modifier state
--termacpi # Send APCI power button when closing window
--vrdp # Listen for VRDP connexions on if one of specified
--discardstate # Discard saved state (if present) and revert to last snapshot (if present)
--settingspwfile # Specify file containing setting password
--rowr0 # Enable raw ring 3
--rowr3 # Enable raw ring 0
--patm # Enable PATM
--csam # Enable CSAM
--hwvirtex # Permit usage of VT-x/AMD-V
--norowr0 # Disable raw ring 3
--norowr3 # Disable raw ring 0
--nopatm # Disable PATM
--nocsam # Disable CSAM
--nohwvirtex # Deny usage of VT-x/AMD-V
...args
]

View File

@@ -0,0 +1,6 @@
# Don't show informative messages
extern "a2disconf" [
--quiet(-q) # Don't show informative messages
--purge(-p) # Purge all traces of module
...args
]

View File

@@ -0,0 +1,6 @@
# Don't show informative messages
extern "a2dismod" [
--quiet(-q) # Don't show informative messages
--purge(-p) # Purge all traces of module
...args
]

View File

@@ -0,0 +1,6 @@
# Don't show informative messages
extern "a2dissite" [
--quiet(-q) # Don't show informative messages
--purge(-p) # Purge all traces of module
...args
]

View File

@@ -0,0 +1,5 @@
# Don't show informative messages
extern "a2enconf" [
--quiet(-q) # Don't show informative messages
...args
]

View File

@@ -0,0 +1,5 @@
# Don't show informative messages
extern "a2enmod" [
--quiet(-q) # Don't show informative messages
...args
]

View File

@@ -0,0 +1,5 @@
# Don't show informative messages
extern "a2ensite" [
--quiet(-q) # Don't show informative messages
...args
]

View File

@@ -0,0 +1,13 @@
# Add abbreviation
extern "abbr" [
--add(-a) # Add abbreviation
--query(-q) # Check if an abbreviation exists
--rename(-r) # Rename an abbreviation
--erase(-e) # Erase abbreviation
--show(-s) # Print all abbreviations
--list(-l) # Print all abbreviation names
--global(-g) # Store abbreviation in a global variable
--universal(-U) # Store abbreviation in a universal variable
--help(-h) # Help
...args
]

View File

@@ -0,0 +1,5 @@
# Show usage
extern "abook" [
...args
]

View File

@@ -0,0 +1,5 @@
#
extern "acat" [
...args
]

View File

@@ -0,0 +1,19 @@
# Show battery information
extern "acpi" [
--battery(-b) # Show battery information
--without-battery(-B) # Suppress battery information
--thermal(-t) # Show thermal information
--without-thermal(-T) # Suppress thermal information
--ac-adapter(-a) # Show ac adapter information
--without-ac-adapter(-A) # Suppress ac-adapter information
--everything(-V) # Show every device, overrides above options
--show-empty(-s) # Show non-operational devices
--hide-empty(-S) # Hide non-operational devices
--celcius(-c) # Use celsius as the temperature unit
--fahrenheit(-f) # Use fahrenheit as the temperature unit
--kelvin(-k) # Use kelvin as the temperature unit
--directory(-d) # <dir> path to ACPI info (/proc/acpi)
--help(-h) # Display help and exit
--version(-v) # Output version information and exit
...args
]

View File

@@ -0,0 +1,15 @@
# Do not run passwd to set the password
extern "adduser" [
--disabled-login # Do not run passwd to set the password
--disabled-password # Do not set password, but allow non-password logins (e.g. SSH RSA)
--force-badname # Apply only a weak check for validity of the user/group name
--group # Create a group
--help # Display brief instructions
--no-create-home # Do not create the home directory
--quiet # Suppress informational messages, only show warnings and errors
--debug # Be verbose, most useful if you want to nail down a problem with adduser
--system # Create a system user or group
--add_extra_groups # Add new user to extra groups defined in the configuration file
--version # Display version and copyright information
...args
]

View File

@@ -0,0 +1,4 @@
extern "adiff" [
...args
]

View File

@@ -0,0 +1,6 @@
# Show help and exit
extern "alias" [
--help(-h) # Show help and exit
--save(-s) # Automatically funcsave the alias
...args
]

View File

@@ -0,0 +1,5 @@
#
extern "als" [
...args
]

View File

@@ -0,0 +1,16 @@
# Select the configuration file to use
extern "alsactl" [
--file(-f) # Select the configuration file to use
--lock(-l) # Use a lock file
--no-lock(-L) # Do not use a lock file
--lock-state-file(-O) # Select the state lock file path
--runstate(-r) # Save restore and init state to this file
--remove(-R) # Remove runstate file at first
--env(-E) # Set environment variable
--initfile(-i) # The configuration file for init
--pid-file(-e) # The PID file to use
--background(-b) # Run the task in background
--syslog(-s) # Use syslog for messages
--sched-idle(-c) # Set the process scheduling policy to idle (SCHED_IDLE)
...args
]

View File

@@ -0,0 +1,6 @@
# Show help
extern "alsamixer" [
--help(-h) # Show help
--no-color(-g) # Toggle the using of colors
...args
]

View File

@@ -0,0 +1,19 @@
# Generate more comments about what alternatives is doing
extern "alternatives" [
--verbose # Generate more comments about what alternatives is doing
--help # Give some usage information
--version # Tell which version of alternatives this is
--keep-missing # If new variant doesn't provide some files, keep previous links
--altdir # Specifies the alternatives directory
--admindir # Specifies the administrative directory
--remove # Remove an alternative and all of its associated slave links
--set # Set link group to given path
--config # Open menu to configure link group
--auto # Switch the master symlink name to automatic mode
--display # Display information about the link group
--list # Display information about all link groups
--remove-all # Remove the whole link group name
--add-slave # Add a slave link to an existing alternative
--remove-slave # Remove slave from an existing alternative
...args
]

View File

@@ -0,0 +1,5 @@
#
extern "amixer" [
...args
]

View File

@@ -0,0 +1,5 @@
# Display help and exit
extern "and" [
--help(-h) # Display help and exit
...args
]

View File

@@ -0,0 +1,5 @@
# Control alpha/matte channel of an image [option]
extern "animate" [
...args
]

View File

@@ -0,0 +1,18 @@
# Show version and config
extern "ansible-galaxy" [
--version # Show version and config
--verbose(-v) # Verbose mode (-vvv for more, -vvvv for connection debugging)
...args
]
#
extern "ansible-galaxy download\t'Download collections as tarball" [
...args
]
#
extern "ansible-galaxy init\t'Initialize new role with the base structure" [
...args
]

View File

@@ -0,0 +1,29 @@
# Ask for vault password
extern "ansible-playbook" [
--ask-vault-pass # Ask for vault password
--check(-C) # Just check, don't make any changes
--diff(-D) # Show the differences in files and templates
--flush-cache # Clear the fact cache
--force-handlers # Run handlers even if a task fails
--help(-h) # Shows a help message
--list-hosts # List all matching hosts
--list-tags # List all available tags
--list-tasks # List all tasks that would be executed
--new-vault-password-file # New vault password file for rekey
--output # Output file name for encrypt or decrypt; use - for stdout
--step # Confirm each task before running
--syntax-check # Perform a syntax check on the playbook
--vault-password-file # Vault password file
--verbose(-v) # Verbose mode (-vv/-vvv/-vvvv for more)
--version # Display version and exit
--ask-pass(-k) # Ask for connection password
--connection(-c) # Connection type to use (default=smart)
--timeout(-T) # Set the connection timeout in seconds (default=10)
--ssh-common-args # Specify common arguments to pass to sftp/scp/ssh
--sftp-extra-args # Specify extra arguments to pass to sftp only
--scp-extra-args # Specify extra arguments to pass to scp only
--ssh-extra-args # Specify extra arguments to pass to ssh only
--become(-b) # Run operations with become
--ask-become-pass(-K) # Ask for privilege escalation password
...args
]

View File

@@ -0,0 +1,23 @@
# Display version and exit
extern "ansible-vault" [
...args
]
# Decrypt encrypted file or stdin
extern "ansible-vault decrypt" [
...args
]
# Encrypt a file or stdin
extern "ansible-vault encrypt" [
--prompt(-p) # Prompt for the string to encrypt
...args
]
# Encrypt string
extern "ansible-vault encrypt_string" [
--prompt(-p) # Prompt for the string to encrypt
...args
]

View File

@@ -0,0 +1,24 @@
# Ask for vault password
extern "ansible" [
--ask-vault-pass # Ask for vault password
--check(-C) # Just check, don't make any changes
--diff(-D) # Show the differences in files and templates
--help(-h) # Shows a help message
--new-vault-password-file # New vault password file for rekey
--one-line(-o) # Condense output
--output # Output file name for encrypt or decrypt; use - for stdout
--syntax-check # Perform a syntax check on the playbook
--vault-password-file # Vault password file
--verbose(-v) # Verbose mode (-vv/-vvv/-vvvv for more)
--version # Display version and exit
--ask-pass(-k) # Ask for connection password
--connection(-c) # Connection type to use (default=smart)
--timeout(-T) # Set the connection timeout in seconds (default=10)
--ssh-common-args # Specify common arguments to pass to sftp/scp/ssh
--sftp-extra-args # Specify extra arguments to pass to sftp only
--scp-extra-args # Specify extra arguments to pass to scp only
--ssh-extra-args # Specify extra arguments to pass to ssh only
--become(-b) # Run operations with become
--ask-become-pass(-K) # Ask for privilege escalation password
...args
]

View File

@@ -0,0 +1,8 @@
# print help message and ant help
extern "ant" [
--h # print help message and ant help
--noconfig # suppress sourcing of configuration files
--usejikes # enable use of jikes by default
--execdebug # print ant exec line generated by this launch script
...args
]

View File

@@ -0,0 +1,4 @@
extern "apack" [
...args
]

View File

@@ -0,0 +1,185 @@
# Show help
extern "apk" [
...args
]
# Add packages
extern "apk add" [
--simulate(-s) # Simulate the requested operation
--clean-protected # Don't create .apk-new files
--overlay-from-stdin # Read list of overlay files from stdin
--no-scripts # Don't execute any scripts
--no-commit-hooks # Skip pre/post hook scripts
--initramfs-diskless-boot # Enables options for diskless initramfs boot
--initdb # Initialize database
--upgrade(-u) # Prefer to upgrade package
--latest(-l) # Select latest version of package
--no-chown # Don't change file owner or group
...args
]
# Remove packages
extern "apk del" [
--simulate(-s) # Simulate the requested operation
--clean-protected # Don't create .apk-new files
--overlay-from-stdin # Read list of overlay files from stdin
--no-scripts # Don't execute any scripts
--no-commit-hooks # Skip pre/post hook scripts
--initramfs-diskless-boot # Enables options for diskless initramfs boot
--rdepends(-r) # Remove unneeded dependencies too
...args
]
# Repair package
extern "apk fix" [
--simulate(-s) # Simulate the requested operation
--clean-protected # Don't create .apk-new files
--overlay-from-stdin # Read list of overlay files from stdin
--no-scripts # Don't execute any scripts
--no-commit-hooks # Skip pre/post hook scripts
--initramfs-diskless-boot # Enables options for diskless initramfs boot
--depends(-d) # Fix all dependencies too
--reinstall(-r) # Reinstall the package
--upgrade(-u) # Prefer to upgrade package
--xattr(-x) # Fix packages with broken xattrs
--directory-permissions # Reset all directory permissions
...args
]
# Update repository indexes
extern "apk update" [
...args
]
# Give detailed information about packages
extern "apk info" [
--contents(-L) # List included files
--installed(-e) # Check PACKAGE installed status
--depends(-R) # List the dependencies
--provides(-P) # List virtual packages provided
--rdepends(-r) # List reverse dependencies
--replaces # List packages that PACKAGE might replace
--install-if # List install_if rule
--rinstall-if # List packages having install_if referencing PACKAGE
--webpage(-w) # Print the URL for the upstream
--size(-s) # Show installed size
--description(-d) # Print the description
--license # Print the license
--triggers # Print active triggers
--all(-a) # Print all information
...args
]
# List packages
extern "apk list" [
--installed(-I) # List installed packages only
--orphaned(-O) # List orphaned packages only
--available(-a) # List available packages only
--upgradable(-u) # List upgradable packages only
--origin(-o) # List packages by origin
--depends(-d) # List packages by dependency
--providers(-P) # List packages by provider
...args
]
# Search package
extern "apk search" [
--all(-a) # Show all package versions
--description(-d) # Search package descriptions
--exact(-x) # Require exact match
--origin(-o) # Print origin package name
--rdepends(-r) # Print reverse dependencies
--has-origin # List packages that have the given origin
...args
]
# Upgrade installed packages
extern "apk upgrade" [
--simulate(-s) # Simulate the requested operation
--clean-protected # Don't create .apk-new files
--overlay-from-stdin # Read list of overlay files from stdin
--no-scripts # Don't execute any scripts
--no-commit-hooks # Skip pre/post hook scripts
--initramfs-diskless-boot # Enables options for diskless initramfs boot
--available(-a) # Reset all packages to the provided versions
--latest(-l) # Select latest version of package
--no-self-upgrade # Don't do early upgrade of the apk
--self-upgrade-only # Only do self-upgrade
--ignore # Ignore the upgrade of PACKAGE
--prune # Prune the WORLD by removing packages which are no longer available
...args
]
# Manage local package cache
extern "apk cache" [
--upgrade(-u) # Prefer to upgrade package
--latest(-l) # Select latest version of package
...args
]
# Compare package versions
extern "apk version" [
--indexes(-I) # Print description and versions of indexes
--test(-t) # Compare two given versions
--check(-c) # Check the given version strings
--all(-a) # Consider packages from all repository tags
...args
]
# Create repository index file
extern "apk index" [
--no-warnings # Disable the warning about missing dependencies
...args
]
# Download packages
extern "apk fetch" [
--link(-L) # Create hard links
--recursive(-R) # Fetch all dependencies too
--simulate # Simulate the requested operation
--stdout(-s) # Dump the .apk to stdout
...args
]
# Audit the directories for changes
extern "apk audit" [
--backup # Audit configuration files only
--system # Audit all system files
--check-permissions # Check file permissions too
--recursive(-r) # Descend into directories and audit them as well
--packages # List only the changed packages
...args
]
# Verify package integrity and signature
extern "apk verify" [
...args
]
# Generate graphviz graphs
extern "apk dot" [
--errors # Consider only packages with errors
--installed # Consider only installed packages
...args
]
# Show repository policy for packages
extern "apk policy" [
...args
]
# Show statistics about repositories and installations
extern "apk stats" [
...args
]
# Show checksums of package contents
extern "apk manifest" [
...args
]

View File

@@ -0,0 +1,14 @@
# Display help and exit
extern "apropos" [
--help(-?) # Display help and exit
--usage # Display short usage message
--debug(-d) # Print debugging info
--verbose(-v) # Verbose mode
--regex(-r) # Keyword as regex (default)
--wildcard(-w) # Keyword as wildcards
--exact(-e) # Keyword as exactly match
--version(-V) # Display version and exit
--and(-a) # Match all keywords
--long(-l) # Do not trim output to terminal width
...args
]

View File

@@ -0,0 +1,54 @@
[# Display help and exit
extern "apt-build" [
--help # Display help and exit
--nowrapper # Do not use gcc wrapper
--remove-builddep # Remove build-dep
--no-source # Do not download source
--build-dir # Specify build-dir
--rebuild # Rebuild a package
--reinstall # Rebuild and install an installed package
--patch-strip(-p) # Prefix to strip on patch
--yes(-y) # Assume yes to all questions
--purge # Use purge instead of remove
--noupdate # Do not run update
--version(-v) # Display version and exit
...args
]
# Update list of packages
extern "apt-build update" [
--help # Display help and exit
--nowrapper # Do not use gcc wrapper
--remove-builddep # Remove build-dep
--no-source # Do not download source
--build-dir # Specify build-dir
--rebuild # Rebuild a package
--reinstall # Rebuild and install an installed package
--patch-strip(-p) # Prefix to strip on patch
--yes(-y) # Assume yes to all questions
--purge # Use purge instead of remove
--noupdate # Do not run update
--version(-v) # Display version and exit
...args
]
# Upgrade packages
extern "apt-build upgrade" [
--help # Display help and exit
--nowrapper # Do not use gcc wrapper
--remove-builddep # Remove build-dep
--no-source # Do not download source
--build-dir # Specify build-dir
--rebuild # Rebuild a package
--reinstall # Rebuild and install an installed package
--patch-strip(-p) # Prefix to strip on patch
--yes(-y) # Assume yes to all questions
--purge # Use purge instead of remove
--noupdate # Do not run update
--version(-v) # Display version and exit
...args
]]
[# Rebuild your system
extern "apt-bulid world" [
...args
]]

View File

@@ -0,0 +1,41 @@
# Display help and exit
extern "apt-cache" [
...args
]
# Build apt cache
extern "apt-cache gencaches" [
...args
]
# Show cache statistics
extern "apt-cache stats" [
...args
]
# Show packages in cache
extern "apt-cache dump" [
...args
]
# Print available list
extern "apt-cache dumpavail" [
...args
]
# List unmet dependencies in cache
extern "apt-cache unmet" [
...args
]
# Search full package name
extern "apt-cache search" [
...args
]

View File

@@ -0,0 +1,11 @@
# Display help and exit
extern "apt-cdrom" [
--help(-h) # Display help and exit
--rename(-r) # Rename a disc
--no-mount(-m) # No mounting
--fast(-f) # Fast copy
--thorough(-a) # Thorough package scan
--no-act(-n) # No changes
--version(-v) # Display version and exit
...args
]

View File

@@ -0,0 +1,20 @@
# Display help and exit
extern "apt-config" [
--help(-h) # Display help and exit
--version(-v) # Display version and exit
...args
]
# Access config file from shell
extern "apt-config shell" [
--help(-h) # Display help and exit
--version(-v) # Display version and exit
...args
]
# Dump contents of config file
extern "apt-config dump" [
--help(-h) # Display help and exit
--version(-v) # Display version and exit
...args
]

View File

@@ -0,0 +1,5 @@
# Display help and exit
extern "apt-extracttemplates" [
--help(-h) # Display help and exit
...args
]

View File

@@ -0,0 +1,14 @@
# Display help and exit
extern "apt-file" [
--help(-h) # Display help and exit
--verbose(-v) # Verbose mode
--cdrom-mount(-d) # Use cdrom-mount-point
--ignore-case(-i) # Do not expand pattern
--regexp(-x) # Pattern is regexp
--version(-V) # Display version and exit
--architecture(-a) # Set arch
--package-only(-l) # Only display package name
--fixed-string(-F) # Do not expand pattern
--dummy(-y) # Run in dummy mode
...args
]

View File

@@ -0,0 +1,83 @@
# Display help and exit
extern "apt-ftparchive" [
--help(-h) # Display help and exit
--md5 # Generate MD5 sums
--db(-d) # Use a binary db
--quiet(-q) # Quiet mode
--delink # Perform delinking
--contents # Perform contents generation
--source-override(-s) # Use source override
--readonly # Make caching db readonly
--version(-v) # Display version and exit
...args
]
# Generate package from source
extern "apt-ftparchive packages" [
--help(-h) # Display help and exit
--md5 # Generate MD5 sums
--db(-d) # Use a binary db
--quiet(-q) # Quiet mode
--delink # Perform delinking
--contents # Perform contents generation
--source-override(-s) # Use source override
--readonly # Make caching db readonly
--version(-v) # Display version and exit
...args
]
# Generate source index file
extern "apt-ftparchive sources" [
--help(-h) # Display help and exit
--md5 # Generate MD5 sums
--db(-d) # Use a binary db
--quiet(-q) # Quiet mode
--delink # Perform delinking
--contents # Perform contents generation
--source-override(-s) # Use source override
--readonly # Make caching db readonly
--version(-v) # Display version and exit
...args
]
# Generate contents file
extern "apt-ftparchive contents" [
--help(-h) # Display help and exit
--md5 # Generate MD5 sums
--db(-d) # Use a binary db
--quiet(-q) # Quiet mode
--delink # Perform delinking
--contents # Perform contents generation
--source-override(-s) # Use source override
--readonly # Make caching db readonly
--version(-v) # Display version and exit
...args
]
# Generate release file
extern "apt-ftparchive release" [
--help(-h) # Display help and exit
--md5 # Generate MD5 sums
--db(-d) # Use a binary db
--quiet(-q) # Quiet mode
--delink # Perform delinking
--contents # Perform contents generation
--source-override(-s) # Use source override
--readonly # Make caching db readonly
--version(-v) # Display version and exit
...args
]
# Remove records
extern "apt-ftparchive clean" [
--help(-h) # Display help and exit
--md5 # Generate MD5 sums
--db(-d) # Use a binary db
--quiet(-q) # Quiet mode
--delink # Perform delinking
--contents # Perform contents generation
--source-override(-s) # Use source override
--readonly # Make caching db readonly
--version(-v) # Display version and exit
...args
]

View File

@@ -0,0 +1,89 @@
# Display help and exit
extern "apt-get" [
...args
]
# Update sources
extern "apt-get update" [
...args
]
# Upgrade or install newest packages
extern "apt-get upgrade" [
...args
]
# Use with dselect front-end
extern "apt-get dselect-upgrade" [
...args
]
# Distro upgrade
extern "apt-get dist-upgrade" [
...args
]
# Install one or more packages
extern "apt-get install" [
...args
]
# Display changelog of one or more packages
extern "apt-get changelog" [
...args
]
# Remove and purge one or more packages
extern "apt-get purge" [
...args
]
# Remove one or more packages
extern "apt-get remove" [
...args
]
# Fetch source packages
extern "apt-get source" [
...args
]
# Install/remove packages for dependencies
extern "apt-get build-dep" [
...args
]
# Update cache and check dependencies
extern "apt-get check" [
...args
]
# Clean local caches and packages
extern "apt-get clean" [
...args
]
# Clean packages no longer be downloaded
extern "apt-get autoclean" [
...args
]
# Remove automatically installed packages
extern "apt-get autoremove" [
...args
]

View File

@@ -0,0 +1,11 @@
# Remove a key
extern "apt-key del" [
...args
]
# List trusted keys
extern "apt-key list" [
...args
]

View File

@@ -0,0 +1,181 @@
# Display help and exit
extern "apt-listbugs" [
--help(-h) # Display help and exit
--severity(-s) # Set severity
--tag(-T) # Tags you want to see
--stats(-S) # Bug-status you want to see
--showless(-l) # Ignore bugs in your system
--showgreater(-g) # Ignore newer bugs than upgrade packages
--show-downgrade(-D) # Bugs for downgrade packages
--hostname(-H) # Bug Tracking system
--port(-p) # Specify port for web interface
--release-critical(-R) # Use daily bug report
--index(-I) # Use the raw index.db
--indexdir(-X) # Specify index dir
--pin-priority(-P) # Specify Pin-Priority value
--title # Specify the title of rss
--force-download(-f) # Retrieve fresh bugs
--quiet(-q) # Do not display progress bar
--cache-dir(-c) # Specify local cache dir
--timer(-t) # Specify the expire cache timer
--aptconf(-C) # Specify apt config file
--force-yes(-y) # Assume yes to all questions
--force-no(-n) # Assume no to all questions
...args
]
# Set severity
extern "apt-listbugs critical grave" [
--help(-h) # Display help and exit
--severity(-s) # Set severity
--tag(-T) # Tags you want to see
--stats(-S) # Bug-status you want to see
--showless(-l) # Ignore bugs in your system
--showgreater(-g) # Ignore newer bugs than upgrade packages
--show-downgrade(-D) # Bugs for downgrade packages
--hostname(-H) # Bug Tracking system
--port(-p) # Specify port for web interface
--release-critical(-R) # Use daily bug report
--index(-I) # Use the raw index.db
--indexdir(-X) # Specify index dir
--pin-priority(-P) # Specify Pin-Priority value
--title # Specify the title of rss
--force-download(-f) # Retrieve fresh bugs
--quiet(-q) # Do not display progress bar
--cache-dir(-c) # Specify local cache dir
--timer(-t) # Specify the expire cache timer
--aptconf(-C) # Specify apt config file
--force-yes(-y) # Assume yes to all questions
--force-no(-n) # Assume no to all questions
...args
]
# Bug-status you want to see
extern "apt-listbugs outstanding 'pending upload' resolved done open" [
--help(-h) # Display help and exit
--severity(-s) # Set severity
--tag(-T) # Tags you want to see
--stats(-S) # Bug-status you want to see
--showless(-l) # Ignore bugs in your system
--showgreater(-g) # Ignore newer bugs than upgrade packages
--show-downgrade(-D) # Bugs for downgrade packages
--hostname(-H) # Bug Tracking system
--port(-p) # Specify port for web interface
--release-critical(-R) # Use daily bug report
--index(-I) # Use the raw index.db
--indexdir(-X) # Specify index dir
--pin-priority(-P) # Specify Pin-Priority value
--title # Specify the title of rss
--force-download(-f) # Retrieve fresh bugs
--quiet(-q) # Do not display progress bar
--cache-dir(-c) # Specify local cache dir
--timer(-t) # Specify the expire cache timer
--aptconf(-C) # Specify apt config file
--force-yes(-y) # Assume yes to all questions
--force-no(-n) # Assume no to all questions
...args
]
# Bug Tracking system
extern "apt-listbugs osdn.debian.or.jp" [
--help(-h) # Display help and exit
--severity(-s) # Set severity
--tag(-T) # Tags you want to see
--stats(-S) # Bug-status you want to see
--showless(-l) # Ignore bugs in your system
--showgreater(-g) # Ignore newer bugs than upgrade packages
--show-downgrade(-D) # Bugs for downgrade packages
--hostname(-H) # Bug Tracking system
--port(-p) # Specify port for web interface
--release-critical(-R) # Use daily bug report
--index(-I) # Use the raw index.db
--indexdir(-X) # Specify index dir
--pin-priority(-P) # Specify Pin-Priority value
--title # Specify the title of rss
--force-download(-f) # Retrieve fresh bugs
--quiet(-q) # Do not display progress bar
--cache-dir(-c) # Specify local cache dir
--timer(-t) # Specify the expire cache timer
--aptconf(-C) # Specify apt config file
--force-yes(-y) # Assume yes to all questions
--force-no(-n) # Assume no to all questions
...args
]
# Specify local cache dir
extern "apt-listbugs /var/cache/apt-listbugs/" [
--help(-h) # Display help and exit
--severity(-s) # Set severity
--tag(-T) # Tags you want to see
--stats(-S) # Bug-status you want to see
--showless(-l) # Ignore bugs in your system
--showgreater(-g) # Ignore newer bugs than upgrade packages
--show-downgrade(-D) # Bugs for downgrade packages
--hostname(-H) # Bug Tracking system
--port(-p) # Specify port for web interface
--release-critical(-R) # Use daily bug report
--index(-I) # Use the raw index.db
--indexdir(-X) # Specify index dir
--pin-priority(-P) # Specify Pin-Priority value
--title # Specify the title of rss
--force-download(-f) # Retrieve fresh bugs
--quiet(-q) # Do not display progress bar
--cache-dir(-c) # Specify local cache dir
--timer(-t) # Specify the expire cache timer
--aptconf(-C) # Specify apt config file
--force-yes(-y) # Assume yes to all questions
--force-no(-n) # Assume no to all questions
...args
]
# List bugs from packages
extern "apt-listbugs list" [
--help(-h) # Display help and exit
--severity(-s) # Set severity
--tag(-T) # Tags you want to see
--stats(-S) # Bug-status you want to see
--showless(-l) # Ignore bugs in your system
--showgreater(-g) # Ignore newer bugs than upgrade packages
--show-downgrade(-D) # Bugs for downgrade packages
--hostname(-H) # Bug Tracking system
--port(-p) # Specify port for web interface
--release-critical(-R) # Use daily bug report
--index(-I) # Use the raw index.db
--indexdir(-X) # Specify index dir
--pin-priority(-P) # Specify Pin-Priority value
--title # Specify the title of rss
--force-download(-f) # Retrieve fresh bugs
--quiet(-q) # Do not display progress bar
--cache-dir(-c) # Specify local cache dir
--timer(-t) # Specify the expire cache timer
--aptconf(-C) # Specify apt config file
--force-yes(-y) # Assume yes to all questions
--force-no(-n) # Assume no to all questions
...args
]
# List bugs in rss format
extern "apt-listbugs rss" [
--help(-h) # Display help and exit
--severity(-s) # Set severity
--tag(-T) # Tags you want to see
--stats(-S) # Bug-status you want to see
--showless(-l) # Ignore bugs in your system
--showgreater(-g) # Ignore newer bugs than upgrade packages
--show-downgrade(-D) # Bugs for downgrade packages
--hostname(-H) # Bug Tracking system
--port(-p) # Specify port for web interface
--release-critical(-R) # Use daily bug report
--index(-I) # Use the raw index.db
--indexdir(-X) # Specify index dir
--pin-priority(-P) # Specify Pin-Priority value
--title # Specify the title of rss
--force-download(-f) # Retrieve fresh bugs
--quiet(-q) # Do not display progress bar
--cache-dir(-c) # Specify local cache dir
--timer(-t) # Specify the expire cache timer
--aptconf(-C) # Specify apt config file
--force-yes(-y) # Assume yes to all questions
--force-no(-n) # Assume no to all questions
...args
]

View File

@@ -0,0 +1,25 @@
# Display help and exit
extern "apt-listchanges" [
--help # Display help and exit
--apt # Read filenames from pipe
--verbose(-v) # Verbose mode
--frontend(-f) # Select frontend interface
--confirm(-c) # Ask confirmation
--all(-a) # Display all changelogs
--headers(-h) # Insert header
--debug # Display debug info
...args
]
# Select frontend interface
extern "apt-listchanges pager browser xterm-pager xterm-browser text mail none" [
--help # Display help and exit
--apt # Read filenames from pipe
--verbose(-v) # Verbose mode
--frontend(-f) # Select frontend interface
--confirm(-c) # Ask confirmation
--all(-a) # Display all changelogs
--headers(-h) # Insert header
--debug # Display debug info
...args
]

View File

@@ -0,0 +1,47 @@
# Display help and exit
extern "apt-mark" [
...args
]
# Mark a package as automatically installed
extern "apt-mark auto" [
...args
]
# Mark a package as manually installed
extern "apt-mark manual" [
...args
]
# Hold a package, prevent automatic installation or removal
extern "apt-mark hold" [
...args
]
# Cancel a hold on a package
extern "apt-mark unhold" [
...args
]
# Show automatically installed packages
extern "apt-mark showauto" [
...args
]
# Show manually installed packages
extern "apt-mark showmanual" [
...args
]
# Show held packages
extern "apt-mark showhold" [
...args
]

View File

@@ -0,0 +1,101 @@
# Generate master file
extern "apt-move get" [
...args
]
# Alias for 'get'
extern "apt-move getlocal" [
...args
]
# Move packages to local tree
extern "apt-move move" [
...args
]
# Delete obsolete package files
extern "apt-move delete" [
...args
]
# Build new local files
extern "apt-move packages" [
...args
]
# Rebuild index files
extern "apt-move fsck" [
...args
]
# Move packages from cache to local mirror
extern "apt-move update" [
...args
]
# Alias for 'move delete packages'
extern "apt-move local" [
...args
]
# Alias for 'update'
extern "apt-move localupdate" [
...args
]
# Download package missing from mirror
extern "apt-move mirror" [
...args
]
# Sync packages installed
extern "apt-move sync" [
...args
]
# test $LOCALDIR/.exclude file
extern "apt-move exclude" [
...args
]
# Move file specified on commandline
extern "apt-move movefile" [
...args
]
# List packages that may serve as input to mirrorbin or mirrorsource
extern "apt-move listbin" [
...args
]
# Fetch package from STDIN
extern "apt-move mirrorbin" [
...args
]
# Fetch source package from STDIN
extern "apt-move mirrorsrc" [
...args
]
# Process all packages
extern "apt-move" [
...args
]

View File

@@ -0,0 +1,9 @@
# Display help and exit
extern "apt-proxy-import" [
--help(-h) # Display help and exit
--version(-V) # Display version and exit
--verbose(-v) # Verbose mode
--quiet(-q) # No message to STDOUT
--recursive(-r) # Recurse into subdir
...args
]

View File

@@ -0,0 +1,11 @@
# Display help and exit
extern "apt-rdepends" [
--help # Display help and exit
--build-depends(-b) # Show build dependencies
--dotty(-d) # Generate a dotty graph
--print-state(-p) # Show state of dependencies
--reverse(-r) # List packages depending on
--man # Display man page
--version # Display version and exit
...args
]

View File

@@ -0,0 +1,11 @@
# Probe a CD
extern "apt-setup probe" [
...args
]
# Run in non-interactive mode
extern "apt-setup" [
...args
]

View File

@@ -0,0 +1,14 @@
[# Display help and exit
extern "apt-show-source" [
--help(-h) # Display help and exit
--version-only # Display version and exit
--all(-a) # Print all source packages with version
--verbose(-v) # Verbose mode
...args
]]
[#
extern "" [
...args
]]

View File

@@ -0,0 +1,11 @@
# Display help and exit
extern "apt-show-versions" [
--help(-h) # Display help and exit
--regex(-r) # Using regex
--upgradeable(-u) # Print only upgradeable packages
--allversions(-a) # Print all versions
--brief(-b) # Print package name/distro
--verbose(-v) # Print verbose info
--initialize(-i) # Init or update cache only
...args
]

View File

@@ -0,0 +1,7 @@
# Display help and exit
extern "apt-sortpkgs" [
--help(-h) # Display help and exit
--source(-s) # Use source index field
--version(-v) # Display version and exit
...args
]

View File

@@ -0,0 +1,23 @@
# Display help and exit
extern "apt-spy" [
...args
]
# Debian distribution
extern "apt-spy stable testing unstable" [
...args
]
# Servers in the areas
extern "apt-spy Africa Asia Europe North-America Oceania South-America" [
...args
]
# Update mirror list
extern "apt-spy update" [
...args
]

View File

@@ -0,0 +1,191 @@
# Display help and exit
extern "apt-src" [
--help(-h) # Display help and exit
--build(-b) # Build source packages
--installdebs(-i) # Install after build
--patch(-p) # Patch local changes
--here(-c) # Run on current dir
--upstream-version # Omit debian version
--keep-built(-k) # Do not del built files
--no-delete-source(-n) # Do not del source files
--version # Source tree version
--quiet(-q) # Output to /dev/null
--trace(-t) # Output trace
...args
]
# Update list of source packages
extern "apt-src update" [
--help(-h) # Display help and exit
--build(-b) # Build source packages
--installdebs(-i) # Install after build
--patch(-p) # Patch local changes
--here(-c) # Run on current dir
--upstream-version # Omit debian version
--keep-built(-k) # Do not del built files
--no-delete-source(-n) # Do not del source files
--version # Source tree version
--quiet(-q) # Output to /dev/null
--trace(-t) # Output trace
...args
]
# Install source packages
extern "apt-src install" [
--help(-h) # Display help and exit
--build(-b) # Build source packages
--installdebs(-i) # Install after build
--patch(-p) # Patch local changes
--here(-c) # Run on current dir
--upstream-version # Omit debian version
--keep-built(-k) # Do not del built files
--no-delete-source(-n) # Do not del source files
--version # Source tree version
--quiet(-q) # Output to /dev/null
--trace(-t) # Output trace
...args
]
# Upgrade source packages
extern "apt-src upgrade" [
--help(-h) # Display help and exit
--build(-b) # Build source packages
--installdebs(-i) # Install after build
--patch(-p) # Patch local changes
--here(-c) # Run on current dir
--upstream-version # Omit debian version
--keep-built(-k) # Do not del built files
--no-delete-source(-n) # Do not del source files
--version # Source tree version
--quiet(-q) # Output to /dev/null
--trace(-t) # Output trace
...args
]
# Remove source packages
extern "apt-src remove" [
--help(-h) # Display help and exit
--build(-b) # Build source packages
--installdebs(-i) # Install after build
--patch(-p) # Patch local changes
--here(-c) # Run on current dir
--upstream-version # Omit debian version
--keep-built(-k) # Do not del built files
--no-delete-source(-n) # Do not del source files
--version # Source tree version
--quiet(-q) # Output to /dev/null
--trace(-t) # Output trace
...args
]
# Build source packages
extern "apt-src build" [
--help(-h) # Display help and exit
--build(-b) # Build source packages
--installdebs(-i) # Install after build
--patch(-p) # Patch local changes
--here(-c) # Run on current dir
--upstream-version # Omit debian version
--keep-built(-k) # Do not del built files
--no-delete-source(-n) # Do not del source files
--version # Source tree version
--quiet(-q) # Output to /dev/null
--trace(-t) # Output trace
...args
]
# Clean source packages
extern "apt-src clean" [
--help(-h) # Display help and exit
--build(-b) # Build source packages
--installdebs(-i) # Install after build
--patch(-p) # Patch local changes
--here(-c) # Run on current dir
--upstream-version # Omit debian version
--keep-built(-k) # Do not del built files
--no-delete-source(-n) # Do not del source files
--version # Source tree version
--quiet(-q) # Output to /dev/null
--trace(-t) # Output trace
...args
]
# Detect known source tree
extern "apt-src import" [
--help(-h) # Display help and exit
--build(-b) # Build source packages
--installdebs(-i) # Install after build
--patch(-p) # Patch local changes
--here(-c) # Run on current dir
--upstream-version # Omit debian version
--keep-built(-k) # Do not del built files
--no-delete-source(-n) # Do not del source files
--version # Source tree version
--quiet(-q) # Output to /dev/null
--trace(-t) # Output trace
...args
]
# List installed source package\(s\)
extern "apt-src list" [
--help(-h) # Display help and exit
--build(-b) # Build source packages
--installdebs(-i) # Install after build
--patch(-p) # Patch local changes
--here(-c) # Run on current dir
--upstream-version # Omit debian version
--keep-built(-k) # Do not del built files
--no-delete-source(-n) # Do not del source files
--version # Source tree version
--quiet(-q) # Output to /dev/null
--trace(-t) # Output trace
...args
]
# Root source tree
extern "apt-src location" [
--help(-h) # Display help and exit
--build(-b) # Build source packages
--installdebs(-i) # Install after build
--patch(-p) # Patch local changes
--here(-c) # Run on current dir
--upstream-version # Omit debian version
--keep-built(-k) # Do not del built files
--no-delete-source(-n) # Do not del source files
--version # Source tree version
--quiet(-q) # Output to /dev/null
--trace(-t) # Output trace
...args
]
# Version of source package
extern "apt-src version" [
--help(-h) # Display help and exit
--build(-b) # Build source packages
--installdebs(-i) # Install after build
--patch(-p) # Patch local changes
--here(-c) # Run on current dir
--upstream-version # Omit debian version
--keep-built(-k) # Do not del built files
--no-delete-source(-n) # Do not del source files
--version # Source tree version
--quiet(-q) # Output to /dev/null
--trace(-t) # Output trace
...args
]
# Name of the source package
extern "apt-src name" [
--help(-h) # Display help and exit
--build(-b) # Build source packages
--installdebs(-i) # Install after build
--patch(-p) # Patch local changes
--here(-c) # Run on current dir
--upstream-version # Omit debian version
--keep-built(-k) # Do not del built files
--no-delete-source(-n) # Do not del source files
--version # Source tree version
--quiet(-q) # Output to /dev/null
--trace(-t) # Output trace
...args
]

Some files were not shown because too many files have changed in this diff Show More