From 991a7917ec010080467889b02bcd608c078f6a86 Mon Sep 17 00:00:00 2001 From: Jake Koroman Date: Sun, 21 Jun 2026 13:08:03 -0400 Subject: add fish. --- fish/conf.d/aliases.fish | 15 +++++++++++++++ fish/config.fish | 18 ++++++++++++++++++ fish/fish_variables | 6 ++++++ fish/functions/fish_prompt.fish | 6 ++++++ 4 files changed, 45 insertions(+) create mode 100644 fish/conf.d/aliases.fish create mode 100644 fish/config.fish create mode 100644 fish/fish_variables create mode 100644 fish/functions/fish_prompt.fish diff --git a/fish/conf.d/aliases.fish b/fish/conf.d/aliases.fish new file mode 100644 index 0000000..ec138fd --- /dev/null +++ b/fish/conf.d/aliases.fish @@ -0,0 +1,15 @@ +set ls_default_opts -hN --color=auto --group-directories-first + +function e; command $EDITOR $argv ; end +function ls; command ls $ls_default_opts $argv ; end +function l; command ls -l $ls_default_opts $argv ; end +function ll; command ls -la $ls_default_opts $argv ; end +function gs; command git status $argv ; end +function ga; command git add $argv ; end +function gl; command git log $argv ; end +function glo; command git log --oneline $argv ; end +function cp; command cp -iv $argv ; end +function mv; command mv -iv $argv ; end +function rm; command rm -vI $argv ; end +function mkdir; command mkdir -pv $argv ; end +function ip; command ip --color=auto $argv ; end diff --git a/fish/config.fish b/fish/config.fish new file mode 100644 index 0000000..5f8b8d1 --- /dev/null +++ b/fish/config.fish @@ -0,0 +1,18 @@ +function vi_colemakdh_binds + bind n 'fish_vi_run_count backward-char' + bind e 'fish_vi_run_count down-or-search' + bind i 'fish_vi_run_count up-or-search' + bind o 'fish_vi_run_count forward-char' + + bind j 'fish_vi_run_count forward-word-end' + bind -m insert l end-selection repaint-mode + bind -m insert L beginning-of-line +end + +if status is-interactive + set -g fish_key_bindings fish_vi_key_bindings + vi_colemakdh_binds + + abbr xip doas xbps-install + abbr xrp doas xbps-remove +end diff --git a/fish/fish_variables b/fish/fish_variables new file mode 100644 index 0000000..c230215 --- /dev/null +++ b/fish/fish_variables @@ -0,0 +1,6 @@ +# This file contains fish universal variable definitions. +# VERSION: 3.0 +SETUVAR EDITOR:kak +SETUVAR __fish_initialized:4300 +SETUVAR __fish_webconfig_theme_notification:set\x2dtheme\x2dv1\x2d\x232 +SETUVAR fish_greeting:\x1d diff --git a/fish/functions/fish_prompt.fish b/fish/functions/fish_prompt.fish new file mode 100644 index 0000000..9dff5cd --- /dev/null +++ b/fish/functions/fish_prompt.fish @@ -0,0 +1,6 @@ +function fish_prompt + string join '' -- (set_color blue) (prompt_pwd --full-length-dirs 2) (set_color --reset) ' > ' +end + +function fish_mode_prompt +end -- cgit v1.2.3