Search code examples
windowsubuntugit-bashpik

Pik path on a windows machine doesn't work because of space character


I'm trying to set up pik on my windows machine. In the .pikrc file, there's these lines of code:

pik_path=/c/Program files/pik

function pik  {
  $pik_path/pik_runner.exe pik.sh $@
  [[ -s $USERPROFILE/.pik/pik.sh ]] && source $USERPROFILE/.pik/pik.sh
} 

Apparently, the git bash can't deal with the space between Program and files.

How can I resolve this?

When starting git:

sh.exe": files/pik: No such file or directory

Solution

  • Got it to work with

    #!/bin/sh
    pik_path="/c/Program Files/pik"
    
    function pik  {
      "$pik_path/pik_runner.exe" pik.sh $@
      [[ -s "$USERPROFILE/.pik/pik.sh" ]] && source "$USERPROFILE/.pik/pik.sh"
    }