From c23f627fbce0810f59373ad0382f95447f064507 Mon Sep 17 00:00:00 2001 From: Easton Potokar Date: Wed, 28 Jan 2026 11:53:05 -0500 Subject: [PATCH] Lots of small tweaks --- .config/lazygit/config.yml | 592 ---------------------------------- .config/tmux/tmux.conf | 3 + .config/zsh/.zshrc | 13 +- .config/zsh/completions/_just | 176 ++++++++++ .ssh/config | 13 +- .zshenv | 6 +- 6 files changed, 204 insertions(+), 599 deletions(-) create mode 100644 .config/zsh/completions/_just diff --git a/.config/lazygit/config.yml b/.config/lazygit/config.yml index f98ba6d..e69de29 100644 --- a/.config/lazygit/config.yml +++ b/.config/lazygit/config.yml @@ -1,592 +0,0 @@ -# https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md -# Config relating to the Lazygit UI -gui: - # The number of lines you scroll by when scrolling the main window - scrollHeight: 2 - - # If true, allow scrolling past the bottom of the content in the main window - scrollPastBottom: true - - # See https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md#scroll-off-margin - scrollOffMargin: 2 - - # One of: 'margin' (default) | 'jump' - scrollOffBehavior: margin - - # If true, capture mouse events. - # When mouse events are captured, it's a little harder to select text: e.g. requiring you to hold the option key when on macOS. - mouseEvents: true - - # If true, do not show a warning when discarding changes in the staging view. - skipDiscardChangeWarning: false - - # If true, do not show warning when applying/popping the stash - skipStashWarning: false - - # If true, do not show a warning when attempting to commit without any staged files; instead stage all unstaged files. - skipNoStagedFilesWarning: false - - # If true, do not show a warning when rewording a commit via an external editor - skipRewordInEditorWarning: false - - # Fraction of the total screen width to use for the left side section. You may want to pick a small number (e.g. 0.2) if you're using a narrow screen, so that you can see more of the main section. - # Number from 0 to 1.0. - sidePanelWidth: 0.3333 - - # If true, increase the height of the focused side window; creating an accordion effect. - expandFocusedSidePanel: false - - # The weight of the expanded side panel, relative to the other panels. 2 means - # twice as tall as the other panels. Only relevant if `expandFocusedSidePanel` is true. - expandedSidePanelWeight: 2 - - # Sometimes the main window is split in two (e.g. when the selected file has both staged and unstaged changes). This setting controls how the two sections are split. - # Options are: - # - 'horizontal': split the window horizontally - # - 'vertical': split the window vertically - # - 'flexible': (default) split the window horizontally if the window is wide enough, otherwise split vertically - mainPanelSplitMode: flexible - - # How the window is split when in half screen mode (i.e. after hitting '+' once). - # Possible values: - # - 'left': split the window horizontally (side panel on the left, main view on the right) - # - 'top': split the window vertically (side panel on top, main view below) - enlargedSideViewLocation: left - - # One of 'auto' (default) | 'en' | 'zh-CN' | 'zh-TW' | 'pl' | 'nl' | 'ja' | 'ko' | 'ru' - language: auto - - # Format used when displaying time e.g. commit time. - # Uses Go's time format syntax: https://pkg.go.dev/time#Time.Format - timeFormat: 02 Jan 06 - - # Format used when displaying time if the time is less than 24 hours ago. - # Uses Go's time format syntax: https://pkg.go.dev/time#Time.Format - shortTimeFormat: 3:04PM - - # Config relating to colors and styles. - # See https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md#color-attributes - theme: - # Border color of focused window - activeBorderColor: - - green - - bold - - # Border color of non-focused windows - inactiveBorderColor: - - default - - # Border color of focused window when searching in that window - searchingActiveBorderColor: - - cyan - - bold - - # Color of keybindings help text in the bottom line - optionsTextColor: - - blue - - # Background color of selected line. - # See https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md#highlighting-the-selected-line - selectedLineBgColor: - - blue - - # Background color of selected line when view doesn't have focus. - inactiveViewSelectedLineBgColor: - - bold - - # Foreground color of copied commit - cherryPickedCommitFgColor: - - blue - - # Background color of copied commit - cherryPickedCommitBgColor: - - cyan - - # Foreground color of marked base commit (for rebase) - markedBaseCommitFgColor: - - blue - - # Background color of marked base commit (for rebase) - markedBaseCommitBgColor: - - yellow - - # Color for file with unstaged changes - unstagedChangesColor: - - red - - # Default text color - defaultFgColor: - - default - - # Config relating to the commit length indicator - commitLength: - # If true, show an indicator of commit message length - show: true - - # If true, show the '5 of 20' footer at the bottom of list views - showListFooter: true - - # If true, display the files in the file views as a tree. If false, display the files as a flat list. - # This can be toggled from within Lazygit with the '~' key, but that will not change the default. - showFileTree: false - - # If true, show a random tip in the command log when Lazygit starts - showRandomTip: true - - # If true, show the command log - showCommandLog: true - - # If true, show the bottom line that contains keybinding info and useful buttons. If false, this line will be hidden except to display a loader for an in-progress action. - showBottomLine: true - - # If true, show jump-to-window keybindings in window titles. - showPanelJumps: true - - # Deprecated: use nerdFontsVersion instead - showIcons: false - - # Nerd fonts version to use. - # One of: '2' | '3' | empty string (default) - # If empty, do not show icons. - nerdFontsVersion: "3" - - # If true (default), file icons are shown in the file views. Only relevant if NerdFontsVersion is not empty. - showFileIcons: true - - # Length of author name in (non-expanded) commits view. 2 means show initials only. - commitAuthorShortLength: 2 - - # Length of author name in expanded commits view. 2 means show initials only. - commitAuthorLongLength: 17 - - # Length of commit hash in commits view. 0 shows '*' if NF icons aren't on. - commitHashLength: 8 - - # If true, show commit hashes alongside branch names in the branches view. - showBranchCommitHash: false - - # Whether to show the divergence from the base branch in the branches view. - # One of: 'none' | 'onlyArrow' | 'arrowAndNumber' - showDivergenceFromBaseBranch: none - - # Height of the command log view - commandLogSize: 8 - - # Whether to split the main window when viewing file changes. - # One of: 'auto' | 'always' - # If 'auto', only split the main window when a file has both staged and unstaged changes - splitDiff: auto - - # Default size for focused window. Window size can be changed from within Lazygit with '+' and '_' (but this won't change the default). - # One of: 'normal' (default) | 'half' | 'full' - windowSize: full - - # Window border style. - # One of 'rounded' (default) | 'single' | 'double' | 'hidden' - border: rounded - - # If true, show a seriously epic explosion animation when nuking the working tree. - animateExplosion: true - - # Whether to stack UI components on top of each other. - # One of 'auto' (default) | 'always' | 'never' - portraitMode: auto - - # How things are filtered when typing '/'. - # One of 'substring' (default) | 'fuzzy' - filterMode: substring - - # Config relating to the spinner. - spinner: - # The frames of the spinner animation. - frames: - - '|' - - / - - '-' - - \ - - # The "speed" of the spinner in milliseconds. - rate: 50 - - # Status panel view. - # One of 'dashboard' (default) | 'allBranchesLog' - statusPanelView: dashboard - - # If true, jump to the Files panel after popping a stash - switchToFilesAfterStashPop: true - - # If true, jump to the Files panel after applying a stash - switchToFilesAfterStashApply: true - -# Config relating to git -git: - # See https://github.com/jesseduffield/lazygit/blob/master/docs/Custom_Pagers.md - paging: - # Value of the --color arg in the git diff command. Some pagers want this to be set to 'always' and some want it set to 'never' - colorArg: always - - # e.g. - # diff-so-fancy - # delta --dark --paging=never - # ydiff -p cat -s --wrap --width={{columnWidth}} - pager: "" - - # If true, Lazygit will use whatever pager is specified in `$GIT_PAGER`, `$PAGER`, or your *git config*. If the pager ends with something like ` | less` we will strip that part out, because less doesn't play nice with our rendering approach. If the custom pager uses less under the hood, that will also break rendering (hence the `--paging=never` flag for the `delta` pager). - useConfig: false - - # e.g. 'difft --color=always' - externalDiffCommand: "" - - # Config relating to committing - commit: - # If true, pass '--signoff' flag when committing - signOff: false - - # Automatic WYSIWYG wrapping of the commit message as you type - autoWrapCommitMessage: true - - # If autoWrapCommitMessage is true, the width to wrap to - autoWrapWidth: 72 - - # Config relating to merging - merging: - # If true, run merges in a subprocess so that if a commit message is required, Lazygit will not hang - # Only applicable to unix users. - manualCommit: false - - # Extra args passed to `git merge`, e.g. --no-ff - args: "" - - # The commit message to use for a squash merge commit. Can contain "{{selectedRef}}" and "{{currentBranch}}" placeholders. - squashMergeMessage: Squash merge {{selectedRef}} into {{currentBranch}} - - # list of branches that are considered 'main' branches, used when displaying commits - mainBranches: - - master - - main - - # Prefix to use when skipping hooks. E.g. if set to 'WIP', then pre-commit hooks will be skipped when the commit message starts with 'WIP' - skipHookPrefix: WIP - - # If true, periodically fetch from remote - autoFetch: true - - # If true, periodically refresh files and submodules - autoRefresh: true - - # If true, pass the --all arg to git fetch - fetchAll: true - - # If true, lazygit will automatically stage files that used to have merge - # conflicts but no longer do; and it will also ask you if you want to - # continue a merge or rebase if you've resolved all conflicts. If false, it - # won't do either of these things. - autoStageResolvedConflicts: true - - # Command used when displaying the current branch git log in the main window - branchLogCmd: git log --graph --color=always --abbrev-commit --decorate --date=relative --pretty=medium {{branchName}} -- - - # Command used to display git log of all branches in the main window. - # Deprecated: User `allBranchesLogCmds` instead. - allBranchesLogCmd: git log --graph --all --color=always --abbrev-commit --decorate --date=relative --pretty=medium - - # If true, do not spawn a separate process when using GPG - overrideGpg: false - - # If true, do not allow force pushes - disableForcePushing: false - - # This is broken for some reason - # https://github.com/jesseduffield/lazygit/discussions/3632 - # See https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md#predefined-commit-message-prefix - # commitPrefix: - # # pattern to match on. E.g. for 'feature/AB-123' to match on the AB-123 use "^\\w+\\/(\\w+-\\w+).*" - # pattern: "" - # - # # Replace directive. E.g. for 'feature/AB-123' to start the commit message with 'AB-123 ' use "[$1] " - # replace: "" - - # See https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md#predefined-branch-name-prefix - branchPrefix: "" - - # If true, parse emoji strings in commit messages e.g. render :rocket: as 🚀 - # (This should really be under 'gui', not 'git') - parseEmoji: true - - # Config for showing the log in the commits view - log: - # One of: 'date-order' | 'author-date-order' | 'topo-order' | 'default' - # 'topo-order' makes it easier to read the git log graph, but commits may not - # appear chronologically. See https://git-scm.com/docs/ - # - # Deprecated: Configure this with `Log menu -> Commit sort order` ( in the commits window by default). - order: topo-order - - # This determines whether the git graph is rendered in the commits panel - # One of 'always' | 'never' | 'when-maximised' - # - # Deprecated: Configure this with `Log menu -> Show git graph` ( in the commits window by default). - showGraph: always - - # displays the whole git graph by default in the commits view (equivalent to passing the `--all` argument to `git log`) - showWholeGraph: false - - # When copying commit hashes to the clipboard, truncate them to this - # length. Set to 40 to disable truncation. - truncateCopiedCommitHashesTo: 12 - -# Periodic update checks -update: - # One of: 'prompt' (default) | 'background' | 'never' - method: prompt - - # Period in days between update checks - days: 14 - -# Background refreshes -refresher: - # File/submodule refresh interval in seconds. - # Auto-refresh can be disabled via option 'git.autoRefresh'. - refreshInterval: 10 - - # Re-fetch interval in seconds. - # Auto-fetch can be disabled via option 'git.autoFetch'. - fetchInterval: 60 - -# If true, show a confirmation popup before quitting Lazygit -confirmOnQuit: false - -# If true, exit Lazygit when the user presses escape in a context where there is nothing to cancel/close -quitOnTopLevelReturn: false - -# Config relating to things outside of Lazygit like how files are opened, copying to clipboard, etc -os: - # Command for editing a file. Should contain "{{filename}}". - edit: "" - - # Command for editing a file at a given line number. Should contain - # "{{filename}}", and may optionally contain "{{line}}". - editAtLine: "" - - # Same as EditAtLine, except that the command needs to wait until the - # window is closed. - editAtLineAndWait: "" - - # For opening a directory in an editor - openDirInEditor: "" - - # A built-in preset that sets all of the above settings. Supported presets - # are defined in the getPreset function in editor_presets.go. - editPreset: "" - - # Command for opening a file, as if the file is double-clicked. Should - # contain "{{filename}}", but doesn't support "{{line}}". - open: "" - - # Command for opening a link. Should contain "{{link}}". - openLink: "" - - # EditCommand is the command for editing a file. - # Deprecated: use Edit instead. Note that semantics are different: - # EditCommand is just the command itself, whereas Edit contains a - # "{{filename}}" variable. - editCommand: "" - - # EditCommandTemplate is the command template for editing a file - # Deprecated: use EditAtLine instead. - editCommandTemplate: "" - - # OpenCommand is the command for opening a file - # Deprecated: use Open instead. - openCommand: "" - - # OpenLinkCommand is the command for opening a link - # Deprecated: use OpenLink instead. - openLinkCommand: "" - - # CopyToClipboardCmd is the command for copying to clipboard. - # See https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md#custom-command-for-copying-to-and-pasting-from-clipboard - copyToClipboardCmd: "" - - # ReadFromClipboardCmd is the command for reading the clipboard. - # See https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md#custom-command-for-copying-to-and-pasting-from-clipboard - readFromClipboardCmd: "" - -# If true, don't display introductory popups upon opening Lazygit. -disableStartupPopups: false - -# What to do when opening Lazygit outside of a git repo. -# - 'prompt': (default) ask whether to initialize a new repo or open in the most recent repo -# - 'create': initialize a new repo -# - 'skip': open most recent repo -# - 'quit': exit Lazygit -notARepository: prompt - -# If true, display a confirmation when subprocess terminates. This allows you to view the output of the subprocess before returning to Lazygit. -promptToReturnFromSubprocess: true - -# Keybindings -keybinding: - universal: - quit: q - quit-alt1: - return: - quitWithoutChangingDirectory: Q - togglePanel: - prevItem: - nextItem: - prevItem-alt: k - nextItem-alt: j - prevPage: ',' - nextPage: . - scrollLeft: H - scrollRight: L - gotoTop: < - gotoBottom: '>' - toggleRangeSelect: v - rangeSelectDown: - rangeSelectUp: - prevBlock: - nextBlock: - prevBlock-alt: h - nextBlock-alt: l - nextBlock-alt2: - prevBlock-alt2: - jumpToBlock: - - "1" - - "2" - - "3" - - "4" - - "5" - nextMatch: "n" - prevMatch: "N" - startSearch: / - optionMenu: - optionMenu-alt1: '?' - select: - goInto: - confirm: - confirmInEditor: - remove: d - new: "n" - edit: e - openFile: o - scrollUpMain: - scrollDownMain: - scrollUpMain-alt1: K - scrollDownMain-alt1: J - scrollUpMain-alt2: - scrollDownMain-alt2: - executeShellCommand: ':' - createRebaseOptionsMenu: m - - # 'Files' appended for legacy reasons - pushFiles: P - - # 'Files' appended for legacy reasons - pullFiles: p - refresh: R - createPatchOptionsMenu: - nextTab: ']' - prevTab: '[' - nextScreenMode: + - prevScreenMode: _ - undo: z - redo: - filteringMenu: - diffingMenu: W - diffingMenu-alt: - copyToClipboard: - openRecentRepos: - submitEditorText: - extrasMenu: '@' - toggleWhitespaceInDiffView: - increaseContextInDiffView: '}' - decreaseContextInDiffView: '{' - increaseRenameSimilarityThreshold: ) - decreaseRenameSimilarityThreshold: ( - openDiffTool: - status: - checkForUpdate: u - recentRepos: - allBranchesLogGraph: a - files: - commitChanges: c - commitChangesWithoutHook: w - amendLastCommit: A - commitChangesWithEditor: C - findBaseCommitForFixup: - confirmDiscard: x - ignoreFile: i - refreshFiles: r - stashAllChanges: s - viewStashOptions: S - toggleStagedAll: a - viewResetOptions: D - fetch: f - toggleTreeView: '`' - openMergeTool: M - openStatusFilter: - copyFileInfoToClipboard: "y" - branches: - createPullRequest: o - viewPullRequestOptions: O - copyPullRequestURL: - checkoutBranchByName: c - forceCheckoutBranch: F - rebaseBranch: r - renameBranch: R - mergeIntoCurrentBranch: M - viewGitFlowOptions: i - fastForward: f - createTag: T - pushTag: P - setUpstream: u - fetchRemote: f - sortOrder: s - worktrees: - viewWorktreeOptions: w - commits: - squashDown: s - renameCommit: r - renameCommitWithEditor: R - viewResetOptions: g - markCommitAsFixup: f - createFixupCommit: F - squashAboveCommits: S - moveDownCommit: - moveUpCommit: - amendToCommit: A - resetCommitAuthor: a - pickCommit: p - revertCommit: t - cherryPickCopy: C - pasteCommits: V - markCommitAsBaseForRebase: B - tagCommit: T - checkoutCommit: - resetCherryPick: - copyCommitAttributeToClipboard: "y" - openLogMenu: - openInBrowser: o - viewBisectOptions: b - startInteractiveRebase: i - amendAttribute: - resetAuthor: a - setAuthor: A - addCoAuthor: c - stash: - popStash: g - renameStash: r - commitFiles: - checkoutCommitFile: c - main: - toggleSelectHunk: a - pickBothHunks: b - editSelectHunk: E - submodules: - init: i - update: u - bulkMenu: b - commitMessage: - commitMenu: diff --git a/.config/tmux/tmux.conf b/.config/tmux/tmux.conf index 936a509..36ab71f 100644 --- a/.config/tmux/tmux.conf +++ b/.config/tmux/tmux.conf @@ -17,6 +17,9 @@ bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel 'xc # enable mouse set -g mouse on +# turn on hyperlinks +set -ga terminal-features "*:hyperlinks" + # increase history size set -g history-limit 50000 diff --git a/.config/zsh/.zshrc b/.config/zsh/.zshrc index fab83d2..3664791 100644 --- a/.config/zsh/.zshrc +++ b/.config/zsh/.zshrc @@ -19,7 +19,8 @@ alias lyadm="lazygit --work-tree ~ --git-dir ~/.local/share/yadm/repo.git" alias jyadm="just -g" # Completions -fpath=($HOME/.zsh/completions $fpath) +# fpath=($HOME/.zsh/completions $fpath) +fpath=($XDG_CONFIG_HOME/zsh/completions $fpath) autoload -U compinit; compinit _comp_options+=(globdots) # With hidden @@ -37,6 +38,14 @@ if [ -d /usr/share/doc/fzf ]; then source /usr/share/doc/fzf/examples/key-bindings.zsh fi +# pushover push +function push { + curl -s -F "token=akqmpnoru464pps3g1123pszrpqzyk" \ + -F "user=ugixb16u6s9bicq1ezcnmkxfrje8b6" \ + -F "title=Command Finished" \ + -F "message=$1 Return value: $?" https://api.pushover.net/1/messages.json +} + # ----------------- Replacement for standard tools ----------------- # # ls -> eza aliases # https://gist.github.com/AppleBoiy/04a249b6f64fd0fe1744aff759a0563b @@ -69,7 +78,7 @@ if [ "$(command -v bat)" != "" ]; then export BAT_THEME="base16" export BAT_STYLE="numbers,changes,header" alias cat="bat" - alias -g -- -h='-h 2>&1 | bat --language=help --style=plain' + # alias -g -- -h='-h 2>&1 | bat --language=help --style=plain' fi # direnv hook if [ "$(command -v direnv)" != "" ]; then diff --git a/.config/zsh/completions/_just b/.config/zsh/completions/_just new file mode 100644 index 0000000..843bf93 --- /dev/null +++ b/.config/zsh/completions/_just @@ -0,0 +1,176 @@ +#compdef just + +autoload -U is-at-least + +_just() { + typeset -A opt_args + typeset -a _arguments_options + local ret=1 + + if is-at-least 5.2; then + _arguments_options=(-s -S -C) + else + _arguments_options=(-s -C) + fi + + local context curcontext="$curcontext" state line + local common=( +'--chooser=[Override binary invoked by \`--choose\`]: :_default' \ +'--color=[Print colorful output]: :(auto always never)' \ +'--command-color=[Echo recipe lines in ]: :(black blue cyan green purple red yellow)' \ +'(-E --dotenv-path)--dotenv-filename=[Search for environment file named instead of \`.env\`]: :_default' \ +'-E+[Load as environment file instead of searching for one]: :_files' \ +'--dotenv-path=[Load as environment file instead of searching for one]: :_files' \ +'--dump-format=[Dump justfile as ]:FORMAT:(json just)' \ +'-f+[Use as justfile]: :_files' \ +'--justfile=[Use as justfile]: :_files' \ +'--list-heading=[Print before list]:TEXT:_default' \ +'--list-prefix=[Print before each list item]:TEXT:_default' \ +'*--set=[Override with ]: :(_just_variables)' \ +'--shell=[Invoke to run recipes]: :_default' \ +'*--shell-arg=[Invoke shell with as an argument]: :_default' \ +'--timestamp-format=[Timestamp format string]: :_default' \ +'-d+[Use as working directory. --justfile must also be set]: :_files' \ +'--working-directory=[Use as working directory. --justfile must also be set]: :_files' \ +'*-c+[Run an arbitrary command with the working directory, \`.env\`, overrides, and exports set]: :_default' \ +'*--command=[Run an arbitrary command with the working directory, \`.env\`, overrides, and exports set]: :_default' \ +'--completions=[Print shell completion script for ]:SHELL:(bash elvish fish nushell powershell zsh)' \ +'()-l+[List available recipes]' \ +'()--list=[List available recipes]' \ +'--request=[Execute . For internal testing purposes only. May be changed or removed at any time.]: :_default' \ +'-s+[Show recipe at ]: :(_just_commands)' \ +'--show=[Show recipe at ]: :(_just_commands)' \ +'--check[Run \`--fmt\` in '\''check'\'' mode. Exits with 0 if justfile is formatted correctly. Exits with 1 and prints a diff if formatting is required.]' \ +'--clear-shell-args[Clear shell arguments]' \ +'(-q --quiet)-n[Print what just would do without doing it]' \ +'(-q --quiet)--dry-run[Print what just would do without doing it]' \ +'--explain[Print recipe doc comment before running it]' \ +'(-f --justfile -d --working-directory)-g[Use global justfile]' \ +'(-f --justfile -d --working-directory)--global-justfile[Use global justfile]' \ +'--highlight[Highlight echoed recipe lines in bold]' \ +'--list-submodules[List recipes in submodules]' \ +'--no-aliases[Don'\''t show aliases in list]' \ +'--no-deps[Don'\''t run recipe dependencies]' \ +'--no-dotenv[Don'\''t load \`.env\` file]' \ +'--no-highlight[Don'\''t highlight echoed recipe lines in bold]' \ +'--one[Forbid multiple recipes from being invoked on the command line]' \ +'(-n --dry-run)-q[Suppress all output]' \ +'(-n --dry-run)--quiet[Suppress all output]' \ +'--allow-missing[Ignore missing recipe and module errors]' \ +'--shell-command[Invoke with the shell used to run recipe lines and backticks]' \ +'--timestamp[Print recipe command timestamps]' \ +'-u[Return list and summary entries in source order]' \ +'--unsorted[Return list and summary entries in source order]' \ +'--unstable[Enable unstable features]' \ +'*-v[Use verbose output]' \ +'*--verbose[Use verbose output]' \ +'--yes[Automatically confirm all recipes.]' \ +'--changelog[Print changelog]' \ +'--choose[Select one or more recipes to run using a binary chooser. If \`--chooser\` is not passed the chooser defaults to the value of \$JUST_CHOOSER, falling back to \`fzf\`]' \ +'--dump[Print justfile]' \ +'-e[Edit justfile with editor given by \$VISUAL or \$EDITOR, falling back to \`vim\`]' \ +'--edit[Edit justfile with editor given by \$VISUAL or \$EDITOR, falling back to \`vim\`]' \ +'--evaluate[Evaluate and print all variables. If a variable name is given as an argument, only print that variable'\''s value.]' \ +'--fmt[Format and overwrite justfile]' \ +'--groups[List recipe groups]' \ +'--init[Initialize new justfile in project root]' \ +'--man[Print man page]' \ +'--summary[List names of available recipes]' \ +'--variables[List names of variables]' \ +'-h[Print help]' \ +'--help[Print help]' \ +'-V[Print version]' \ +'--version[Print version]' \ +) + + _arguments "${_arguments_options[@]}" $common \ + '1: :_just_commands' \ + '*: :->args' \ + && ret=0 + + case $state in + args) + curcontext="${curcontext%:*}-${words[2]}:" + + local lastarg=${words[${#words}]} + local recipe + + local cmds; cmds=( + ${(s: :)$(_call_program commands just --summary)} + ) + + # Find first recipe name + for ((i = 2; i < $#words; i++ )) do + if [[ ${cmds[(I)${words[i]}]} -gt 0 ]]; then + recipe=${words[i]} + break + fi + done + + if [[ $lastarg = */* ]]; then + # Arguments contain slash would be recognised as a file + _arguments -s -S $common '*:: :_files' + elif [[ $lastarg = *=* ]]; then + # Arguments contain equal would be recognised as a variable + _message "value" + elif [[ $recipe ]]; then + # Show usage message + _message "`just --show $recipe`" + # Or complete with other commands + #_arguments -s -S $common '*:: :_just_commands' + else + _arguments -s -S $common '*:: :_just_commands' + fi + ;; + esac + + return ret + +} + +(( $+functions[_just_commands] )) || +_just_commands() { + [[ $PREFIX = -* ]] && return 1 + integer ret=1 + local variables; variables=( + ${(s: :)$(_call_program commands just --variables)} + ) + local commands; commands=( + ${${${(M)"${(f)$(_call_program commands just --list)}":# *}/ ##/}/ ##/:Args: } + ) + + if compset -P '*='; then + case "${${words[-1]%=*}#*=}" in + *) _message 'value' && ret=0 ;; + esac + else + _describe -t variables 'variables' variables -qS "=" && ret=0 + _describe -t commands 'just commands' commands "$@" + fi + +} + +if [ "$funcstack[1]" = "_just" ]; then + (( $+functions[_just_variables] )) || +_just_variables() { + [[ $PREFIX = -* ]] && return 1 + integer ret=1 + local variables; variables=( + ${(s: :)$(_call_program commands just --variables)} + ) + + if compset -P '*='; then + case "${${words[-1]%=*}#*=}" in + *) _message 'value' && ret=0 ;; + esac + else + _describe -t variables 'variables' variables && ret=0 + fi + + return ret +} + +_just "$@" +else + compdef _just just +fi diff --git a/.ssh/config b/.ssh/config index a534c2d..984cd0b 100644 --- a/.ssh/config +++ b/.ssh/config @@ -33,8 +33,17 @@ Host bb_aqua HostName bitbucket.org IdentityFile ~/.ssh/bb_aqua +Host bitbucket.org-aquatonomy + HostName bitbucket.org + IdentityFile ~/.ssh/bb_aqua + + Host nrec HostName atr-share.rec.ri.cmu.edu User epotokar -# Host * -# ForwardX11 yes + +Host aqua + ProxyJump work + HostName 192.168.42.2 + User easton + diff --git a/.zshenv b/.zshenv index 6cd9366..4010e11 100644 --- a/.zshenv +++ b/.zshenv @@ -8,7 +8,7 @@ export EDITOR="nvim" export VISUAL="nvim" # local bin -[ -d "$HOME/.local/bin" ] && export PATH="$PATH:$HOME/.local/bin" +[ -d "$HOME/.local/bin" ] && export PATH="$HOME/.local/bin:$PATH" # nvim manager [ -d "$HOME/.local/share/bob" ] && export PATH="$PATH:$HOME/.local/share/bob/nvim-bin" # cargo @@ -18,8 +18,8 @@ fnm=$(command -v fnm) [ -d "$HOME/.nix-profile" ] && . $HOME/.nix-profile/etc/profile.d/nix.sh [ -d "$HOME/.pixi" ] && export PATH="$HOME/.pixi/bin:$PATH" -export VCPKG_ROOT=~/.vcpkg -export PATH=$VCPKG_ROOT:$PATH +# export VCPKG_ROOT=~/.vcpkg +# export PATH=$VCPKG_ROOT:$PATH # cmake