mirror of https://github.com/mitchell/dotfiles.git
Make prompt check for program before getting version;
remove rbenv setup; add asdf config
This commit is contained in:
parent
d21b209670
commit
75adf1cb0a
|
@ -8,14 +8,13 @@ set -gx PATH $PATH $GOBIN \
|
||||||
$HOME/Documents/scripts \
|
$HOME/Documents/scripts \
|
||||||
$HOME/Documents/flutter/bin \
|
$HOME/Documents/flutter/bin \
|
||||||
$HOME/.cargo/bin \
|
$HOME/.cargo/bin \
|
||||||
$HOME/.rbenv/versions/2.7.0/bin \
|
|
||||||
$HOME/.dotnet/tools
|
$HOME/.dotnet/tools
|
||||||
|
|
||||||
set -g fish_escape_delay_ms 10
|
set -g fish_escape_delay_ms 10
|
||||||
|
|
||||||
kitty + complete setup fish | source
|
kitty + complete setup fish | source
|
||||||
|
|
||||||
status --is-interactive; and source (rbenv init -|psub)
|
source (brew --prefix asdf)/asdf.fish
|
||||||
|
|
||||||
# The next line updates PATH for the Google Cloud SDK.
|
# The next line updates PATH for the Google Cloud SDK.
|
||||||
# if test -f '/Users/m/Documents/google-cloud-sdk/path.fish.inc'; source '/Users/m/Documents/google-cloud-sdk/path.fish.inc'; end
|
# if test -f '/Users/m/Documents/google-cloud-sdk/path.fish.inc'; source '/Users/m/Documents/google-cloud-sdk/path.fish.inc'; end
|
||||||
|
|
|
@ -96,13 +96,13 @@ function fish_prompt --description 'Write out the prompt'
|
||||||
end
|
end
|
||||||
|
|
||||||
# Set go version, by existence of go mod or dep files
|
# Set go version, by existence of go mod or dep files
|
||||||
if test -e ./go.mod; or test -e ./Gopkg.toml
|
if test -e ./go.mod; or test -e ./Gopkg.toml; and which go > /dev/null
|
||||||
set -l version_str (string match -r 'go\d+\.\d+\.?\d*' (go version))
|
set -l version_str (string match -r 'go\d+\.\d+\.?\d*' (go version))
|
||||||
set go_version ' with ' (set_color 8eadaf) $version_str (set_color normal)
|
set go_version ' with ' (set_color 8eadaf) $version_str (set_color normal)
|
||||||
end
|
end
|
||||||
|
|
||||||
# Set docker version, by existence of Dockerfile
|
# Set docker version, by existence of Dockerfile
|
||||||
if test -e ./Dockerfile
|
if test -e ./Dockerfile; and which docker > /dev/null
|
||||||
set -l version_str (string match -r '\d+\.\d+\.?\d*' (docker --version))
|
set -l version_str (string match -r '\d+\.\d+\.?\d*' (docker --version))
|
||||||
set docker_version ' on ' (set_color blue) 'docker' $version_str (set_color normal)
|
set docker_version ' on ' (set_color blue) 'docker' $version_str (set_color normal)
|
||||||
end
|
end
|
||||||
|
@ -113,24 +113,24 @@ function fish_prompt --description 'Write out the prompt'
|
||||||
end
|
end
|
||||||
|
|
||||||
# Set node (and ts) version, based on existance of package.json (and tsconfig.json)
|
# Set node (and ts) version, based on existance of package.json (and tsconfig.json)
|
||||||
if test -e ./package.json
|
if test -e ./package.json; and which node > /dev/null
|
||||||
set -l version_str (string sub -s 2 (node -v))
|
set -l version_str (string sub -s 2 (node -v))
|
||||||
set node_version ' with ' (set_color brgreen) 'node' $version_str (set_color normal)
|
set node_version ' with ' (set_color brgreen) 'node' $version_str (set_color normal)
|
||||||
|
|
||||||
if test -e ./tsconfig.json
|
if test -e ./tsconfig.json; and which tsc > /dev/null
|
||||||
set -l version_str (string match -r '\d+\.\d+\.?\d*' (tsc -v))
|
set -l version_str (string match -r '\d+\.\d+\.?\d*' (tsc -v))
|
||||||
set node_version $node_version ' and ' (set_color cyan) 'ts' $version_str (set_color normal)
|
set node_version $node_version ' and ' (set_color cyan) 'ts' $version_str (set_color normal)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# Set elixir version, based on existance of mix.exs
|
# Set elixir version, based on existance of mix.exs
|
||||||
if test -e ./mix.exs
|
if test -e ./mix.exs; and which elixir > /dev/null
|
||||||
set -l version_str (string sub -s 8 (string match -r 'Elixir \d+\.\d+\.?\d*' (elixir -v)))
|
set -l version_str (string sub -s 8 (string match -r 'Elixir \d+\.\d+\.?\d*' (elixir -v)))
|
||||||
set ex_version ' with ' (set_color magenta) 'ex' $version_str (set_color normal)
|
set ex_version ' with ' (set_color magenta) 'ex' $version_str (set_color normal)
|
||||||
end
|
end
|
||||||
|
|
||||||
# Set dart version, based on existances of pubspec.yaml
|
# Set dart version, based on existances of pubspec.yaml
|
||||||
if test -e ./pubspec.yaml
|
if test -e ./pubspec.yaml; and which dart > /dev/null
|
||||||
set -l version_str (string match -r '\d+\.\d+\.?\d*' (dart --version 2>| cat))
|
set -l version_str (string match -r '\d+\.\d+\.?\d*' (dart --version 2>| cat))
|
||||||
set dart_version ' with ' (set_color brblue) 'dart' $version_str (set_color normal)
|
set dart_version ' with ' (set_color brblue) 'dart' $version_str (set_color normal)
|
||||||
end
|
end
|
||||||
|
|
|
@ -6,10 +6,10 @@
|
||||||
#: individual font faces and even specify special fonts for particular
|
#: individual font faces and even specify special fonts for particular
|
||||||
#: characters.
|
#: characters.
|
||||||
|
|
||||||
font_family Ligalex Mono
|
font_family JetBrains Mono
|
||||||
bold_font Ligalex Mono Bold
|
bold_font JetBrains Mono Bold
|
||||||
italic_font Ligalex Mono Italic
|
italic_font JetBrains Mono Italic
|
||||||
bold_italic_font Ligalex Mono Bold Italic
|
bold_italic_font JetBrains Mono Bold Italic
|
||||||
|
|
||||||
#: You can specify different fonts for the bold/italic/bold-italic
|
#: You can specify different fonts for the bold/italic/bold-italic
|
||||||
#: variants. To get a full list of supported fonts use the `kitty
|
#: variants. To get a full list of supported fonts use the `kitty
|
||||||
|
@ -23,7 +23,7 @@ bold_italic_font Ligalex Mono Bold Italic
|
||||||
#: italic_font Operator Mono Book Italic
|
#: italic_font Operator Mono Book Italic
|
||||||
#: bold_italic_font Operator Mono Medium Italic
|
#: bold_italic_font Operator Mono Medium Italic
|
||||||
|
|
||||||
font_size 12.0
|
font_size 13.0
|
||||||
|
|
||||||
#: Font size (in pts)
|
#: Font size (in pts)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue