smartcd icon indicating copy to clipboard operation
smartcd copied to clipboard

"source" detection in load_smartcd does not work with zsh

Open blueyed opened this issue 11 years ago • 2 comments

https://github.com/cxreg/smartcd/commit/c8356e92a967f90c17ef0f5bc8bef6fa06605185 was meant to fix it, but it does not work.

When sourcing it from zsh, I get:

% source load_smartcd
+load_smartcd:3> [[ -n 5.0.6-dev-0 ]]
+load_smartcd:4> [[ '' != load_smartcd ]]
+load_smartcd:5> echo 'This cannot be run as a command, please run'
This cannot be run as a command, please run
+load_smartcd:6> echo

+load_smartcd:7> echo '    source load_smartcd'
    source load_smartcd
+load_smartcd:8> exit 1

Maybe this was just taken from http://unix.stackexchange.com/a/73010/1920, or have you tested it?

blueyed avatar Sep 05 '14 08:09 blueyed

Try source $HOME/.smartcd/lib/core/smartcd. I was having a similar issue and that worked for me.

milin avatar Aug 26 '15 21:08 milin

Thanks, @milin.

I've since moved (and written most of) https://github.com/Tarrasch/zsh-autoenv by now. It even uses parts of smartcd's ideas/lib.

blueyed avatar Aug 27 '15 18:08 blueyed