From 6a75d3c4de5ee6cbf1b127555a04b06cc91065e7 Mon Sep 17 00:00:00 2001 From: ntsd Date: Sat, 31 Aug 2024 10:37:26 +0700 Subject: [PATCH] feat: add inshellisense --- install/npmfile | 1 + runcom/.zshrc | 2 +- system/.inshellisense | 10 ++++++++++ 3 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 system/.inshellisense diff --git a/install/npmfile b/install/npmfile index 114db89..6089fc5 100644 --- a/install/npmfile +++ b/install/npmfile @@ -7,3 +7,4 @@ fkill-cli get-port-cli npm-check-updates tldr +@microsoft/inshellisense diff --git a/runcom/.zshrc b/runcom/.zshrc index c84efdb..6796f24 100644 --- a/runcom/.zshrc +++ b/runcom/.zshrc @@ -23,7 +23,7 @@ PATH="$DOTFILES_DIR/bin:$PATH" # Source the dotfiles (order matters) -for DOTFILE in "$DOTFILES_DIR"/system/.{oh_my_zsh,function,function_*,path,env,alias,grep,fix,custom,asdf,brew}; do +for DOTFILE in "$DOTFILES_DIR"/system/.{oh_my_zsh,function,function_*,path,env,alias,grep,fix,custom,asdf,brew,inshellisense}; do [ -f "$DOTFILE" ] && . "$DOTFILE" done diff --git a/system/.inshellisense b/system/.inshellisense new file mode 100644 index 0000000..8527d66 --- /dev/null +++ b/system/.inshellisense @@ -0,0 +1,10 @@ +# inshellisens shell plugin for zsh +if [[ -z "${ISTERM}" && $- = *i* && $- != *c* ]]; then + if [[ -o login ]]; then + is -s zsh --login + exit + else + is -s zsh + exit + fi +fi