microsoft / inshellisense

IDE style command line auto complete
MIT License
8.21k stars 179 forks source link

is-zsh not work on my mac #218

Closed PaulXu-cn closed 1 month ago

PaulXu-cn commented 3 months ago

Describe the bug

$ is -s zsh # not work
$ is -s bash # work

Environment

In my environment, is-zsh is not working properly.

I tried to find the reason, looked at the code, and found:

It is determined by the 6973;PS character to judge prompt start, so inshellintegration-rc.zsh needs to be executed in the zsh environment.

Variable definitions for the folder:

export const userZdotdir = process.env?.ZDOTDIR ?? os.homedir() ?? `~`;
export const zdotdir = path.join(os.tmpdir(), `is-zsh`);

When starting pty, zdotdir will be passed as the value of the environment variable into the new zsh environment.

const convertToPtyEnv = (shell: Shell, underTest: boolean) => {
  const env: Record<string, string> = {
    ...process.env,
    ISTERM: "1",
  };
  if (underTest) env.ISTERM_TESTING = "1";

  switch (shell) {
// ....
    case Shell.Zsh: {
      return { ...env, ZDOTDIR: zdotdir, USER_ZDOTDIR: userZdotdir };
    }
  }
  return env;
};

Here, at startup, the zsh related scripts defined by is are copied to the $temp/is-zsh directory.

export const setupZshDotfiles = async () => {
  const shellFolderPath = path.join(path.dirname(url.fileURLToPath(import.meta.url)), "..", "..", "shell");
  await fsAsync.cp(path.join(shellFolderPath, "shellIntegration-rc.zsh"), path.join(zdotdir, ".zshrc"));
  await fsAsync.cp(path.join(shellFolderPath, "shellIntegration-profile.zsh"), path.join(zdotdir, ".zprofile"));
  await fsAsync.cp(path.join(shellFolderPath, "shellIntegration-env.zsh"), path.join(zdotdir, ".zshenv"));
  await fsAsync.cp(path.join(shellFolderPath, "shellIntegration-login.zsh"), path.join(zdotdir, ".zlogin"));
};

I see the above process is what I expected, but I don't understand the following code.

In inshellintegration-rc.zsh, if $USER_ZDOTDIR/.zshrc exists, $temp/is-zsh/.zshrc will not be used. In most cases, this file exists, right? So, for most users, is-zsh will not work properly.

if [[ -f $USER_ZDOTDIR/.zshrc ]]; then
    ZDOTDIR=$USER_ZDOTDIR
    . $USER_ZDOTDIR/.zshrc
fi

After I adjusted the code like this, is-zsh can work normally, or running source ./inshellisense/shell/shellIntegration-rc.zsh in is-zsh can also work normally.

if [[ -f $USER_ZDOTDIR/.zshrc ]]; then
--- ZDOTDIR=$USER_ZDOTDIR
    . $USER_ZDOTDIR/.zshrc
fi

In the inshellisense project, I didn't see related issues, and how to use it in zsh.

So, is it a problem with my environment?

cpendery commented 2 months ago

@PaulXu-cn what do you mean by is -s zsh doesn't work?

We adjust ZDOTDIR back to the default before we source the user's .zshrc in-case it depends on ZDOTDIR.

PaulXu-cn commented 2 months ago

In the shellIntegration-rc.zsh file of is, I noticed that the value of ZDOTDIR is being changed to source the .zshrc of is, which adds a new hook, allowing it to work with the 6973;PS code.

Here is the code snippet:

if [[ -f $USER_ZDOTDIR/.zshrc ]]; then
    ZDOTDIR=$USER_ZDOTDIR
    . $USER_ZDOTDIR/.zshrc
fi

From my understanding, if the ~/.zshrc file exists in the OS, the .zshrc(shellIntegration-rc.zsh) of is will not be loaded, which prevents is from working properly.

To make it work properly, I need to:

option 1: Enter is and then source is/shell/shellintergration-rc.zsh. option 2: remove ZDOTDIR=$USER_ZDOTDIR and then enter is.

My questions are:

  1. Is my understanding correct?
  2. Is this the expected behavior?
cpendery commented 2 months ago

No that's not correct. The shellIntegration-rc.zsh script gets loaded via the ZDOTDIR environment variable which we point to $temp/is-zsh/.zshrc at the shell startup.. We've already copied all the shell integration files there, so they are loaded by zsh. It is only after the shell integration script has been loaded that they source the user's zdotdir via the value USER_ZDOTDIR. Once the user's zdotdir has been loaded, we tweak the prompt and other details. Below you can see inshellisense working in zsh and it's sourcing my .zshrc because it has the powerlevel10k prompt showing

image

insign commented 2 months ago

Well, all I know is that not working at zsh/macOS. It stuck after is called. If I check it says "live".

I got some error using is complete but not sure if it helps:

node:internal/streams/writable:474
      throw new ERR_INVALID_ARG_TYPE(
            ^

TypeError [ERR_INVALID_ARG_TYPE]: The "chunk" argument must be of type string or an instance of Buffer or Uint8Array. Received undefined
    at _write (node:internal/streams/writable:474:13)
    at Writable.write (node:internal/streams/writable:502:10)
    at Command.action (file:///Users/helio/.nvm/versions/node/v20.11.0/lib/node_modules/@microsoft/inshellisense/build/commands/complete.js:9:20) {
  code: 'ERR_INVALID_ARG_TYPE'
}

Node.js v20.11.0
cpendery commented 2 months ago

@insign, could you run is -s zsh -V and paste the logs in the ~/.inshellisense/inshellisense.log file here?

insign commented 2 months ago

@cpendery sure:

When I ran and empty blinking cursor:

{"msg":"writing data","data":"\u001b[2J\u001b[3J\u001b[H"}

After halt with control + c:

{"msg":"writing data","data":"\u001b[2J\u001b[3J\u001b[H"}
{"msg":"reading data","data":"\u0003","bytes":{"0":3}}
{"msg":"parsing data","data":"^C","bytes":{"0":94,"1":67}}
{"msg":"writing data","data":"^C"}
{"msg":"parsing data","data":"\u001b[1m\u001b[7m%\u001b[27m\u001b[1m\u001b[0m                                                                                                                                \r \r","bytes":{"0":27,"1":91,"2":49,"3":109,"4":27,"5":91,"6":55,"7":109,"8":37,"9":27,"10":91,"11":50,"12":55,"13":109,"14":27,"15":91,"16":49,"17":109,"18":27,"19":91,"20":48,"21":109,"22":32,"23":32,"24":32,"25":32,"26":32,"27":32,"28":32,"29":32,"30":32,"31":32,"32":32,"33":32,"34":32,"35":32,"36":32,"37":32,"38":32,"39":32,"40":32,"41":32,"42":32,"43":32,"44":32,"45":32,"46":32,"47":32,"48":32,"49":32,"50":32,"51":32,"52":32,"53":32,"54":32,"55":32,"56":32,"57":32,"58":32,"59":32,"60":32,"61":32,"62":32,"63":32,"64":32,"65":32,"66":32,"67":32,"68":32,"69":32,"70":32,"71":32,"72":32,"73":32,"74":32,"75":32,"76":32,"77":32,"78":32,"79":32,"80":32,"81":32,"82":32,"83":32,"84":32,"85":32,"86":32,"87":32,"88":32,"89":32,"90":32,"91":32,"92":32,"93":32,"94":32,"95":32,"96":32,"97":32,"98":32,"99":32,"100":32,"101":32,"102":32,"103":32,"104":32,"105":32,"106":32,"107":32,"108":32,"109":32,"110":32,"111":32,"112":32,"113":32,"114":32,"115":32,"116":32,"117":32,"118":32,"119":32,"120":32,"121":32,"122":32,"123":32,"124":32,"125":32,"126":32,"127":32,"128":32,"129":32,"130":32,"131":32,"132":32,"133":32,"134":32,"135":32,"136":32,"137":32,"138":32,"139":32,"140":32,"141":32,"142":32,"143":32,"144":32,"145":32,"146":32,"147":32,"148":32,"149":32,"150":13,"151":32,"152":13}}
{"msg":"writing data","data":"\u001b[1m\u001b[7m%\u001b[27m\u001b[1m\u001b[0m                                                                                                                                \r \r"}
{"msg":"parsing data","data":"\u001b[38;5;6m\u001b[1m .mason-cache\u001b[0m/   \u001b[38;5;5m .aws\u001b[39m@            \u001b[38;5;5m Dropbox\u001b[39m@                      󱆃 .zsh_history\r\n\u001b[38;5;6m\u001b[1m .local\u001b[0m/         \u001b[38;5;6m\u001b[1m󰉏 Pictures\u001b[0m/        \u001b[38;5;6m\u001b[1m ai_overlay_tmp\u001b[0m/               󱆃 .zprofile\r\n\u001b[38;5;6m\u001b[1m .config\u001b[0m/        \u001b[38;5;6m\u001b[1m󰃨 .cache\u001b[0m/          \u001b[38;5;6m\u001b[1m zip-medium\u001b[0m/                    .psql_history\r\n\u001b[38;5;6m\u001b[1m󱍙 Music\u001b[0m/          \u001b[38;5;6m\u001b[1m󰉍 Downloads\u001b[0m/       \u001b[38;5;6m\u001b[1m .iterm2\u001b[0m/                       .gitconfig\r\n\u001b[38;5;6m\u001b[1m clones\u001b[0m/         \u001b[38;5;6m\u001b[1m .dartServer\u001b[0m/     \u001b[38;5;6m\u001b[1m zip-tiny\u001b[0m/                     󱆃 .zshrc\r\n\u001b[38;5;6m\u001b[1m .docker\u001b[0m/        \u001b[38;5;6m\u001b[1m .nvm\u001b[0m/            \u001b[38;5;6m\u001b[1m Public\u001b[0m/                       󱆃 .bash_history\r\n\u001b[38;5;6m\u001b[1m .codeium\u001b[0m/       \u001b[38;5;6m\u001b[1m .pub-cache\u001b[0m/      \u001b[38;5;6m\u001b[1m .dropbox\u001b[0m/                     󱆃 .bashrc\r\n\u001b[38;5;6m\u001b[1m .dart\u001b[0m/","bytes":{"0":27,"1":91,"2":51,"3":56,"4":59,"5":53,"6":59,"7":54,"8":109,"9":27,"10":91,"11":49,"12":109,"13":21,"14":32,"15":46,"16":109,"17":97,"18":115,"19":111,"20":110,"21":45,"22":99,"23":97,"24":99,"25":104,"26":101,"27":27,"28":91,"29":48,"30":109,"31":47,"32":32,"33":32,"34":32,"35":27,"36":91,"37":51,"38":56,"39":59,"40":53,"41":59,"42":53,"43":109,"44":130,"45":32,"46":46,"47":97,"48":119,"49":115,"50":27,"51":91,"52":51,"53":57,"54":109,"55":64,"56":32,"57":32,"58":32,"59":32,"60":32,"61":32,"62":32,"63":32,"64":32,"65":32,"66":32,"67":32,"68":27,"69":91,"70":51,"71":56,"72":59,"73":53,"74":59,"75":53,"76":109,"77":130,"78":32,"79":68,"80":114,"81":111,"82":112,"83":98,"84":111,"85":120,"86":27,"87":91,"88":51,"89":57,"90":109,"91":64,"92":32,"93":32,"94":32,"95":32,"96":32,"97":32,"98":32,"99":32,"100":32,"101":32,"102":32,"103":32,"104":32,"105":32,"106":32,"107":32,"108":32,"109":32,"110":32,"111":32,"112":32,"113":32,"114":132,"115":32,"116":46,"117":122,"118":115,"119":104,"120":95,"121":104,"122":105,"123":115,"124":116,"125":111,"126":114,"127":121,"128":13,"129":10,"130":27,"131":91,"132":51,"133":56,"134":59,"135":53,"136":59,"137":54,"138":109,"139":27,"140":91,"141":49,"142":109,"143":21,"144":32,"145":46,"146":108,"147":111,"148":99,"149":97,"150":108,"151":27,"152":91,"153":48,"154":109,"155":47,"156":32,"157":32,"158":32,"159":32,"160":32,"161":32,"162":32,"163":32,"164":32,"165":27,"166":91,"167":51,"168":56,"169":59,"170":53,"171":59,"172":54,"173":109,"174":27,"175":91,"176":49,"177":109,"178":128,"179":32,"180":80,"181":105,"182":99,"183":116,"184":117,"185":114,"186":101,"187":115,"188":27,"189":91,"190":48,"191":109,"192":47,"193":32,"194":32,"195":32,"196":32,"197":32,"198":32,"199":32,"200":32,"201":27,"202":91,"203":51,"204":56,"205":59,"206":53,"207":59,"208":54,"209":109,"210":27,"211":91,"212":49,"213":109,"214":21,"215":32,"216":97,"217":105,"218":95,"219":111,"220":118,"221":101,"222":114,"223":108,"224":97,"225":121,"226":95,"227":116,"228":109,"229":112,"230":27,"231":91,"232":48,"233":109,"234":47,"235":32,"236":32,"237":32,"238":32,"239":32,"240":32,"241":32,"242":32,"243":32,"244":32,"245":32,"246":32,"247":32,"248":32,"249":32,"250":132,"251":32,"252":46,"253":122,"254":112,"255":114,"256":111,"257":102,"258":105,"259":108,"260":101,"261":13,"262":10,"263":27,"264":91,"265":51,"266":56,"267":59,"268":53,"269":59,"270":54,"271":109,"272":27,"273":91,"274":49,"275":109,"276":252,"277":32,"278":46,"279":99,"280":111,"281":110,"282":102,"283":105,"284":103,"285":27,"286":91,"287":48,"288":109,"289":47,"290":32,"291":32,"292":32,"293":32,"294":32,"295":32,"296":32,"297":32,"298":27,"299":91,"300":51,"301":56,"302":59,"303":53,"304":59,"305":54,"306":109,"307":27,"308":91,"309":49,"310":109,"311":128,"312":32,"313":46,"314":99,"315":97,"316":99,"317":104,"318":101,"319":27,"320":91,"321":48,"322":109,"323":47,"324":32,"325":32,"326":32,"327":32,"328":32,"329":32,"330":32,"331":32,"332":32,"333":32,"334":27,"335":91,"336":51,"337":56,"338":59,"339":53,"340":59,"341":54,"342":109,"343":27,"344":91,"345":49,"346":109,"347":21,"348":32,"349":122,"350":105,"351":112,"352":45,"353":109,"354":101,"355":100,"356":105,"357":117,"358":109,"359":27,"360":91,"361":48,"362":109,"363":47,"364":32,"365":32,"366":32,"367":32,"368":32,"369":32,"370":32,"371":32,"372":32,"373":32,"374":32,"375":32,"376":32,"377":32,"378":32,"379":32,"380":32,"381":32,"382":32,"383":22,"384":32,"385":46,"386":112,"387":115,"388":113,"389":108,"390":95,"391":104,"392":105,"393":115,"394":116,"395":111,"396":114,"397":121,"398":13,"399":10,"400":27,"401":91,"402":51,"403":56,"404":59,"405":53,"406":59,"407":54,"408":109,"409":27,"410":91,"411":49,"412":109,"413":132,"414":32,"415":77,"416":117,"417":115,"418":105,"419":99,"420":27,"421":91,"422":48,"423":109,"424":47,"425":32,"426":32,"427":32,"428":32,"429":32,"430":32,"431":32,"432":32,"433":32,"434":32,"435":27,"436":91,"437":51,"438":56,"439":59,"440":53,"441":59,"442":54,"443":109,"444":27,"445":91,"446":49,"447":109,"448":128,"449":32,"450":68,"451":111,"452":119,"453":110,"454":108,"455":111,"456":97,"457":100,"458":115,"459":27,"460":91,"461":48,"462":109,"463":47,"464":32,"465":32,"466":32,"467":32,"468":32,"469":32,"470":32,"471":27,"472":91,"473":51,"474":56,"475":59,"476":53,"477":59,"478":54,"479":109,"480":27,"481":91,"482":49,"483":109,"484":21,"485":32,"486":46,"487":105,"488":116,"489":101,"490":114,"491":109,"492":50,"493":27,"494":91,"495":48,"496":109,"497":47,"498":32,"499":32,"500":32,"501":32,"502":32,"503":32,"504":32,"505":32,"506":32,"507":32,"508":32,"509":32,"510":32,"511":32,"512":32,"513":32,"514":32,"515":32,"516":32,"517":32,"518":32,"519":32,"520":211,"521":32,"522":46,"523":103,"524":105,"525":116,"526":99,"527":111,"528":110,"529":102,"530":105,"531":103,"532":13,"533":10,"534":27,"535":91,"536":51,"537":56,"538":59,"539":53,"540":59,"541":54,"542":109,"543":27,"544":91,"545":49,"546":109,"547":21,"548":32,"549":99,"550":108,"551":111,"552":110,"553":101,"554":115,"555":27,"556":91,"557":48,"558":109,"559":47,"560":32,"561":32,"562":32,"563":32,"564":32,"565":32,"566":32,"567":32,"568":32,"569":27,"570":91,"571":51,"572":56,"573":59,"574":53,"575":59,"576":54,"577":109,"578":27,"579":91,"580":49,"581":109,"582":21,"583":32,"584":46,"585":100,"586":97,"587":114,"588":116,"589":83,"590":101,"591":114,"592":118,"593":101,"594":114,"595":27,"596":91,"597":48,"598":109,"599":47,"600":32,"601":32,"602":32,"603":32,"604":32,"605":27,"606":91,"607":51,"608":56,"609":59,"610":53,"611":59,"612":54,"613":109,"614":27,"615":91,"616":49,"617":109,"618":21,"619":32,"620":122,"621":105,"622":112,"623":45,"624":116,"625":105,"626":110,"627":121,"628":27,"629":91,"630":48,"631":109,"632":47,"633":32,"634":32,"635":32,"636":32,"637":32,"638":32,"639":32,"640":32,"641":32,"642":32,"643":32,"644":32,"645":32,"646":32,"647":32,"648":32,"649":32,"650":32,"651":32,"652":32,"653":32,"654":132,"655":32,"656":46,"657":122,"658":115,"659":104,"660":114,"661":99,"662":13,"663":10,"664":27,"665":91,"666":51,"667":56,"668":59,"669":53,"670":59,"671":54,"672":109,"673":27,"674":91,"675":49,"676":109,"677":21,"678":32,"679":46,"680":100,"681":111,"682":99,"683":107,"684":101,"685":114,"686":27,"687":91,"688":48,"689":109,"690":47,"691":32,"692":32,"693":32,"694":32,"695":32,"696":32,"697":32,"698":32,"699":27,"700":91,"701":51,"702":56,"703":59,"704":53,"705":59,"706":54,"707":109,"708":27,"709":91,"710":49,"711":109,"712":21,"713":32,"714":46,"715":110,"716":118,"717":109,"718":27,"719":91,"720":48,"721":109,"722":47,"723":32,"724":32,"725":32,"726":32,"727":32,"728":32,"729":32,"730":32,"731":32,"732":32,"733":32,"734":32,"735":27,"736":91,"737":51,"738":56,"739":59,"740":53,"741":59,"742":54,"743":109,"744":27,"745":91,"746":49,"747":109,"748":21,"749":32,"750":80,"751":117,"752":98,"753":108,"754":105,"755":99,"756":27,"757":91,"758":48,"759":109,"760":47,"761":32,"762":32,"763":32,"764":32,"765":32,"766":32,"767":32,"768":32,"769":32,"770":32,"771":32,"772":32,"773":32,"774":32,"775":32,"776":32,"777":32,"778":32,"779":32,"780":32,"781":32,"782":32,"783":32,"784":132,"785":32,"786":46,"787":98,"788":97,"789":115,"790":104,"791":95,"792":104,"793":105,"794":115,"795":116,"796":111,"797":114,"798":121,"799":13,"800":10,"801":27,"802":91,"803":51,"804":56,"805":59,"806":53,"807":59,"808":54,"809":109,"810":27,"811":91,"812":49,"813":109,"814":21,"815":32,"816":46,"817":99,"818":111,"819":100,"820":101,"821":105,"822":117,"823":109,"824":27,"825":91,"826":48,"827":109,"828":47,"829":32,"830":32,"831":32,"832":32,"833":32,"834":32,"835":32,"836":27,"837":91,"838":51,"839":56,"840":59,"841":53,"842":59,"843":54,"844":109,"845":27,"846":91,"847":49,"848":109,"849":21,"850":32,"851":46,"852":112,"853":117,"854":98,"855":45,"856":99,"857":97,"858":99,"859":104,"860":101,"861":27,"862":91,"863":48,"864":109,"865":47,"866":32,"867":32,"868":32,"869":32,"870":32,"871":32,"872":27,"873":91,"874":51,"875":56,"876":59,"877":53,"878":59,"879":54,"880":109,"881":27,"882":91,"883":49,"884":109,"885":21,"886":32,"887":46,"888":100,"889":114,"890":111,"891":112,"892":98,"893":111,"894":120,"895":27,"896":91,"897":48,"898":109,"899":47,"900":32,"901":32,"902":32,"903":32,"904":32,"905":32,"906":32,"907":32,"908":32,"909":32,"910":32,"911":32,"912":32,"913":32,"914":32,"915":32,"916":32,"917":32,"918":32,"919":32,"920":32,"921":132,"922":32,"923":46,"924":98,"925":97,"926":115,"927":104,"928":114,"929":99,"930":13,"931":10,"932":27,"933":91,"934":51,"935":56,"936":59,"937":53,"938":59,"939":54,"940":109,"941":27,"942":91,"943":49,"944":109,"945":21,"946":32,"947":46,"948":100,"949":97,"950":114,"951":116,"952":27,"953":91,"954":48,"955":109,"956":47}}
{"msg":"writing data","data":"pdump-MacBook Air de Hélio-5.9.zwc'\r\n\u001b[38;5;6m\u001b[1m OrbStack\u001b[0m/       \u001b[38;5;6m\u001b[1m .Trash\u001b[0m/           .zcompdump                     .zcompdump-m2-5.9.zwc\r\n\u001b[38;5;6m\u001b[1m intelephense\u001b[0m/   \u001b[38;5;6m\u001b[1m zip-big\u001b[0m/          .lesshst                      \r\n"}
{"msg":"parsing data","data":"pdump-MacBook Air de Hélio-5.9.zwc'\r\n\u001b[38;5;6m\u001b[1m OrbStack\u001b[0m/       \u001b[38;5;6m\u001b[1m .Trash\u001b[0m/           .zcompdump                     .zcompdump-m2-5.9.zwc\r\n\u001b[38;5;6m\u001b[1m intelephense\u001b[0m/   \u001b[38;5;6m\u001b[1m zip-big\u001b[0m/          .lesshst                      \r\n","bytes":{"0":112,"1":100,"2":117,"3":109,"4":112,"5":45,"6":77,"7":97,"8":99,"9":66,"10":111,"11":111,"12":107,"13":32,"14":65,"15":105,"16":114,"17":32,"18":100,"19":101,"20":32,"21":72,"22":233,"23":108,"24":105,"25":111,"26":45,"27":53,"28":46,"29":57,"30":46,"31":122,"32":119,"33":99,"34":39,"35":13,"36":10,"37":27,"38":91,"39":51,"40":56,"41":59,"42":53,"43":59,"44":54,"45":109,"46":27,"47":91,"48":49,"49":109,"50":21,"51":32,"52":79,"53":114,"54":98,"55":83,"56":116,"57":97,"58":99,"59":107,"60":27,"61":91,"62":48,"63":109,"64":47,"65":32,"66":32,"67":32,"68":32,"69":32,"70":32,"71":32,"72":27,"73":91,"74":51,"75":56,"76":59,"77":53,"78":59,"79":54,"80":109,"81":27,"82":91,"83":49,"84":109,"85":248,"86":32,"87":46,"88":84,"89":114,"90":97,"91":115,"92":104,"93":27,"94":91,"95":48,"96":109,"97":47,"98":32,"99":32,"100":32,"101":32,"102":32,"103":32,"104":32,"105":32,"106":32,"107":32,"108":21,"109":32,"110":46,"111":122,"112":99,"113":111,"114":109,"115":112,"116":100,"117":117,"118":109,"119":112,"120":32,"121":32,"122":32,"123":32,"124":32,"125":32,"126":32,"127":32,"128":32,"129":32,"130":32,"131":32,"132":32,"133":32,"134":32,"135":32,"136":32,"137":32,"138":32,"139":32,"140":22,"141":32,"142":46,"143":122,"144":99,"145":111,"146":109,"147":112,"148":100,"149":117,"150":109,"151":112,"152":45,"153":109,"154":50,"155":45,"156":53,"157":46,"158":57,"159":46,"160":122,"161":119,"162":99,"163":13,"164":10,"165":27,"166":91,"167":51,"168":56,"169":59,"170":53,"171":59,"172":54,"173":109,"174":27,"175":91,"176":49,"177":109,"178":21,"179":32,"180":105,"181":110,"182":116,"183":101,"184":108,"185":101,"186":112,"187":104,"188":101,"189":110,"190":115,"191":101,"192":27,"193":91,"194":48,"195":109,"196":47,"197":32,"198":32,"199":32,"200":27,"201":91,"202":51,"203":56,"204":59,"205":53,"206":59,"207":54,"208":109,"209":27,"210":91,"211":49,"212":109,"213":21,"214":32,"215":122,"216":105,"217":112,"218":45,"219":98,"220":105,"221":103,"222":27,"223":91,"224":48,"225":109,"226":47,"227":32,"228":32,"229":32,"230":32,"231":32,"232":32,"233":32,"234":32,"235":32,"236":22,"237":32,"238":46,"239":108,"240":101,"241":115,"242":115,"243":104,"244":115,"245":116,"246":32,"247":32,"248":32,"249":32,"250":32,"251":32,"252":32,"253":32,"254":32,"255":32,"256":32,"257":32,"258":32,"259":32,"260":32,"261":32,"262":32,"263":32,"264":32,"265":32,"266":32,"267":32,"268":13,"269":10}}
{"msg":"writing data","data":"          \u001b[38;5;6m\u001b[1m Postman\u001b[0m/         \u001b[38;5;6m\u001b[1m .dart-tool\u001b[0m/                    .CFUserTextEncoding\r\n\u001b[38;5;5m .gnupg\u001b[39m@         \u001b[38;5;6m\u001b[1m .oh-my-zsh\u001b[0m/      \u001b[38;5;5m .ssh\u001b[39m@                          '.zcompdump-MacBook Air de Hélio-5.9'\r\n\u001b[38;5;6m\u001b[1m .composer\u001b[0m/      \u001b[38;5;6m\u001b[1m Documents\u001b[0m/       \u001b[38;5;6m\u001b[1m Movies\u001b[0m/                        .zcompdump-m2-5.9\r\n\u001b[38;5;6m\u001b[1m bin\u001b[0m/            \u001b[38;5;6m\u001b[1m Desktop\u001b[0m/         \u001b[38;5;6m\u001b[1m Applications\u001b[0m/                  opus.md\r\n\u001b[38;5;6m\u001b[1m .zsh\u001b[0m/           \u001b[38;5;6m\u001b[1m Library\u001b[0m/         \u001b[38;5;6m\u001b[1m .degit\u001b[0m/                        .zshrc.pre-oh-my-zsh\r\n\u001b[38;5;6m\u001b[1m .zsh_sessions\u001b[0m/  \u001b[38;5;6m\u001b[1m .npm\u001b[0m/            \u001b[38;5;6m\u001b[1m󰁯 .codewhisperer.dotfiles.bak\u001b[0m/  \u001b[38;5;1m .iterm2_shell_integration.zsh\u001b[39m*\r\n\u001b[38;5;6m\u001b[1m .orbstack\u001b[0m/      \u001b[38;5;6m\u001b[1m .inshellisense\u001b[0m/   .profile                       '.zcom"}
{"msg":"writing data","data":"\u001b[38;5;6m\u001b[1m .mason-cache\u001b[0m/   \u001b[38;5;5m .aws\u001b[39m@            \u001b[38;5;5m Dropbox\u001b[39m@                      󱆃 .zsh_history\r\n\u001b[38;5;6m\u001b[1m .local\u001b[0m/         \u001b[38;5;6m\u001b[1m󰉏 Pictures\u001b[0m/        \u001b[38;5;6m\u001b[1m ai_overlay_tmp\u001b[0m/               󱆃 .zprofile\r\n\u001b[38;5;6m\u001b[1m .config\u001b[0m/        \u001b[38;5;6m\u001b[1m󰃨 .cache\u001b[0m/          \u001b[38;5;6m\u001b[1m zip-medium\u001b[0m/                    .psql_history\r\n\u001b[38;5;6m\u001b[1m󱍙 Music\u001b[0m/          \u001b[38;5;6m\u001b[1m󰉍 Downloads\u001b[0m/       \u001b[38;5;6m\u001b[1m .iterm2\u001b[0m/                       .gitconfig\r\n\u001b[38;5;6m\u001b[1m clones\u001b[0m/         \u001b[38;5;6m\u001b[1m .dartServer\u001b[0m/     \u001b[38;5;6m\u001b[1m zip-tiny\u001b[0m/                     󱆃 .zshrc\r\n\u001b[38;5;6m\u001b[1m .docker\u001b[0m/        \u001b[38;5;6m\u001b[1m .nvm\u001b[0m/            \u001b[38;5;6m\u001b[1m Public\u001b[0m/                       󱆃 .bash_history\r\n\u001b[38;5;6m\u001b[1m .codeium\u001b[0m/       \u001b[38;5;6m\u001b[1m .pub-cache\u001b[0m/      \u001b[38;5;6m\u001b[1m .dropbox\u001b[0m/                     󱆃 .bashrc\r\n\u001b[38;5;6m\u001b[1m .dart\u001b[0m/"}
{"msg":"parsing data","data":"          \u001b[38;5;6m\u001b[1m Postman\u001b[0m/         \u001b[38;5;6m\u001b[1m .dart-tool\u001b[0m/                    .CFUserTextEncoding\r\n\u001b[38;5;5m .gnupg\u001b[39m@         \u001b[38;5;6m\u001b[1m .oh-my-zsh\u001b[0m/      \u001b[38;5;5m .ssh\u001b[39m@                          '.zcompdump-MacBook Air de Hélio-5.9'\r\n\u001b[38;5;6m\u001b[1m .composer\u001b[0m/      \u001b[38;5;6m\u001b[1m Documents\u001b[0m/       \u001b[38;5;6m\u001b[1m Movies\u001b[0m/                        .zcompdump-m2-5.9\r\n\u001b[38;5;6m\u001b[1m bin\u001b[0m/            \u001b[38;5;6m\u001b[1m Desktop\u001b[0m/         \u001b[38;5;6m\u001b[1m Applications\u001b[0m/                  opus.md\r\n\u001b[38;5;6m\u001b[1m .zsh\u001b[0m/           \u001b[38;5;6m\u001b[1m Library\u001b[0m/         \u001b[38;5;6m\u001b[1m .degit\u001b[0m/                        .zshrc.pre-oh-my-zsh\r\n\u001b[38;5;6m\u001b[1m .zsh_sessions\u001b[0m/  \u001b[38;5;6m\u001b[1m .npm\u001b[0m/            \u001b[38;5;6m\u001b[1m󰁯 .codewhisperer.dotfiles.bak\u001b[0m/  \u001b[38;5;1m .iterm2_shell_integration.zsh\u001b[39m*\r\n\u001b[38;5;6m\u001b[1m .orbstack\u001b[0m/      \u001b[38;5;6m\u001b[1m .inshellisense\u001b[0m/   .profile                       '.zcom","bytes":{"0":32,"1":32,"2":32,"3":32,"4":32,"5":32,"6":32,"7":32,"8":32,"9":32,"10":27,"11":91,"12":51,"13":56,"14":59,"15":53,"16":59,"17":54,"18":109,"19":27,"20":91,"21":49,"22":109,"23":21,"24":32,"25":80,"26":111,"27":115,"28":116,"29":109,"30":97,"31":110,"32":27,"33":91,"34":48,"35":109,"36":47,"37":32,"38":32,"39":32,"40":32,"41":32,"42":32,"43":32,"44":32,"45":32,"46":27,"47":91,"48":51,"49":56,"50":59,"51":53,"52":59,"53":54,"54":109,"55":27,"56":91,"57":49,"58":109,"59":21,"60":32,"61":46,"62":100,"63":97,"64":114,"65":116,"66":45,"67":116,"68":111,"69":111,"70":108,"71":27,"72":91,"73":48,"74":109,"75":47,"76":32,"77":32,"78":32,"79":32,"80":32,"81":32,"82":32,"83":32,"84":32,"85":32,"86":32,"87":32,"88":32,"89":32,"90":32,"91":32,"92":32,"93":32,"94":32,"95":22,"96":32,"97":46,"98":67,"99":70,"100":85,"101":115,"102":101,"103":114,"104":84,"105":101,"106":120,"107":116,"108":69,"109":110,"110":99,"111":111,"112":100,"113":105,"114":110,"115":103,"116":13,"117":10,"118":27,"119":91,"120":51,"121":56,"122":59,"123":53,"124":59,"125":53,"126":109,"127":130,"128":32,"129":46,"130":103,"131":110,"132":117,"133":112,"134":103,"135":27,"136":91,"137":51,"138":57,"139":109,"140":64,"141":32,"142":32,"143":32,"144":32,"145":32,"146":32,"147":32,"148":32,"149":32,"150":27,"151":91,"152":51,"153":56,"154":59,"155":53,"156":59,"157":54,"158":109,"159":27,"160":91,"161":49,"162":109,"163":21,"164":32,"165":46,"166":111,"167":104,"168":45,"169":109,"170":121,"171":45,"172":122,"173":115,"174":104,"175":27,"176":91,"177":48,"178":109,"179":47,"180":32,"181":32,"182":32,"183":32,"184":32,"185":32,"186":27,"187":91,"188":51,"189":56,"190":59,"191":53,"192":59,"193":53,"194":109,"195":130,"196":32,"197":46,"198":115,"199":115,"200":104,"201":27,"202":91,"203":51,"204":57,"205":109,"206":64,"207":32,"208":32,"209":32,"210":32,"211":32,"212":32,"213":32,"214":32,"215":32,"216":32,"217":32,"218":32,"219":32,"220":32,"221":32,"222":32,"223":32,"224":32,"225":32,"226":32,"227":32,"228":32,"229":32,"230":32,"231":32,"232":22,"233":32,"234":39,"235":46,"236":122,"237":99,"238":111,"239":109,"240":112,"241":100,"242":117,"243":109,"244":112,"245":45,"246":77,"247":97,"248":99,"249":66,"250":111,"251":111,"252":107,"253":32,"254":65,"255":105,"256":114,"257":32,"258":100,"259":101,"260":32,"261":72,"262":233,"263":108,"264":105,"265":111,"266":45,"267":53,"268":46,"269":57,"270":39,"271":13,"272":10,"273":27,"274":91,"275":51,"276":56,"277":59,"278":53,"279":59,"280":54,"281":109,"282":27,"283":91,"284":49,"285":109,"286":21,"287":32,"288":46,"289":99,"290":111,"291":109,"292":112,"293":111,"294":115,"295":101,"296":114,"297":27,"298":91,"299":48,"300":109,"301":47,"302":32,"303":32,"304":32,"305":32,"306":32,"307":32,"308":27,"309":91,"310":51,"311":56,"312":59,"313":53,"314":59,"315":54,"316":109,"317":27,"318":91,"319":49,"320":109,"321":45,"322":32,"323":68,"324":111,"325":99,"326":117,"327":109,"328":101,"329":110,"330":116,"331":115,"332":27,"333":91,"334":48,"335":109,"336":47,"337":32,"338":32,"339":32,"340":32,"341":32,"342":32,"343":32,"344":27,"345":91,"346":51,"347":56,"348":59,"349":53,"350":59,"351":54,"352":109,"353":27,"354":91,"355":49,"356":109,"357":21,"358":32,"359":77,"360":111,"361":118,"362":105,"363":101,"364":115,"365":27,"366":91,"367":48,"368":109,"369":47,"370":32,"371":32,"372":32,"373":32,"374":32,"375":32,"376":32,"377":32,"378":32,"379":32,"380":32,"381":32,"382":32,"383":32,"384":32,"385":32,"386":32,"387":32,"388":32,"389":32,"390":32,"391":32,"392":32,"393":22,"394":32,"395":46,"396":122,"397":99,"398":111,"399":109,"400":112,"401":100,"402":117,"403":109,"404":112,"405":45,"406":109,"407":50,"408":45,"409":53,"410":46,"411":57,"412":13,"413":10,"414":27,"415":91,"416":51,"417":56,"418":59,"419":53,"420":59,"421":54,"422":109,"423":27,"424":91,"425":49,"426":109,"427":252,"428":32,"429":98,"430":105,"431":110,"432":27,"433":91,"434":48,"435":109,"436":47,"437":32,"438":32,"439":32,"440":32,"441":32,"442":32,"443":32,"444":32,"445":32,"446":32,"447":32,"448":32,"449":27,"450":91,"451":51,"452":56,"453":59,"454":53,"455":59,"456":54,"457":109,"458":27,"459":91,"460":49,"461":109,"462":8,"463":32,"464":68,"465":101,"466":115,"467":107,"468":116,"469":111,"470":112,"471":27,"472":91,"473":48,"474":109,"475":47,"476":32,"477":32,"478":32,"479":32,"480":32,"481":32,"482":32,"483":32,"484":32,"485":27,"486":91,"487":51,"488":56,"489":59,"490":53,"491":59,"492":54,"493":109,"494":27,"495":91,"496":49,"497":109,"498":21,"499":32,"500":65,"501":112,"502":112,"503":108,"504":105,"505":99,"506":97,"507":116,"508":105,"509":111,"510":110,"511":115,"512":27,"513":91,"514":48,"515":109,"516":47,"517":32,"518":32,"519":32,"520":32,"521":32,"522":32,"523":32,"524":32,"525":32,"526":32,"527":32,"528":32,"529":32,"530":32,"531":32,"532":32,"533":32,"534":9,"535":32,"536":111,"537":112,"538":117,"539":115,"540":46,"541":109,"542":100,"543":13,"544":10,"545":27,"546":91,"547":51,"548":56,"549":59,"550":53,"551":59,"552":54,"553":109,"554":27,"555":91,"556":49,"557":109,"558":21,"559":32,"560":46,"561":122,"562":115,"563":104,"564":27,"565":91,"566":48,"567":109,"568":47,"569":32,"570":32,"571":32,"572":32,"573":32,"574":32,"575":32,"576":32,"577":32,"578":32,"579":32,"580":27,"581":91,"582":51,"583":56,"584":59,"585":53,"586":59,"587":54,"588":109,"589":27,"590":91,"591":49,"592":109,"593":21,"594":32,"595":76,"596":105,"597":98,"598":114,"599":97,"600":114,"601":121,"602":27,"603":91,"604":48,"605":109,"606":47,"607":32,"608":32,"609":32,"610":32,"611":32,"612":32,"613":32,"614":32,"615":32,"616":27,"617":91,"618":51,"619":56,"620":59,"621":53,"622":59,"623":54,"624":109,"625":27,"626":91,"627":49,"628":109,"629":21,"630":32,"631":46,"632":100,"633":101,"634":103,"635":105,"636":116,"637":27,"638":91,"639":48,"640":109,"641":47,"642":32,"643":32,"644":32,"645":32,"646":32,"647":32,"648":32,"649":32,"650":32,"651":32,"652":32,"653":32,"654":32,"655":32,"656":32,"657":32,"658":32,"659":32,"660":32,"661":32,"662":32,"663":32,"664":32,"665":22,"666":32,"667":46,"668":122,"669":115,"670":104,"671":114,"672":99,"673":46,"674":112,"675":114,"676":101,"677":45,"678":111,"679":104,"680":45,"681":109,"682":121,"683":45,"684":122,"685":115,"686":104,"687":13,"688":10,"689":27,"690":91,"691":51,"692":56,"693":59,"694":53,"695":59,"696":54,"697":109,"698":27,"699":91,"700":49,"701":109,"702":21,"703":32,"704":46,"705":122,"706":115,"707":104,"708":95,"709":115,"710":101,"711":115,"712":115,"713":105,"714":111,"715":110,"716":115,"717":27,"718":91,"719":48,"720":109,"721":47,"722":32,"723":32,"724":27,"725":91,"726":51,"727":56,"728":59,"729":53,"730":59,"731":54,"732":109,"733":27,"734":91,"735":49,"736":109,"737":250,"738":32,"739":46,"740":110,"741":112,"742":109,"743":27,"744":91,"745":48,"746":109,"747":47,"748":32,"749":32,"750":32,"751":32,"752":32,"753":32,"754":32,"755":32,"756":32,"757":32,"758":32,"759":32,"760":27,"761":91,"762":51,"763":56,"764":59,"765":53,"766":59,"767":54,"768":109,"769":27,"770":91,"771":49,"772":109,"773":128,"774":32,"775":46,"776":99,"777":111,"778":100,"779":101,"780":119,"781":104,"782":105,"783":115,"784":112,"785":101,"786":114,"787":101,"788":114,"789":46,"790":100,"791":111,"792":116,"793":102,"794":105,"795":108,"796":101,"797":115,"798":46,"799":98,"800":97,"801":107,"802":27,"803":91,"804":48,"805":109,"806":47,"807":32,"808":32,"809":27,"810":91,"811":51,"812":56,"813":59,"814":53,"815":59,"816":49,"817":109,"818":137,"819":32,"820":46,"821":105,"822":116,"823":101,"824":114,"825":109,"826":50,"827":95,"828":115,"829":104,"830":101,"831":108,"832":108,"833":95,"834":105,"835":110,"836":116,"837":101,"838":103,"839":114,"840":97,"841":116,"842":105,"843":111,"844":110,"845":46,"846":122,"847":115,"848":104,"849":27,"850":91,"851":51,"852":57,"853":109,"854":42,"855":13,"856":10,"857":27,"858":91,"859":51,"860":56,"861":59,"862":53,"863":59,"864":54,"865":109,"866":27,"867":91,"868":49,"869":109,"870":21,"871":32,"872":46,"873":111,"874":114,"875":98,"876":115,"877":116,"878":97,"879":99,"880":107,"881":27,"882":91,"883":48,"884":109,"885":47,"886":32,"887":32,"888":32,"889":32,"890":32,"891":32,"892":27,"893":91,"894":51,"895":56,"896":59,"897":53,"898":59,"899":54,"900":109,"901":27,"902":91,"903":49,"904":109,"905":21,"906":32,"907":46,"908":105,"909":110,"910":115,"911":104,"912":101,"913":108,"914":108,"915":105,"916":115,"917":101,"918":110,"919":115,"920":101,"921":27,"922":91,"923":48,"924":109,"925":47,"926":32,"927":32,"928":21,"929":32,"930":46,"931":112,"932":114,"933":111,"934":102,"935":105,"936":108,"937":101,"938":32,"939":32,"940":32,"941":32,"942":32,"943":32,"944":32,"945":32,"946":32,"947":32,"948":32,"949":32,"950":32,"951":32,"952":32,"953":32,"954":32,"955":32,"956":32,"957":32,"958":32,"959":32,"960":22,"961":32,"962":39,"963":46,"964":122,"965":99,"966":111,"967":109}}
{"msg":"parsing data","data":"\u001b]2;helio@m2:~\u0007\u001b]1;~\u0007","bytes":{"0":27,"1":93,"2":50,"3":59,"4":104,"5":101,"6":108,"7":105,"8":111,"9":64,"10":109,"11":50,"12":58,"13":126,"14":7,"15":27,"16":93,"17":49,"18":59,"19":126,"20":7}}
{"msg":"writing data","data":"\u001b]2;helio@m2:~\u0007\u001b]1;~\u0007"}
{"msg":"writing data","data":"\u001b]7;file://m2/Users/helio\u001b\\"}
{"msg":"parsing data","data":"\u001b]7;file://m2/Users/helio\u001b\\","bytes":{"0":27,"1":93,"2":55,"3":59,"4":102,"5":105,"6":108,"7":101,"8":58,"9":47,"10":47,"11":109,"12":50,"13":47,"14":85,"15":115,"16":101,"17":114,"18":115,"19":47,"20":104,"21":101,"22":108,"23":105,"24":111,"25":27,"26":92}}
{"msg":"parsing data","data":"\r\u001b[0m\u001b[27m\u001b[24m\u001b[Jhelio@m2 ~ % \u001b[K","bytes":{"0":13,"1":27,"2":91,"3":48,"4":109,"5":27,"6":91,"7":50,"8":55,"9":109,"10":27,"11":91,"12":50,"13":52,"14":109,"15":27,"16":91,"17":74,"18":104,"19":101,"20":108,"21":105,"22":111,"23":64,"24":109,"25":50,"26":32,"27":126,"28":32,"29":37,"30":32,"31":27,"32":91,"33":75}}
{"msg":"writing data","data":"\r\u001b[0m\u001b[27m\u001b[24m\u001b[Jhelio@m2 ~ % \u001b[K"}
{"msg":"parsing data","data":"\u001b[?1h\u001b=","bytes":{"0":27,"1":91,"2":63,"3":49,"4":104,"5":27,"6":61}}
{"msg":"writing data","data":"\u001b[?1h\u001b="}
{"msg":"parsing data","data":"\u001b[?2004h","bytes":{"0":27,"1":91,"2":63,"3":50,"4":48,"5":48,"6":52,"7":104}}
{"msg":"writing data","data":"\u001b[?2004h"}
cpendery commented 2 months ago

Also @insign what's your environment info (os, version, shell, shell version, node version etc)?

insign commented 2 months ago

OS: macOS Sonoma Shell: zsh with omz, but I tried without it... node: 20.11.0 npm: 10.2.4

cpendery commented 2 months ago

OS: macOS Sonoma Shell: zsh with omz, but I tried without it... node: 20.11.0 npm: 10.2.4

What terminal are you using and what version of inshellisense?

insign commented 2 months ago

iTerm2, is 0.0.1-rc.14

Message ID: @.***>

cpendery commented 2 months ago

Can you retry with the newest release and provide the logs here @insign?

insign commented 1 month ago

ASAP

insign commented 1 month ago

UPDATE: I have a custom script which loads a lot of aliases and others things, without it, is works fine. So ASAP I update this thread with the problem in my scripts.

insign commented 1 month ago

UPDATE:

The following code was in the bottom of my custom script, moving to the top fixed it. Tell if needed logs anyway.

export NVM_DIR="$HOME/.nvm"
[ -s "/opt/homebrew/opt/nvm/nvm.sh" ] && \. "/opt/homebrew/opt/nvm/nvm.sh"  # This loads nvm
cpendery commented 1 month ago

Sounds good, I'll tweak the plugin to mention that it needs to be at the bottom