Computer >> บทช่วยสอนคอมพิวเตอร์ >  >> การเขียนโปรแกรม >> Python

Fish - Shell โต้ตอบอัจฉริยาสำหรับ Linux


Friendly Interactive Shell (FISH) เป็น shell สำหรับ UNIX/UNIX-like มีความสามารถพิเศษหลายอย่าง ทำงานร่วมกับ bash หรือ ZSH ได้ แตกต่างจาก shell อื่นที่ปิดฟีเจอร์ไว้ default FISH เปิดทุกอย่างไว้ default เพื่อใช้งานเต็มที่

คุณสมบัติเด่น

  • User-friendly และ Interactive
  • Web-based configuration ในตัว
  • รองรับ 256 terminal colors และ VGA Color
  • รองรับ X clipboard
  • Error checking capabilities
  • คำสั่ง help ดูเอกสาร FISH
  • Auto-suggestions ใช้ Arrow key เลือก

การติดตั้ง FISH บน Ubuntu

  1. ติดตั้ง python-software-properties: sudo apt-get install python-software-properties
  2. เพิ่ม repository: sudo add-apt-repository ppa:fish-shell/nightly-master
  3. อัปเดต: sudo apt-get update
  4. ติดตั้ง fish: sudo apt-get install fish

การใช้งาน

$ fish                    # เริ่มใช้ fish shell
Welcome to fish, the friendly interactive shell
Type help for instructions on how to use fish

$ echo $FISH_VERSION      # ตรวจสอบเวอร์ชัน
2.2.0-680-ga701264

$ da                      # พิมพ์ "da" ได้ auto-suggestion "date"
$ date
Tue Mar 15 11:29:50 IST 2016

$ help                    # เปิดเอกสารออนไลน์ (web-based)

ตั้งค่าเป็น Default Shell

$ chsh -s /usr/bin/fish   # ตั้ง fish เป็น default
$ chsh -s /bin/bash       # กลับไปใช้ bash

หมายเหตุ: บทความใช้ PPA nightly-master ปัจจุบันแนะนำติดตั้งจาก repo หลัก: sudo apt install fish (Ubuntu 20.04+)