aboutsummaryrefslogtreecommitdiffhomepage
path: root/.config/fish
diff options
context:
space:
mode:
Diffstat (limited to '.config/fish')
-rw-r--r--.config/fish/config.fish34
-rw-r--r--.config/fish/functions/256colors.fish5
-rw-r--r--.config/fish/functions/fish_greeting.fish29
-rw-r--r--.config/fish/functions/mkcd.fish9
4 files changed, 77 insertions, 0 deletions
diff --git a/.config/fish/config.fish b/.config/fish/config.fish
new file mode 100644
index 0000000..cdb7b10
--- /dev/null
+++ b/.config/fish/config.fish
@@ -0,0 +1,34 @@
+set -gx LANG 'ja_JP.UTF-8'
+
+set -gx VISUAL vim
+set -gx EDITOR vim
+
+set -gx LD_LIBRARY_PATH "$HOME/Downloads/lib:$HOME/lib:$LD_LIBRARY_PATH"
+
+set -gx PATH "/usr/local/bin:$PATH"
+
+set -gx PATH "$HOME/.cargo/bin:$PATH"
+set -gx PATH "$HOME/bin:$HOME/.local/bin:$PATH"
+
+set -gx PATH "/usr/local/opt/gettext/bin:$PATH"
+
+# To override system-provided Ruby with brewed Ruby
+set -gx PATH "/usr/local/opt/ruby/bin:$PATH"
+
+abbr -a rm rm -i
+abbr -a cp cp -i
+abbr -a mv mv -i
+
+abbr -a e vim
+abbr -a o open
+abbr -a g git
+abbr -a cat bat
+abbr -a find fd
+abbr -a grep rg
+abbr -a ls exa
+abbr -a lsa exa -a
+abbr -a lsl exa -l
+abbr -a lsal exa -al
+abbr -a lsla exa -al
+
+starship init fish | source
diff --git a/.config/fish/functions/256colors.fish b/.config/fish/functions/256colors.fish
new file mode 100644
index 0000000..822447a
--- /dev/null
+++ b/.config/fish/functions/256colors.fish
@@ -0,0 +1,5 @@
+function 256colors
+ for code in (seq 0 255)
+ echo -e '\e[38;05;'$code'm '(printf '%3d' $code)': Test'
+ end
+end
diff --git a/.config/fish/functions/fish_greeting.fish b/.config/fish/functions/fish_greeting.fish
new file mode 100644
index 0000000..0b2d131
--- /dev/null
+++ b/.config/fish/functions/fish_greeting.fish
@@ -0,0 +1,29 @@
+function fish_greeting
+ if [ $COLUMNS -lt 60 ]
+ echo
+ set_color --bold --italic 2188a0; echo ' Hello, World!'
+ set_color normal
+ set_color 166caa; echo ' ~~~~~~~~~~~~~~~~'
+ set_color 556a7d; echo ' ::<>'
+ set_color normal
+ echo
+ return
+ end
+
+ echo
+ set_color --bold
+ set_color 2aa197; echo ' _ _ _ _ __ __ _ _ _'
+ set_color 25949c; echo ' | | | | ___| | | ___ \ \ / /__ _ __| | __| | |'
+ set_color 2188a0; echo ' | |_| |/ _ \ | |/ _ \ \ \ /\ / / _ \| \'__| |/ _` | |'
+ set_color 1d7ea4; echo ' | _ | __/ | | (_) | \ V V / (_) | | | | (_| |_|'
+ set_color 1a75a7; echo ' |_| |_|\___|_|_|\___( ) \_/\_/ \___/|_| |_|\__,_(_)'
+ set_color 166caa; echo ' |/'
+ echo
+ set_color normal
+ set_color 166caa; echo ' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~'
+ set_color 556a7d; echo ' ::<> ::<> ::<>'
+ set_color 556a7d; echo ' ::<> ::<> ::<> ::<>'
+ set_color 556a7d; echo ' ::<> ::<> ::<> ::<>'
+ set_color 556a7d; echo ' ::<> ::<> ::<>'
+ echo
+end
diff --git a/.config/fish/functions/mkcd.fish b/.config/fish/functions/mkcd.fish
new file mode 100644
index 0000000..bba3238
--- /dev/null
+++ b/.config/fish/functions/mkcd.fish
@@ -0,0 +1,9 @@
+function mkcd
+ if [ (count $argv) != 1 ]
+ echo "Usage: mkcd DIR"
+ return 1
+ end
+
+ mkdir -p $argv[1]
+ cd $argv[1]
+end