You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I just clean installed funky using pip3 and am running into an issue where all local funks are available globally. It almost seems like gfunky is just aliased to funky:
$ cd ~
$ funky
> [ERROR] No local funks are defined in the current directory.
$ gfunky
> [ERROR] No global funks are defined.
$ funky -a test
> [INFO] Added funk "test".
$ funky
> test() { echo "hello world" "$@"; }
$ gfunky
> test() { echo "hello world" "$@"; }
$ cd /
$ gfunky
> test() { echo "hello world" "$@"; }
$ funky
> [ERROR] No local funks are defined in the current directory.
$ gfunky -r test
> [INFO] Removed funk "test".
$ cd ~
$ funky
> [ERROR] No local funks are defined in the current directory.
$ gfunky
> [ERROR] No global funks are defined.
The text was updated successfully, but these errors were encountered:
niekvandepas
changed the title
gfunky creating odd behavior
funky creating global funks by default
Nov 20, 2018
The way that funky is implemented right now, it is only able to approximate the concepts of local and global filesystem scope.
The way I envisioned it, all funks defined in a parent directory should also be available in the child directory. The logical conclusion of this design is that the local scope of the root directory (/) is functionally equivalent to the global scope of the entire system.
However, since funky uses a hidden local file (.funky) to store funks, it is not currently possible to create local funks in directories the user does not have write-access to. So funky treats the user's home directory as the global directory (i.e. it uses /home/user instead of /).
In conclusion, what you've noticed here is less a bug and more a fundamental flaw in the current design. Full support for local and global scopes is waiting on #124.
I'm going to close this issue so I don't forget, but if I have missed something please reopen it.
OS: Ubuntu 16.04
Python:
3.5.2
Funky:
3.1.0
I just clean installed funky using
pip3
and am running into an issue where all local funks are available globally. It almost seems likegfunky
is just aliased tofunky
:The text was updated successfully, but these errors were encountered: