dotfiles/.config/fish/config.fish

49 lines
753 B
Fish
Raw Normal View History

2021-03-14 18:12:50 +01:00
# activate usable-mode
fish_vi_key_bindings
# ALIASES
alias clip="xclip -sel clip"
2021-04-13 01:06:56 +02:00
alias nv="nvim"
2021-08-20 19:10:23 +02:00
2021-03-14 18:12:50 +01:00
function rbg
2022-05-08 21:19:06 +02:00
$argv &>/dev/null &
2021-03-14 18:12:50 +01:00
end
2021-03-27 18:56:46 +01:00
function rbgd
rbg $argv
disown
end
2022-05-08 21:19:06 +02:00
function !!
2021-03-14 18:12:50 +01:00
eval $history[1]
end
function mkdircd
mkdir $argv[1]
cd $argv[1]
end
2021-04-13 01:06:56 +02:00
function ifpresent
2022-05-08 21:19:06 +02:00
if which $argv[1] &>/dev/null
2021-04-13 01:06:56 +02:00
eval $argv[2..-1]
end
end
function todos
rg -i -H todo
end
2021-12-27 17:15:42 +01:00
# custom title
functions -e fish_title
function fish_title
echo (prompt_pwd) '|' (set -q argv[1] && echo $argv[1] || status current-command)
end
2021-04-13 01:06:56 +02:00
# initialization stuff
ifpresent zoxide 'zoxide init fish | source'
ifpresent cod 'cod init %self fish | source'
ifpresent opam 'eval (opam env)'
2021-04-16 01:44:39 +02:00
ifpresent navi 'navi widget fish | source'
2021-03-14 18:12:50 +01:00