edc / bass

Make Bash utilities usable in Fish shell

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

"source: command not found" running basic example

jason-curtis opened this issue · comments

Using the latest version of bass from github, bass doesn't seem to work at all. No matter what I try to run with it, I get the error message "source: command not found".

~/c/bass> git clone https://github.com/edc/bass
(...)

~/c/bass> make install
install -d ~/.config/fish/functions
install functions/__bass.py ~/.config/fish/functions
install functions/bass.fish ~/.config/fish/functions

[relaunch shell, then...]
~/c/bass> bass -d export X=4
read: Unknown option “-z”
/home/jason/.config/fish/functions/bass.fish (line 8):   python (dirname (status -f))/__bass.py $__bash_args | read -z __script
                                                         ^
in function “bass”,
	called on standard input,
	with parameter list “-d export X=4”


       read - read line of input into variables

   Synopsis
       read [OPTIONS] [VARIABLES...]

read: Type “help read” for related documentation

fish: Unknown command “source”
/home/jason/.config/fish/functions/bass.fish (line 15):     echo -e "$__script" | source -
                                                                                  ^
in function “bass”,
	called on standard input,
	with parameter list “-d export X=4”

close failed in file object destructor:
sys.excepthook is missing
lost sys.stderr
No command 'source' found, did you mean:
 Command 'gource' from package 'gource' (universe)
source: command not found

I suspect your fish version is too old. What is your fish version? Mine is 2.6.0 and it works fine:

$ fish -v
fish, version 2.6.0

Yep, you nailed it. I had fish 2.0.0, apparently source was added somewhere between that and 2.6. Couldn't pin it down in the changelog, though.