pipenv completion in fish shell

If you use Bash as the login shell and Fish as the interactive shell, by simply running 'fish' inside the terminal, you might have seen this error message

 pipenv - (line 2): Illegal command name “_pipenv_completion()”  
 _pipenv_completion() {  
 from sourcing file -  
     called on line 2 of file /usr/share/fish/completions/pipenv.fish  
 from sourcing file /usr/share/fish/completions/pipenv.fish  
     called on standard input  
 in command substitution  
     called on standard input  
 source: Error while reading file “-”  

This is a known issue, which for the time being will not be resolved. The hack proposed is to run eval (env _PIPENV_COMPLETE=source-fish pipenv), which I aliased in config.fish

alias pipenvcomp='eval (env _PIPENV_COMPLETE=source-fish pipenv)'


Post popolari in questo blog

An actually good paper notebook