modifications to support windows
This commit is contained in:
parent
671acaa74f
commit
48766a9a7b
8 changed files with 44 additions and 103 deletions
|
@ -1,4 +1,8 @@
|
|||
#!/bin/sh
|
||||
|
||||
if [ "${COLORS_SOURCED:-false}" = false ]; then
|
||||
COLORS_SOURCED=true
|
||||
|
||||
# base16-shell (https://github.com/chriskempson/base16-shell)
|
||||
# Base16 Shell template by Chris Kempson (http://chriskempson.com)
|
||||
COLOR_SCHEME="${COLOR_SCHEME:-onedark}"
|
||||
|
@ -154,3 +158,5 @@ unset color20
|
|||
unset color21
|
||||
unset color_foreground
|
||||
unset color_background
|
||||
|
||||
fi
|
||||
|
|
|
@ -3,6 +3,12 @@
|
|||
# This file should be compatible with standard sh
|
||||
# shellcheck disable=SC2034
|
||||
|
||||
if ! [ "${SHELL_ENV_LOADED:-}" = true ]; then
|
||||
|
||||
echo "Sourcing env"
|
||||
|
||||
export SHELL_ENV_LOADED=true
|
||||
|
||||
# path_append from https://superuser.com/questions/39751/add-directory-to-path-if-its-not-already-there
|
||||
# checks if a path is already in the PATH and if it exists
|
||||
path_append() {
|
||||
|
@ -77,6 +83,7 @@ export VISUAL="$EDITOR"
|
|||
# Tell zellij to auto attach by default instead of opening a new session
|
||||
export ZELLIJ_AUTO_ATTACH=true
|
||||
|
||||
|
||||
# Shell to use for commands like `nix-shell -p` (use zsh if using zsh)
|
||||
if test -n "${ZSH_VERSION:-}"; then
|
||||
export NIX_BUILD_SHELL=zsh
|
||||
|
@ -136,7 +143,7 @@ export ZVM_VI_HIGHLIGHT_BACKGROUND=#515860
|
|||
# vim-mode cursor
|
||||
# syntax: "[color] [blinking] [style]" see: https://github.com/softmoth/zsh-vim-mode#mode-in-prompt
|
||||
export MODE_CURSOR_VIINS="blinking bar"
|
||||
export MODE_CURSOR_REPLACE="steady bar"
|
||||
export MODE_CURSOR_REPLACE="steady block"
|
||||
export MODE_CURSOR_VICMD="steady block"
|
||||
export MODE_CURSOR_SEARCH="blinking underline"
|
||||
export MODE_CURSOR_VISUAL="steady block"
|
||||
|
@ -165,4 +172,13 @@ DPC="$DP/classes"
|
|||
|
||||
export S SS # this makes it easier to load the shrc while in posix sh
|
||||
|
||||
## SillyOS
|
||||
IS_SILLY_OS=false
|
||||
if [ "$OS" = 'Windows_NT' ]; then
|
||||
IS_SILLY_OS=true
|
||||
fi
|
||||
export IS_SILLY_OS
|
||||
|
||||
fi
|
||||
|
||||
# vim:fdm=marker:fmr=>>>,<<<:et:ft=sh:sw=3:ts=3
|
||||
|
|
|
@ -1,6 +1,11 @@
|
|||
#!/bin/sh
|
||||
# shell plugins for POSIX
|
||||
|
||||
# Switch to zsh if we're told to
|
||||
if [ "${LAUNCH_ZSH:-false}" = true ] && command -v zsh > /dev/null 2>&1 && [ "$0" != 'zsh' ]; then
|
||||
LAUNCH_ZSH=false exec zsh
|
||||
fi
|
||||
|
||||
# Enable zoxide if it exists
|
||||
if command -v zoxide > /dev/null 2>&1 || ${SKIP_ZOXIDE:-false}; then
|
||||
# Check what shell we're using based on variables that get set by non-posix shells - https://stackoverflow.com/a/3327022
|
||||
|
@ -14,10 +19,5 @@ if command -v zoxide > /dev/null 2>&1 || ${SKIP_ZOXIDE:-false}; then
|
|||
fi
|
||||
fi
|
||||
|
||||
# Switch to zsh if we're told to
|
||||
if [ "${LAUNCH_ZSH:-false}" = true ] && command -v zsh > /dev/null 2>&1; then
|
||||
LAUNCH_ZSH=false exec zsh
|
||||
fi
|
||||
|
||||
# terminal colorscheme
|
||||
careful_source "$SHELL_CONFIG_DIR/colors.sh"
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
# [optional: test to run] (-f, -x, -e) \
|
||||
# [optional: operation (source, exec, command or nothing)] \
|
||||
careful_source() {
|
||||
echo "Sourcing $1"
|
||||
if test "${4:--f}" "$1"; then
|
||||
${5:-.} "$1"
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue