AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / computer / 问题

问题[fish](computer)

Martin Hope
sjdh
Asked: 2023-08-07 14:10:58 +0800 CST

如何解决fish:“无法打开通用变量文件'/':权限被拒绝”?

  • 5

鱼经常发出警告

error: Unable to open universal variable file '/': Permission denied

造成这种情况的原因是什么?如何解决?

fish
  • 1 个回答
  • 47 Views
Martin Hope
Tyler Shellberg
Asked: 2022-05-21 07:22:09 +0800 CST

FISH - 如何从提示中隐藏主机名/计算机?

  • 5

对于上下文,我使用的是 FISH 3.1.0。

我查看了fish_config,但没有一个提示选项只是删除主机名/计算机,而其余部分保持不变。

有没有办法保留大部分默认提示,但只是在开始时删除该部分?

我只是使用默认提示。这里完全使用type fish_prompt:

fish_prompt is a function with definition
# Defined in /usr/share/fish/functions/fish_prompt.fish @ line 4
function fish_prompt --description 'Write out the prompt'
    set -l last_pipestatus $pipestatus
    set -l normal (set_color normal)

    # Color the prompt differently when we're root
    set -l color_cwd $fish_color_cwd
    set -l prefix
    set -l suffix '>'
    if contains -- $USER root toor
        if set -q fish_color_cwd_root
            set color_cwd $fish_color_cwd_root
        end
        set suffix '#'
    end

    # If we're running via SSH, change the host color.
    set -l color_host $fish_color_host
    if set -q SSH_TTY
        set color_host $fish_color_host_remote
    end

    # Write pipestatus
    set -l prompt_status (__fish_print_pipestatus " [" "]" "|" (set_color 
    $fish_color_status) (set_color --bold $fish_color_status) $last_pipestatus)

    echo -n -s (set_color $fish_color_user) "$USER" $normal @ (set_color 
    $color_host) (prompt_hostname) $normal ' ' (set_color $color_cwd) 
(prompt_pwd) $normal (fish_vcs_prompt) $normal $prompt_status $suffix " "                       
end
fish prompt
  • 1 个回答
  • 261 Views
Martin Hope
quiltedcomputer
Asked: 2022-05-20 13:12:34 +0800 CST

如何使用鱼壳在上一个目录中打开新的终端窗口?

  • 6

我使用 fish shell 和 Gnome-Terminal 版本 3.44。

当我打开一个新终端时,我希望它在以前访问过的目录中启动。我怎样才能通过鱼壳来实现呢?

fish gnome-terminal
  • 1 个回答
  • 201 Views
Martin Hope
wheres_the_github_login
Asked: 2021-10-04 08:25:13 +0800 CST

将fish设置为默认shell时,工具和实用程序不起作用

  • 5

WSL2 运行 Ubuntu 20.04 | 鱼 3.3.1(通过 PPA 安装)

当我尝试在临时鱼会话(通过从我的默认 bash shell运行)中调用poetry和rustup(在我使用时安装的)之类的工具时,我会自动完成并且这些工具可以工作。但是当我创建我的默认 shell ( ) 时,我看到了 - 这些命令甚至都不是从历史中挑选出来的!(是的,我在更改默认外壳后重新启动了我的终端。)有人可以告诉我如何纠正这个问题吗?bashfishfishchsh -s /usr/bin/fishcommand not found

linux fish
  • 1 个回答
  • 409 Views
Martin Hope
ptpdlc
Asked: 2021-08-30 09:12:23 +0800 CST

函数不会在 Fish shell 中自动加载

  • 6

我在 /Users/myUser/.config/fish/functions 中名为 mvnw.fish 的文件中有一个 fish 函数

/Users/myUser/.config/fish/functions 目录确实出现在 $fish_function_path 变量中(在第一位,并不重要)。

我的功能似乎有效:

function mvn-or-mvnw
  if [ -f ./mvnw ]
      echo "Executing mvnw instead of mvn"
      ./mvnw $argv
  else
      mvn $argv
  end
end

如果我明确地采购它,它确实可以正常工作。但它永远不会被鱼自动拾取。

我究竟做错了什么?

fish
  • 1 个回答
  • 190 Views
Martin Hope
Shock9616
Asked: 2021-07-01 21:57:22 +0800 CST

启动鱼壳时出现这个看似随机的错误的原因是什么?

  • 6

很抱歉,我在这里问这样的问题,但我完全不知道是什么原因造成的,而且我似乎无法在其他任何地方找到任何信息。每当我在我的计算机(运行 MacOS Big Sur 11.4 的英特尔 Mac)上启动 fish 时,我都会收到一个关于 $PATH 条目的长错误。

set: Warning: $PATH entry "/usr/local/opt/fzf/bin:/usr/local/opt/[email protected]/bin:/opt/local/bin:/opt/local/sbin:/Library/Frameworks/Python.framework/Versions/3.9/bin:/usr/local/opt/[email protected]/bin:/opt/local/bin:/opt/local/sbin:/Library/Frameworks/Python.framework/Versions/3.9/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Library/Apple/usr/bin:/Applications/VMware Fusion.app/Contents/Public:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/Applications/Wireshark.app/Contents/MacOS" is not valid (No such file or directory)
set: Did you mean 'set PATH $PATH /usr/local/opt/[email protected]/bin:/opt/local/bin:/opt/local/sbin:/Library/Frameworks/Python.framework/Versions/3.9/bin:/usr/local/opt/[email protected]/bin:/opt/local/bin:/opt/local/sbin:/Library/Frameworks/Python.framework/Versions/3.9/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Library/Apple/usr/bin:/Applications/VMware Fusion.app/Contents/Public:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/Applications/Wireshark.app/Contents/MacOS'?

我能想到的唯一问题是我的计算机上没有安装 Wireshark,但我发现这不太可能,因为它曾经是,但我很久以前就卸载了它,而且这个错误在最近几天才开始出现。

有谁知道这个错误的原因以及我如何能够解决它?

macos fish
  • 1 个回答
  • 121 Views
Martin Hope
bataliero1234
Asked: 2021-05-22 05:06:52 +0800 CST

区分鱼中的 Ci 和 Tab?

  • 6

我的鱼配置包含以下绑定:

bind \ci nextd-or-forward-word
bind \co prevd-or-backward-word

bind \t complete

当我注释掉complete然后目录导航按预期工作。但是打开它会导致重新绑定\cias Tab,因此nextd-or-forward-word不再起作用。我知道根据控制字符没关系,我也可以通过发出以下命令来确认:

>> fish_key_reader
Press a key:
              hex:    9  char: \cI  (or \t)
bind \t 'do something'

但是,我想区分\cI和Tab。有没有办法在 Fish 中实现这一点?

shell fish
  • 1 个回答
  • 37 Views
Martin Hope
Sam Mason
Asked: 2021-04-14 07:00:59 +0800 CST

在较小的终端尺寸上启动期间鱼壳输出⏎(即“放弃线”)

  • 6

每当我打开一个新的终端窗口(小于 100 列宽)时,Fish 都会提示我:

⏎
foo@bar ~> 

我没想到第一行⏎会出现!如果它是 100 列或更宽,则不会出现此行...

我不记得这种情况是什么时候开始发生的,可能是一个月左右,但我可以说它在 fish 3.2.1 版和任何时候都会以这种方式运行$COLUMNS <= 99。我已经清空了我的启动脚本,试图找出导致它的原因,而我的 MWEconfig.fish包含:

set foo (ls)

即捕获完整输出的外部程序。$COLUMNS我在100 或更大时看不到那个字符。

这感觉像是一个错误,我在这里搜索了主要的 stackoverflow 站点,以及 fish github 存储库上的问题。我在archlinux下使用wayland,在foot终端模拟器中显示,Sway作为窗口管理器。weston-terminal我可以在and中复制它urxvt,但在tmux.

有关如何使这种情况消失的建议将不胜感激!

terminal fish
  • 1 个回答
  • 211 Views
Martin Hope
Xster
Asked: 2021-01-19 10:26:42 +0800 CST

运行当前命令并将输出通过管道传输到 fzf

  • 6

什么是从fish绑定键绑定以运行当前命令提示符并将其通过管道传输到 fzf 以便于搜索/选择的简单方法?

即 1 按键的完成方式| fzf (enter)?

fish
  • 1 个回答
  • 332 Views
Martin Hope
snapshoe
Asked: 2021-01-06 10:36:43 +0800 CST

有没有一种鱼的方式来做 zsh 的 noglob 内置?

  • 8

来自https://linux.die.net/man/1/zshmisc:

noglob
Filename generation (globbing) is not performed on any of the words.

zsh 示例:

$ ls /*
  <lots of output>
$ noglob ls /*
ls: cannot access '/*': No such file or directory
$ ls "/*"
ls: cannot access '/*': No such file or directory

在鱼中,这适用于引号:

$ ls "/*"
ls: cannot access '/*': No such file or directory

鱼是否可以在不需要引号的情况下做同样的事情?

fish
  • 1 个回答
  • 214 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何减少“vmmem”进程的消耗?

    • 11 个回答
  • Marko Smith

    从 Microsoft Stream 下载视频

    • 4 个回答
  • Marko Smith

    Google Chrome DevTools 无法解析 SourceMap:chrome-extension

    • 6 个回答
  • Marko Smith

    Windows 照片查看器因为内存不足而无法运行?

    • 5 个回答
  • Marko Smith

    支持结束后如何激活 WindowsXP?

    • 6 个回答
  • Marko Smith

    远程桌面间歇性冻结

    • 7 个回答
  • Marko Smith

    子网掩码 /32 是什么意思?

    • 6 个回答
  • Marko Smith

    鼠标指针在 Windows 中按下的箭头键上移动?

    • 1 个回答
  • Marko Smith

    VirtualBox 无法以 VERR_NEM_VM_CREATE_FAILED 启动

    • 8 个回答
  • Marko Smith

    应用程序不会出现在 MacBook 的摄像头和麦克风隐私设置中

    • 5 个回答
  • Martin Hope
    Vickel Firefox 不再允许粘贴到 WhatsApp 网页中? 2023-08-18 05:04:35 +0800 CST
  • Martin Hope
    Saaru Lindestøkke 为什么使用 Python 的 tar 库时 tar.xz 文件比 macOS tar 小 15 倍? 2021-03-14 09:37:48 +0800 CST
  • Martin Hope
    CiaranWelsh 如何减少“vmmem”进程的消耗? 2020-06-10 02:06:58 +0800 CST
  • Martin Hope
    Jim Windows 10 搜索未加载,显示空白窗口 2020-02-06 03:28:26 +0800 CST
  • Martin Hope
    andre_ss6 远程桌面间歇性冻结 2019-09-11 12:56:40 +0800 CST
  • Martin Hope
    Riley Carney 为什么在 URL 后面加一个点会删除登录信息? 2019-08-06 10:59:24 +0800 CST
  • Martin Hope
    zdimension 鼠标指针在 Windows 中按下的箭头键上移动? 2019-08-04 06:39:57 +0800 CST
  • Martin Hope
    jonsca 我所有的 Firefox 附加组件突然被禁用了,我该如何重新启用它们? 2019-05-04 17:58:52 +0800 CST
  • Martin Hope
    MCK 是否可以使用文本创建二维码? 2019-04-02 06:32:14 +0800 CST
  • Martin Hope
    SoniEx2 更改 git init 默认分支名称 2019-04-01 06:16:56 +0800 CST

热门标签

windows-10 linux windows microsoft-excel networking ubuntu worksheet-function bash command-line hard-drive

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve