Linux command
fish 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Start fish shell
fish
Execute command
fish -c "[echo hello]"
Run script
fish [script.fish]
Start without config
fish --no-config
Check syntax
fish -n [script.fish]
说明
fish (Friendly Interactive Shell) is a smart, user-friendly shell with syntax highlighting, autosuggestions, and tab completions that work out of the box. Unlike bash or zsh, fish doesn't require extensive configuration to be useful. It features web-based configuration, informative error messages, and discoverable features. fish uses a cleaner scripting syntax that differs from POSIX shells, prioritizing usability over compatibility.
参数
- -c _COMMAND_
- Execute command and exit.
- -n, --no-execute
- Syntax check only.
- --no-config
- Skip configuration files.
- -i, --interactive
- Force interactive mode.
- -l, --login
- Act as login shell.
- -p, --profile _FILE_
- Output profiling data.
- --help
- Display help information.
FAQ
What is the fish command used for?
fish (Friendly Interactive Shell) is a smart, user-friendly shell with syntax highlighting, autosuggestions, and tab completions that work out of the box. Unlike bash or zsh, fish doesn't require extensive configuration to be useful. It features web-based configuration, informative error messages, and discoverable features. fish uses a cleaner scripting syntax that differs from POSIX shells, prioritizing usability over compatibility.
How do I run a basic fish example?
Run `fish` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -c _COMMAND_ do in fish?
Execute command and exit.