···11+MIT License
22+33+Copyright (c) 2021-Present Jeff Yang
44+55+Permission is hereby granted, free of charge, to any person obtaining a copy
66+of this software and associated documentation files (the "Software"), to deal
77+in the Software without restriction, including without limitation the rights
88+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
99+copies of the Software, and to permit persons to whom the Software is
1010+furnished to do so, subject to the following conditions:
1111+1212+The above copyright notice and this permission notice shall be included in all
1313+copies or substantial portions of the Software.
1414+1515+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1616+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1717+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1818+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1919+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
2020+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2121+SOFTWARE.
···11+#!/usr/bin/env fish
22+33+# directory navigation
44+abbr -a .. "cd .."
55+abbr -a ... "cd ../.."
66+abbr -a .... "cd ../../.."
77+abbr -a ..... "cd ../../../.."
88+99+# some shortcuts
1010+abbr -a c "clear"
1111+abbr -a rem "rm -rf"
1212+1313+# npm shortcuts
1414+abbr -a n "npm"
1515+abbr -a p "pnpm"
1616+abbr -a y "yarn"
1717+1818+# python shortcuts
1919+abbr -a py "python3"
2020+abbr -a pt "pytest"
2121+2222+# rust shortcuts
2323+abbr -a co "cargo"
2424+2525+# deno shortcuts
2626+abbr -a d "deno"
2727+2828+# git shortcuts
2929+abbr -a gs "git status"
3030+abbr -a ga "git add"
3131+abbr -a gc "git commit"
3232+abbr -a gb "git branch"
3333+abbr -a gd "git diff"
3434+abbr -a gcl "git clone"
3535+abbr -a gco "git checkout"
3636+abbr -a gp "git push"
3737+abbr -a gl "git pull"
3838+abbr -a gt "git tag"
3939+abbr -a gm "git merge"
4040+abbr -a gf "git fetch"
4141+abbr -a gr "git rebase"
4242+abbr -a gg "git log --graph --pretty=format:\"%C(bold red)%h%Creset -%C(bold yellow)%d%Creset %s %C(bold green)(%cr) %C(bold blue)<%an>%Creset %C(yellow)%ad%Creset\" --abbrev-commit --date=short"
4343+abbr -a ggr "git log --reverse --pretty=format:\"%C(bold red)%h%Creset -%C(bold yellow)%d%Creset %s %C(bold green)(%cr) %C(bold blue)<%an>%Creset %C(yellow)%ad%Creset\" --abbrev-commit --date=short"
4444+4545+# dotfiles
4646+abbr -a dot "cd ~/.dotfiles"
4747+abbr -a rl "source $FISH_CONFIG"
4848+4949+# recursively delete .DS_Store
5050+abbr -a dds "find . -name \"*.DS_Store\" -type f -ls -delete"
5151+5252+# recursively delete node_modules
5353+abbr -a nodemodules "find . -type d -name \"node_modules\" -exec rm -rf \"{}\" +"
+25
fishrc.sh
···11+#!/usr/bin/env fish
22+33+set -gx EDITOR code
44+set -gx DOTFILES_PATH $HOME/.dotfiles
55+set -gx XDG_CONFIG_HOME $HOME/.config
66+set -gx XDG_CACHE_HOME $HOME/.cache
77+set -gx STARSHIP_CONFIG $DOTFILES_PATH/starship.toml
88+set -gx FISH_CONFIG $XDG_CONFIG_HOME/fish/config.fish
99+set -gx TERM xterm-256color
1010+set -gx fish_color_command 00ff00
1111+1212+fish_add_path $HOME/.cargo/bin
1313+fish_add_path $HOME/.deno/bin
1414+1515+source $DOTFILES_PATH/aliases.sh
1616+1717+# mac or linux
1818+switch (uname)
1919+ case Linux
2020+ echo "> Linux profile $FISH_CONFIG loaded."
2121+ case Darwin
2222+ echo "> macOS profile $FISH_CONFIG loaded."
2323+end
2424+2525+starship init fish | source