我想在鱼中定义一些别名.显然应该可以在中定义它们
~/.config/fish/functions
Run Code Online (Sandbox Code Playgroud)
但是当我重新启动shell时,它们不会自动加载.有任何想法吗?
我不喜欢每次开始终端时重新输入鱼.我想fish默认.如何在Mac上将fish shell设置为我的默认shell?
有人可以告诉我在fish shell中设置一堆环境变量的正确方法是什么?
在我的.config/fish/config.fish文件中,我有一个设置我的环境变量的函数
function setTESTENV
set -x BROKER_IP '10.14.16.216'
set -x USERNAME 'foo'
set -x USERPASS 'bar'
end
Run Code Online (Sandbox Code Playgroud)
当我从命令提示符键入setTESTENV并env在命令行中执行a 时,我看不到这些信息.
我要寻找的等效source .bashrc的鱼.
我想让virtualenv与鱼壳一起工作.我安装了virtualenv,它可以正常使用bash和zsh.但是,运行以下命令将返回fish: Unknown command 'source':
$ source ~/path/to/bin/activate
Run Code Online (Sandbox Code Playgroud)
有谁知道如何让virtualenv和鱼壳一起工作.提前致谢.
在bash中我可以取消设置变量
unset myvar
Run Code Online (Sandbox Code Playgroud)
在鱼我得到
fish: Unknown command 'unset'
Run Code Online (Sandbox Code Playgroud)
什么是鱼的未设置的等价物.
我在这里看到了鱼壳的vi模式实现,但我不知道如何使用它.有没有在线提供的教程(我找不到这样的)描述基本功能 - 如何切换模式等等.谢谢.
我正在尝试在sublime Text 3中打开一个目录.
我可以使用subl命令从命令行启动sublime .
帮助文本显示以下内容:
Sublime Text build 3059
Usage: subl [arguments] [files] edit the given files
or: subl [arguments] [directories] open the given directories
or: subl [arguments] - edit stdin
Arguments:
--project <project>: Load the given project
--command <command>: Run the given command
-n or --new-window: Open a new window
-a or --add: Add folders to the current window
-w or --wait: Wait for the files to be closed before returning
-b or --background: Don't activate …Run Code Online (Sandbox Code Playgroud) 你如何比较Fish中的两个字符串(就像"abc" == "def"在其他语言中一样)?
到目前为止,我已经使用了一个组合contains(事实证明contains "" $a只有返回,0如果$a是空字符串,虽然在所有情况下似乎都不适用于我)和switch(使用a case "what_i_want_to_match"和a case '*').但是,这些方法似乎都不是特别正确.
fish ×10
shell ×3
command-line ×1
linux ×1
macos ×1
sublimetext3 ×1
terminal ×1
vi ×1
vim ×1
virtualenv ×1