1
0
Fork 0
dotfiles/fish/config.fish

67 lines
1.3 KiB
Fish
Raw Normal View History

2021-04-24 17:30:03 -07:00
#!/usr/bin/fish
2022-07-09 08:47:29 -07:00
2022-10-08 10:11:20 -07:00
set fish_greeting
set --export GOPATH "/home/mark/Documents/go"
2022-11-03 10:54:44 -07:00
set --export TEXINPUTS "/home/mark/Documents/latex"
2022-07-09 08:47:29 -07:00
# Git aliases
2021-04-24 17:30:03 -07:00
alias glog "git log --oneline --all --graph"
2022-07-09 08:47:29 -07:00
# Misc aliases
2021-04-24 17:30:03 -07:00
alias icat "kitty +kitten icat --align left"
2022-07-09 08:47:29 -07:00
alias ls lsd
2021-04-24 17:30:03 -07:00
2022-11-03 10:54:44 -07:00
alias !! $history[1]
2021-04-24 17:30:03 -07:00
2022-07-09 08:47:29 -07:00
# Python aliases
function mkvenv \
--description "Make a python venv"
# mkvenv <path>: make venv at path
# mkvenv <path> <prompt>: make venv at path and set prompt.
if test (count $argv) -eq 2
2022-07-09 08:52:29 -07:00
echo -n "Making virtualenv at "
set_color green
echo -n $argv[1]
set_color normal
echo -n " with prompt "
2022-07-09 08:47:29 -07:00
set_color "green"
echo -n $argv[2]
set_color normal
echo
python -m venv --prompt=$argv[2] $argv[1]
2022-07-09 08:52:29 -07:00
2022-07-09 08:47:29 -07:00
else if test (count $argv) -eq 1
echo -n "Making virtualenv at "
set_color green
echo -n $argv[1]
set_color normal
echo
2021-04-24 17:30:03 -07:00
2022-07-09 08:47:29 -07:00
python -m venv $argv[1]
2022-07-09 08:52:29 -07:00
2022-07-09 08:47:29 -07:00
else
echo "Invalid number of arguments."
end
end
2021-04-24 17:30:03 -07:00
2022-07-09 08:47:29 -07:00
function venvon \
--description "Activate a python venv. If no args are provided, assume path is 'venv'"
if test (count $argv) -eq 0
source venv/bin/activate.fish
else if test (count $argv) -eq 1
source $argv[1]/bin/activate.fish
else
echo "Invalid number of arguments."
end
end
# Enable kitty command completion
2022-10-08 10:11:20 -07:00
kitty + complete setup fish | source