File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -24,11 +24,13 @@ function setShell() {
2424
2525  if  (shell ==  " sh"  ) {
2626    shell =  " fish"  ;
27-     code .innerText  +=  " . ~/.swiftly/env.fish" 
27+     code .innerText  =  code .innerText .replace (" $("  , " ("  ) //  Subshells are invoked differently in fish
28+     code .innerText  =  code .innerText .replace (" $("  , " ("  )
29+     code .innerText  +=  " set -q SWIFTLY_HOME_DIR && . \" $SWIFTLY_HOME_DIR/env.fish\"  || . ~/.local/share/swiftly/env.fish" 
2830    shellToggle .innerText  =  " sh"  ;
2931  } else  {
3032    shell =  " sh"  ;
31-     code .innerText  +=  " . ${SWIFTLY_HOME_DIR:-~/.swiftly}/env.sh && \\\n " 
33+     code .innerText  +=  " . ${SWIFTLY_HOME_DIR:-~/.local/share/ swiftly}/env.sh && \\\n " 
3234    code .innerText  +=  " hash -r" 
3335    shellToggle .innerText  =  " fish"  ;
3436  }
Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ function setShell() {
4040
4141  if  (shell ==  " sh"  ) {
4242    shell =  " fish"  ;
43-     code .innerText  +=  " . ~/.swiftly/env.fish" 
43+     code .innerText  +=  " set -q SWIFTLY_HOME_DIR && .  \" $SWIFTLY_HOME_DIR/env.fish \"  ||  . ~/.swiftly/env.fish" 
4444    shellToggle .innerText  =  " sh"  ;
4545  } else  {
4646    shell =  " sh"  ;
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments