All Projects → dmi3 → fish

dmi3 / fish

Licence: Unlicense license
Fish config with awesome flexible prompt, unicode symbols, better fzf integration and lot of handy functions.

Programming Languages

shell
77523 projects

Projects that are alternatives of or similar to fish

Zoxide
A smarter cd command. Supports all major shells.
Stars: ✭ 4,422 (+16277.78%)
Mutual labels:  fish, fzf, fish-shell
Fzf.fish
Augment your fish command line with fzf key bindings.
Stars: ✭ 255 (+844.44%)
Mutual labels:  fish, fzf, fish-shell
sublime-fish
A robust Sublime Text syntax package for fish
Stars: ✭ 32 (+18.52%)
Mutual labels:  fish, fish-shell
Dots
Personal *nix configuration files
Stars: ✭ 136 (+403.7%)
Mutual labels:  fish, fzf
Dotfiles
My personal dotfiles.
Stars: ✭ 162 (+500%)
Mutual labels:  fish, fish-shell
Fzf
🌸 A command-line fuzzy finder
Stars: ✭ 40,965 (+151622.22%)
Mutual labels:  fish, fzf
Forgit
💤 A utility tool powered by fzf for using git interactively.
Stars: ✭ 1,823 (+6651.85%)
Mutual labels:  fish, fzf
Sdkman For Fish
Adds support for SDKMAN! to fish
Stars: ✭ 139 (+414.81%)
Mutual labels:  fish, fish-shell
Spacefish
🚀🐟 The fish shell prompt for astronauts
Stars: ✭ 856 (+3070.37%)
Mutual labels:  fish, fish-shell
agnoster
Agnoster for Fish 🐠
Stars: ✭ 42 (+55.56%)
Mutual labels:  fish, fish-shell
Plugin Nvm
Node version manager wrapper for Fish shell
Stars: ✭ 173 (+540.74%)
Mutual labels:  fish, fish-shell
fish-color-scheme-switcher
A fish shell 🐟 plugin to switch color schemes 🌈
Stars: ✭ 48 (+77.78%)
Mutual labels:  fish, fish-shell
Fish Utils
🔧 My utility belt of fish functions, writing these has saved me many hours in the long run... I hope...
Stars: ✭ 94 (+248.15%)
Mutual labels:  fish, fish-shell
Breeze
git tool for fish-shell
Stars: ✭ 52 (+92.59%)
Mutual labels:  fish, fish-shell
Fish Bd
Quickly go back to a parent directory up in your current working directory tree. Don't write 'cd ../../..' redundantly, use bd instead.
Stars: ✭ 113 (+318.52%)
Mutual labels:  fish, fish-shell
To Fish
Bookmarks for Fish Shell
Stars: ✭ 44 (+62.96%)
Mutual labels:  fish, fish-shell
Packages Main
Primary Oh My Fish package repository.
Stars: ✭ 138 (+411.11%)
Mutual labels:  fish, fish-shell
Dotfiles
📁 📋 📎
Stars: ✭ 6 (-77.78%)
Mutual labels:  fish, fish-shell
Dotfiles
Configurations for the tools I use every day
Stars: ✭ 898 (+3225.93%)
Mutual labels:  fish, fzf
Z.lua
⚡ A new cd command that helps you navigate faster by learning your habits.
Stars: ✭ 2,164 (+7914.81%)
Mutual labels:  fish, fzf

Fish Shell Goodies

_install.fish

 _____ _     _   
|   __|_|___| |_ 
|   __| |_ -|   |
|__|  |_|___|_|_|

Fish config with awesome flexible prompt, unicode symbols, better fzf integration and lot of handy functions.

Instalation

  1. git clone [email protected]:dmi3/fish.git
  2. Install configs:
    • All: run ./_install.fish this will remove ~/.config/fish! Backup before running
    • Some: source files you are interested in your ~/.config/fish/config.fish
  3. Install fzf or run fish -c update-fzf

aliases.fish

Useful aliases

  • We also have Bash version, and portable Over-SSH version
  • Create missing directories in path when calling mkdir
  • path command to print full file path
  • rmm command to remove directories, but ask nicely
  • cpp command to copy directories, but ask nicely
  • cp to ask when overwriting files
  • mv to ask when overwriting files
  • add-to-path Command to add current directory to path
  • Human readable sizes for df, du, free (i.e. Mb, Gb etc)
  • fs command to show free space on physical drives
  • disks command to List disks
    • Clearly shows which disks are mounted temporary
    • I always run this command before dd sd-card, to make 100% sure not to override system partition
  • partitions command to list partitions
  • sizeof command to show size of file or directory
  • connect command Connect to wifi from terminal
  • lockblock command to prevent screen locking untill next reboot
  • wget to save file with provided name
  • unset to unset enviroment variable
  • Prepend sudo to nano command if file is not editable by current user
    • Warn if file does no exist
  • If Sublime Text installed - use it instead of Gedit
  • Show 3 (next and prev) months in cal, start week on monday
    • Use nicl in installed
  • If sssh2 installed - use it instead of ssh
  • If plug installed - use it for interactive mount/unmount of USB drives
  • icat Show images in kitty
  • ll "Scroll ll if theres more files that fit on screen"
  • mkcd "Create and cd to directory"
  • amount "Mount archive"
  • aumount "Unmount all mounted archive (and gvfs locations)"
  • copy "Copy pipe or argument"
  • copypath "Copy full file path"
  • color "Print color"
  • reset_windows "Reset all windows size and bring it to main monitor. Useful if DE messes up in multiple monitor configuration"
  • `nano
  • run "Make file executable, then run it"
  • launch "Launch GUI program - hide output and don't close when terminal closes"
  • open "Open file by default application in new process"
  • b "Exec command in bash. Useful when copy-pasting commands with imcompatible syntax to fish "
  • c "Math using Python"
  • subl "Starts Sublime Text. Additionally supports piping (i.e. ls | subl) and urls (i.e. subl http://jenkins/logs)"
  • qr "Prints QR. E.g. super useful when you need to transfer private key to the phone without intermediaries cat ~/.ssh/topsecret.pem | qr"

colors.fish

Dark theme. See screenshots.


completions/todo.fish

Decription

Auto generate completion for todo script. Search script for strings starting with -- and add them to Fish completion as arguments for todo command


config.fish

Entry point that includes all other configs


developer.fish

Functions useful for developers

  • ccat Cat file, but with syntax highlighting
  • git-show-unpushed-commits Git show unpushed commits
  • server-here Start serving files in current directory and open browser
  • git-revert-file "Revert single file in git"
  • git-wat "Show 5 latest commits"
  • git-recent-branches "Show recentbranches"
  • git-pr "Create PR on Github"
  • gradle "Use ./gradlew if exists"
  • src 'Open/edit source of script or function located in $PATH' --wraps which
  • td "Add to ~/todo.md list"
  • sdkman "Run sdkman"
  • sdkman-init "Inits sdkman"
  • bak "Copies (backups) file in same folder with .bak extension"

main.fish

Better integration of Fish Shell and fzf

  • See Official Fish documentation
  • Clear input on Ctrl+U
  • Exit on Esc if single command mode enabled
  • Convinient directory navigation using Alt+Ctrl +
    • History back/forward/go to parent dir
    • You can use Fish as file manager!
    • Comes handy when you start typing command, then realize wrong dir
  • Send terminate on Ctrl+Shift+C to free Ctrl+C for copy (in terminal settings). See https://developer.run/36
  • Prints directory and currently running command in tab title ↓
  • Ctrl+R show fzf (fuzzy) history search where you can:
    • Super advanched analog or Ctrl+R in Bash
    • Execute previos command
    • Edit command before execution
    • Delete history entry (very useful for no longer actual commands)
  • Ignore ls, ll, and cd history. Ctrl+E is better way to access previosly visited directories
  • fish_user_key_bindings "Key bindings. Go to functions definition for description. Use fish_key_reader. Docs"
  • fish_title "Prints directory and currently running command in tab title. user@host in prompt when connected via ssh."
  • fish_greeting "Prints /var/run/motd.dynamic as greeting. Use in combination with headlines.sh to see top news"
  • show_exit_code "Show exit code on command failure" --on-event fish_postexec
  • what-did-just-happened "Show start time, and duration of last executed command"
  • save_dir "If command was executed if directory, save dir to Ctrl+E history for quick access." --on-event fish_postexec
  • fzf-history-widget "Ctrl+R for history"
  • search "CTRL+F Fuzzy recursive search files by name in current directory & append selection to current command"
  • search-contents "ALT+CTRL+F search (fuzzy) file by contents"
  • scd "Ctrl+E to access most frequently visited directories."
  • update-fzf "Installs or updates fzf"
  • freq "Line frequency in piped input. See https://gist.github.com/rsvp/1859875"
  • bind_bang "Type !! to get last command"
  • bind_dollar "Type !\$ to get last command argument"

prompt.fish

Description

Two line prompt with full path and Git integration that scales nicely

  • `fish_prompt

singlecmd.fish

Decription

  • Prompts for single Fish command in left bottom corner of given application window
  • To make benefit of Fish shell autocompletion and history
  • Closes after one command is executed
  • If command fails, leaves window to inspect error message

For example you want execute git clone [email protected]:dmi3/bin.git in current directory from Double Commander:

  • Press Shift+F2 and terminal window appears in left bottom corner of Double Commander window
  • First you want git and clone to be autocompleted using Fish
  • During clone process you want to see git command output to monitor progeress
  • If everything is ok, promt will close
  • In case of error you will have chance to read error message

Requirements

  • sudo apt-get install fish wmctrl xterm

Usage

  • Use Fish config that supports ONE_COMMAND
  • Argument is window title of any app:
    • singlecmd.fish "Sublime Text"
    • singlecmd.fish "IntelliJ IDEA"
    • ...
  • OR open Double Commander
  • ToolbarInsert new button:
    • Command: /path/to/singlecmd.fish
    • Parameters: "Double Commander"
    • Hot Key: Shift+F2

web.fish

Calls to various CLI friendly web services

  • myip Shows external ip
  • localip Shows (local) internal ip
  • whereami is like whoami but shows your external ip and geolocation
  • xkcd Print color-adjusted xkcd in your terminal! See https://developer.run/40
  • albumart Show hi-res album art of currently playing song in Spotify
    • Requires sp
  • random-name "Random name for registration on random websites. How about Helen Lovick? Roger Rice?"
  • random-alias "Docker-like alias generator: thirsty_mahavira, boring_heisenberg. Don't know how to name file/project/branch/file? Use this!"
  • random-email "Random email for registration on random websites. Generate random email in one of Mailinator subdomains and provide link to check it. Useful when http://bugmenot.com/ is not available."
  • random-password "Generate random password" --argument-names 'length'
  • weather "Show weather"
  • xsh "Prepend this to command to explain its syntax i.e. xsh iptables -vnL --line-numbers"
  • transfer "Upload file to transfer.sh"
  • translate "Translate word using Yandex"
  • syn "Find synonyms for word"
  • emoji "Search emoji by name"
  • waitweb 'Wait until web resource is available. Useful when you are waiting for internet to get back, or Spring to start' --argument-names 'url'
  • virustotal "Check file hash by virustotal.com"

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].