Making grfsh your shell
此内容尚不支持你的语言。
Try grfsh for a while by running grfsh from your current shell. When you are happy with it, make it your login shell.
1. Register it in /etc/shells
Section titled “1. Register it in /etc/shells”chsh only accepts shells listed in /etc/shells. The .deb, .rpm and AUR packages add grfsh there for you. Otherwise:
command -v grfsh | sudo tee -a /etc/shells2. Change your shell
Section titled “2. Change your shell”chsh -s "$(command -v grfsh)"Log out and back in, or quit your terminal app completely and reopen it. Some terminals, Ghostty among them, read the login shell once when they start. New terminals now start grfsh as a login shell, which reads ~/.config/grfsh/profile or ~/.grfsh_profile and then your rc file.
Terminal apps
Section titled “Terminal apps”Some terminals start their own shell setting instead of your login shell:
- macOS Terminal: Settings, General, “Shells open with”, then pick “Default login shell”.
- iTerm2: Profiles, General, Command, then pick “Login Shell”.
- VS Code: set
terminal.integrated.defaultProfile.linuxor.osxto a profile whosepathis the grfsh binary. - tmux: add
set -g default-shell /path/to/grfshto~/.tmux.conf.
Going back
Section titled “Going back”chsh -s /bin/bashor /bin/zsh. If grfsh fails to start for some reason, open a terminal with a different shell from the terminal’s own menu and run the command above.
Keeping scripts on bash
Section titled “Keeping scripts on bash”Your login shell does not change how scripts run. A script with #!/bin/bash on its first line keeps running under bash. Scripts without a shebang that you run with grfsh script.sh use grfsh.