Difference between revisions of "Fzf"
From Logic Wiki
(Created page with "Category:MacOs Category:Ubuntu Category:bash == Installation == macOS brew install fzf Ubuntu / Debian sudo apt install fzf == Example == <pre> #!/usr/bin/env...") |
(No difference)
|
Latest revision as of 11:26, 12 January 2026
Installation
macOS
brew install fzf
Ubuntu / Debian
sudo apt install fzf
Example
#!/usr/bin/env bash choice=$(printf "%s\n" \ "Start server" \ "Stop server" \ "Restart server" \ "Exit" \ | fzf --prompt="Select an option > ") case "$choice" in "Start server") echo "Starting..." ;; "Stop server") echo "Stopping..." ;; "Restart server") echo "Restarting..." ;; "Exit") exit 0 ;; esac