[wiki]使用fish作为你的shell

参与到Ubuntu的翻译中来
回复
头像
freeflying
论坛版主
帖子: 521
注册时间: 2005-03-26 9:38
送出感谢: 0
接收感谢: 0

[wiki]使用fish作为你的shell

#1

帖子 freeflying » 2005-04-14 20:56

This How-To will show you how to install and run fish to test out its functionality. If you decide to use fish as your default shell, the last part of this How-To will show you how to make it your default.

Hopefully a few of you will try out fish. I've been using it for about 30 minutes and find that it's very useful for my day-to-day work. While I wouldn't recommend it over bash as a scripting platform, it runs bash scripts without problems and you can easily code bash scripts while working with fish as your shell (that's what the shebang line is for).

Why fish makes an excellent shell for anybody who just wants a better way to use their command line interface:

- Context-aware tab completion ('bunzip {tab}' shows all bz2 archives, cd {tab} shows all directories)
- tab completion shows more info about matching files
- tab completion uses scrollable list for matches. Use arrows to scroll.
- tab completion can complete paramaters for built-in commands (eg. ls -{tab} will show paramaters for the ls command)
- Ctrl-Y pasting and Ctrl-K cutting uses the X Windows clipboard.
- Search command history: type first part of previously run command, then use arrows to scoll through matching commands. Or just use arrows to scroll all commands like in bash.
- Syntax highlighting of commands as you type.

Home page: http://roo.no-ip.org/fish/
Features: http://roo.no-ip.org/fish/user_doc/difference.html

How to install so you can test fish without actually making it your default shell:
- wget http://roo.no-ip.org/fish/files/1.6/fish-1.6-1.i386.rpm
- sudo alien fish-1.6-1.i386.rpm
- sudo dpkg -i fish_1.6-2_i386.deb
- run 'fish' to try it out temporarily (goes away after you close the current terminal window or run 'exit')

How to use fish as your default shell:
- run 'sudo gedit /etc/shells' and add '/usr/local/bin/fish' as a new last line.
- run 'chsh -s /usr/local/bin/fish'.
- logout then back in to make shell change appear. Now every time you open a terminal you will get fish instead of bash.
- You can run 'chsh -s /bin/bash' at any time to make bash your default shell again.

Edit: This how-to converts an RPM to deb out of necessity. I unfortunately wasn't able to get fish to compile on my system, but I have contacted the developer and will include compilation instructions here if the issue gets resolved. Converting the RPM to deb works perfectly, however.
头像
ct
帖子: 2201
注册时间: 2005-04-06 21:15
来自: 安徽黄山
送出感谢: 0
接收感谢: 0
联系:

HOW TO:使用fish作为你的shell

#2

帖子 ct » 2005-04-15 15:14

这个HOW-TO将告诉你如何安装和使用fish的功能。如果你决定将fish作为你的默认的shell,这个篇HOW-TO的最后的部分将会告诉你如何设置它成为你的默认shell。

但愿你能试试fish。当我使用它大约半个小时后我 发现它是非常的适合于我每天的工作的。但是我不会把它脱离bash而作为一个脚本平台,她运行bash脚本没有任何的问题,在fish中你能很容易的使用bash代码。

为什么 fish 对于任何想用更好的方式使用命令行和接口的人都是一个杰出的shell:
-完整的命令关联标签('bunzip{tab}'显示所有的bz2档案文件,cd{tab}显示所有的目录)
-使用滚动的列表,可以通过方向键来滚动
-Ctrl-Y 粘帖 Ctrl-K 剪切,使用X windows的剪切板
-跟踪命令历史:打出头字符后会自动关联到先前的类似命令,通过箭头来导出命令,或者就像在bash中的那样通过箭头键来调用先前使用的命令。
-能够对你输入的命令进行语法高亮显示。

主页: http://roo.no-ip.org/fish/ (这几个网站我是打不开的,想试试都没有机会)
特点: http://roo.no-ip.org/fish/user_doc/difference.html

如何安装和使用fish而不把它作为默认的shell:
-wget http://roo.no-ip.org/fish/files/1.6/fish-1.6-1.i386.rpm
-sudo alien fish-1.6-1.i386.rpm
-sudo dpkg -i fish_1.6-2_i386.deb
-运行‘fish’来试用它吧(退出时请关闭终端窗口或输入命令 'exit')

如何使用fish作为你的默认shell:
-运行'sudo gedit /etc/shells'并且添加‘/usr/local/bin/fish’到最后一行。
-运行‘chsh -s /usr/local/bin/fish’。
-保存退出,现在你在任何时候打开一个终端时都会调出fish而代替了bash。
-你能够通过运行‘chsh -s /bin/bash’来将bash重新设为你的默认shell。

编辑:这个HOW-TO转换RPM到deb不是必须的。我没有成功的将fish编译安装到我的系统,但是我将编译的问题联系反馈了开发者。当然,转换RPM到deb的工作是完美的。
上次由 ct 在 2005-04-15 21:40,总共编辑 2 次。
头像
oneleaf
论坛管理员
帖子: 10208
注册时间: 2005-03-27 0:06
系统: Ubuntu 12.04
送出感谢: 7 次
接收感谢: 99 次

#3

帖子 oneleaf » 2005-04-15 18:53

当净其意如虚空,远离妄想及诸取,令心所向皆无碍
kardinal
帖子: 750
注册时间: 2006-03-19 11:39
送出感谢: 0
接收感谢: 6 次

#4

帖子 kardinal » 2006-06-07 23:04

非常酷 :lol:
似乎有的时候响应有点稍微慢??
头像
millenniumdark
论坛版主
帖子: 4160
注册时间: 2005-07-02 14:41
系统: Ubuntu 14.04 (Kylin)
送出感谢: 43 次
接收感谢: 9 次
联系:

#5

帖子 millenniumdark » 2006-07-29 0:54

回复

回到 “软件和文档翻译”