diff options
author | Matan Kushner <hello@matchai.me> | 2019-10-04 22:30:46 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-04 22:30:46 +0900 |
commit | 05210b9510b797f7738d5b2d51e8a6877f2d5283 (patch) | |
tree | 7399401dba9373f61035dbbd055f4137cd20f705 /src/init/starship.fish | |
parent | e90a3768da7882db092b38d141cf8e19fabbee56 (diff) |
refactor: Go from Rust workspaces to a package with nested packages (#480)
Diffstat (limited to 'src/init/starship.fish')
-rw-r--r-- | src/init/starship.fish | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/init/starship.fish b/src/init/starship.fish new file mode 100644 index 000000000..b2e88e5ee --- /dev/null +++ b/src/init/starship.fish @@ -0,0 +1,15 @@ +function fish_prompt + switch "$fish_key_bindings" + case fish_hybrid_key_bindings fish_vi_key_bindings + set keymap "$fish_bind_mode" + case '*' + set keymap insert + end + set -l exit_code $status + # Account for changes in variable name between v2.7 and v3.0 + set -l CMD_DURATION "$CMD_DURATION$cmd_duration" + set -l starship_duration (math --scale=0 "$CMD_DURATION / 1000") + ::STARSHIP:: prompt --status=$exit_code --keymap=$keymap --cmd-duration=$starship_duration --jobs=(count (jobs -p)) +end +function fish_mode_prompt; end +export STARSHIP_SHELL="fish" |