mirror of
https://github.com/kp2pml30/dotfiles.git
synced 2026-02-17 07:44:41 +04:00
update to universalvars
This commit is contained in:
parent
9b79d32c60
commit
8971348f5b
3 changed files with 33 additions and 13 deletions
1
README.md
Normal file
1
README.md
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
fish `scrap-default-tool-paths` to update paths and completions (persists after a restart)
|
||||||
|
|
@ -32,18 +32,18 @@ if status is-interactive
|
||||||
zoxide init fish | source
|
zoxide init fish | source
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if command -v poetry > /dev/null
|
#if test -f ~/.ghcup/env
|
||||||
poetry completions fish | source
|
# bass source ~/.ghcup/env
|
||||||
end
|
#end
|
||||||
if test -f ~/.ghcup/env
|
#if test -x ~/.rbenv/bin/rbenv
|
||||||
bass source ~/.ghcup/env
|
# ~/.rbenv/bin/rbenv init - fish | source
|
||||||
end
|
#end
|
||||||
if test -x ~/.rbenv/bin/rbenv
|
#if test -f ~/.opam/opam-init/init.fish
|
||||||
~/.rbenv/bin/rbenv init - fish | source
|
# source ~/.opam/opam-init/init.fish
|
||||||
end
|
#end
|
||||||
if test -f ~/.opam/opam-init/init.fish
|
|
||||||
source ~/.opam/opam-init/init.fish
|
|
||||||
end
|
|
||||||
alias clear="printf '\033[2J\033[3J\033[1;1H'"
|
alias clear="printf '\033[2J\033[3J\033[1;1H'"
|
||||||
export PATH="$PATH:$HOME/.bin:$HOME/.local/bin"
|
export PATH="$PATH:$KP2PATH"
|
||||||
|
if set -uq KP2COMPLETIONS
|
||||||
|
eval "$KP2COMPLETIONS"
|
||||||
|
end
|
||||||
bass source ~/.bashrc
|
bass source ~/.bashrc
|
||||||
|
|
|
||||||
19
home/.config/fish/functions/scrap-default-tool-paths.fish
Normal file
19
home/.config/fish/functions/scrap-default-tool-paths.fish
Normal file
|
|
@ -0,0 +1,19 @@
|
||||||
|
function 'scrap-default-tool-paths'
|
||||||
|
set -le NP
|
||||||
|
for dir in "$HOME/.cargo/bin" "$HOME/.local/bin" "$HOME/.bin" "$HOME/.ghcup/bin" "$HOME/.cabal/bin"
|
||||||
|
if test -d "$dir"
|
||||||
|
echo "$dir exists"
|
||||||
|
set -a NP "$dir"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
echo "found path is $NP"
|
||||||
|
set -U KP2PATH "$NP"
|
||||||
|
|
||||||
|
set -l IFS ''
|
||||||
|
set -le COMPLETIONS
|
||||||
|
if command -v poetry > /dev/null
|
||||||
|
set -l out (poetry completions fish)
|
||||||
|
set COMPLETIONS "$COMPLETIONS"\n"$out"
|
||||||
|
end
|
||||||
|
set -U KP2COMPLETIONS "$COMPLETIONS"
|
||||||
|
end
|
||||||
Loading…
Add table
Add a link
Reference in a new issue