kubie icon indicating copy to clipboard operation
kubie copied to clipboard

Command prompt is broken when using zim on zshell

Open c10l opened this issue 3 years ago • 0 comments

I've recently migrated my zsh config to use zim. Unfortunately, this broke kubie because it expects to find certain files in known locations:

$ kubie ctx
/Users/c10l/.zshrc:source:102: no such file or directory: /var/folders/2l/z3r2cq7j3hd79c4091tq42hr0000gn/T/.tmpc9w8CC/.zim/zimfw.zsh
/Users/c10l/.zshrc:source:104: no such file or directory: /var/folders/2l/z3r2cq7j3hd79c4091tq42hr0000gn/T/.tmpc9w8CC/.zim/init.zsh
/Users/c10l/.zlogin:source:7: no such file or directory: /var/folders/2l/z3r2cq7j3hd79c4091tq42hr0000gn/T/.tmpc9w8CC/.zim/login_init.zsh
c10l@laptop ~ %

I managed to work around those errors by setting ZIM_HOME=/Users/c10l/.zim but then something else broke as it tries to find .zimrc under $HOME, which is overridden at that point to the kubie temp dir:

$ kubie ctx
_zimfw_source_zimrc:source:3: no such file or directory: /var/folders/2l/z3r2cq7j3hd79c4091tq42hr0000gn/T/.tmp7RzL0l/.zimrc
Failed to source /var/folders/2l/z3r2cq7j3hd79c4091tq42hr0000gn/T/.tmp7RzL0l/.zimrc
/Users/c10l/.zim/modules/ohmyzsh/plugins/kubectl/kubectl.plugin.zsh:5: read-only file system: /kubectl_completion

Suggestion: allow me to give a list of files and directories to copy to the temp dir when switching contexts. This way I can specify .zimrc and .zim/ which should make this work.

c10l avatar Nov 05 '21 14:11 c10l