fish

How can I set PYTHONPATH in fish?

泪湿孤枕 提交于 2019-12-04 08:51:33
The following works in bash: ~$ echo $PYTHONPATH <nothing> ~$ export PYTHONPATH=/path/to/test/folder ~$ echo $PYTHONPATH /path/to/test/folder ~$ python -m test_script hello world But not in fish: Welcome to fish, the friendly interactive shell Type help for instructions on how to use fish ~> echo $PYTHONPATH <nothing> ~> set --universal PYTHONPATH /path/to/test/folder ~> echo $PYTHONPATH /path/to/test/folder ~> python -m test_script /usr/bin/python: No module named test_script I've tried set , set --global and set --universal . How can I set PYTHONPATH in fish? (If it matters, I'm running

Error 'unknown locale: UTF-8' on 'pandas' import (Mac OS X) when running fish shell [duplicate]

随声附和 提交于 2019-12-03 21:37:31
This question already has an answer here: IPython Notebook locale error [duplicate] 4 answers I've recently upgraded to Python 3.5 and the newest version of pandas pandas (0.17.1) , but this broke the package for me. I'm on Mac OS X 10.9.5, using the fish shell. What can I do? cls@clsmba ~> python3 Python 3.5.0 (default, Sep 23 2015, 04:41:33) [GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import pandas Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/local/lib/python3

IntelliJ's embedded terminal does not load fish functions

為{幸葍}努か 提交于 2019-12-03 12:23:27
问题 I'm using IntelliJ's embedded terminal with the fish shell, which works well with one exception: it does not seem to load the fish functions defined in ~/.config/fish/functions/* . When I use the macOS Terminal.app or iTerm2, the functions get loaded as they are supposed to, only IntelliJ's embedded terminal fails to do so. Oddly enough, the IntelliJ terminal does load ~/.config/fish/config.fish just fine. Here's the output of echo $fish_function_path in iterm2 and Terminal.app: /Users/moritz

Zsh color partial tab completions

风格不统一 提交于 2019-12-03 11:07:00
Is it possible to color the completed part of the partial completion results in Zsh? Fish does this by default (in Gentoo at least) as shown in the image below: Full size image: http://i.imgur.com/tN6w3.png Yes, you can do it with things like that: zstyle -e ':completion:*:default' list-colors 'reply=("${PREFIX:+=(#bi)($PREFIX:t)(?)*==02=01}:${(s.:.)LS_COLORS}")' Just change the 01 and 02 colors so it matches your taste, for example to match your screenshot: zstyle -e ':completion:*:default' list-colors 'reply=("${PREFIX:+=(#bi)($PREFIX:t)(?)*==34=34}:${(s.:.)LS_COLORS}")'; (Taken from reddit

How do I translate this `for` loop for the fish shell?

百般思念 提交于 2019-12-03 09:41:49
I'm translating a script from Z shell to Fish, and I've got this one part I can't figure out how to translate: for (( i=0; i < $COLUMNS; i++ )); do printf $1 done The only documentation for for loops I can find in Fish is for this kind . How would I do this in Fish? It appears that the Fish shell does not have that kind of for loop, but instead requires you to take a different approach. (The philosophy is apparently to rely on as few syntactic structures and operators as possible, and do as much with commands as possible.) Here's how I did it, although I assume there are better ways: for CHAR

How do I unset a variable in the fish shell?

最后都变了- 提交于 2019-12-03 06:27:53
问题 In bash I can unset a variable with unset myvar In fish I get fish: Unknown command 'unset' What's the equivalent for unset in fish. 回答1: Fish uses options on the set command to manipulate shell variables. Unset a variable with the -e or --erase option. set -e myvar Additionally you can define a function function unset set --erase $argv end funcsave unset or an abbreviation abbr --add unset 'set --erase' or an alias in ~/.config/fish/config.fish alias unset 'set --erase' 来源: https:/

On OS X, how do I change my shell from fish back to bash?

做~自己de王妃 提交于 2019-12-03 04:14:24
问题 I'm kinda preferring bash lately to fish, and I'm wondering if I can change it back. I tried this command: chsh -s /bin/bash but closing the terminal and reopening it does not restore it to bash, but it's still fish. In fact, how do I remove fish? 回答1: Go to System Preferences, Users & Groups, click the lock to make changes, right click (or Control click) on your username, choose "Advanced Options" and you should have a field to change your shell. Change it there, reboot, and your new shell

how to set environment variables in fish shell

随声附和 提交于 2019-12-03 04:05:20
问题 Can someone please tell me what's the correct way to set a bunch of environment variables in the fish shell? In my .config/fish/config.fish file, I have a function to setup my environment variables like so function setTESTENV set -x BROKER_IP '10.14.16.216' set -x USERNAME 'foo' set -x USERPASS 'bar' end when I type from the command prompt setTESTENV and do a env in the command line, I don't see these information. 回答1: The variables you are declaring are keep in a local scope inside your

Cannot run source activate with conda in Fish-shell

二次信任 提交于 2019-12-03 03:38:18
问题 I follow conda_PR_545, conda issues 4221 and still not working on Ubuntu. After downloading conda.fish from here, and mv it to anaconda3/bin/. Add "source /home/phejimlin/anaconda3/bin/conda.fish" at the end of ~/.config/fish/config.fish. conda activate spark_env Traceback (most recent call last): File "/home/phejimlin/anaconda3/bin/conda", line 6, in sys.exit(conda.cli.main()) File "/home/phejimlin/anaconda3/lib/python3.6/site-packages/conda/cli/main.py", line 161, in main raise

How to get virtualenv to work with fish shell

和自甴很熟 提交于 2019-12-03 02:10:33
问题 I'm trying to get virtualenv to work with the fish shell. I have virtualenv installed and it works fine with bash and zsh. However, running the following command returns fish: Unknown command 'source' : $ source ~/path/to/bin/activate Does anyone know how to get virtualenv and the fish shell to work together. Thanks in advance. 回答1: You don't need to activate to use virtualenv it is a convenience. You can just use the virtualenv directly: virtualenv venv ./venv/bin/pip install foo Have you