A collection of configuration files and functions for the Fish shell. These would be installed in ~/.config/fish/
, though I don't recommend overwriting your current setup wholesale. Pick and choose, use this repo as examples for your own exploration.
-
bash_scripts: some utilities that were too much trouble to port from Bash and work just as well run with hashbangs. They just need to be in the $PATH (some commands reference my local path,
~/scripts/fish
, which will need updating). -
completions: various completion configurations for custom commands.
-
custom: some files I source at login (from
config.fish
), mostly shared functions I think I need to have in memory (as opposed to autoloaded), and some aliases that don't make great functions. -
functions: the mother lode. All of my favorite commands (and some experimental ones). Most have a description on the function declaration, so you can see it in source or by running the
describe
command that you'll find in this folder (which essentially runsfunctions -Dv
, but prettier).
COMPLETIONS NOTE: for the file extension completion function to work, it needs to be able to find the filecomplete.rb
script located in the bash_scripts
directory. Edit functions/__complete_extension.fish
to point to that file on your system.
64enc
: encode a given image file as base64 and output css background property to clipboard64font
: encode a given font file as base64 and output css background property to clipboard64svg
: encode a given svg file as base64 and output css background-image property to clipboard__auto_dir
: if command fails see if it's a directory or local executable__best_pager
: Choose the best available pager (opinionated)__complete_extension
: Used by improved completion functions__exec_available
: test if command is available__human_time
: Humanize a time interval for display__is_text
: Test if a file is plain text__ls_text_files
: List all text files in current directory__prev_token
: Get the previous token on the command line__re_extension
: remove extension from word under/before cursor__regex_from_args
: Helper to create greedy regular expression from multiple argumentsack
: ack defaults, ~/.ackrc for moreacorn
: Open Acorn.app with optional file(completion available)add_user_path
: Shortcut to add a user pathaffd
: Open Affinity Designer with optional file (completion available)afff
: Open Affinity Photo with optional file (completion available)ag
: Silver Surfer defaults, smart case, ignore VCSalpha
: Open ImageAlpha with optional file (completion available)ax
: Make file executablebak
: move file to .bak versionbe
: bundle exec aliasbid
: Get bundle id for app namebld
: Run howzit build systembrowser
: Write output to a temp HTML file and open in default browserbunches
: Edit Bunches in Sublimec
: clear screen aliascalc
: CLI calculatorcat
: Use bat instead of cat unless it's a Markdown file, then use mdlesscbp
: ClipBoard Previewcdd
: Choose cd dir from menu (fzf)cdr
: cd to a recently visited directorycdt
: Change dir based on TagFiler tagschrome
: Open Google Chrome with optional file (completion available)cl
: copy output of last command to clipboardclip
: Copy file to clipboardcode
: Open VSCode with optional filecpwd
: Copy the current directory path to the clipboardcr
: Open CodeRunnercrush
: pngcrushdadjoke
: Get a dad joke from icanhazdadjoke.comdash
: Open argument in Dashddg
: search duckduckgodegit
: Remove all traces of git from a folderdescribe
: Show description for functiondirfor
: get origin directory for running processdman
: Open man page in Dashdocx2mmd
: Convert docx to markdown: docx2md [source] [target]eds
: Shortcut for editscripter
: edit recent file using fasd and fzfesc
: Ruby cgi escapeeschtml
: Ruby cgi HTML escapeextract
: unarchive any file typef
: Open directory in Finderfallback
: allow a fallback value for variablefish_prompt
: "Bira's weird cousin" promptfisher
: fish package managerfix
: Fix up last command with search/replaceflush
: Flush DNS cachefp
: Find and list processes matching a case-insensitive fuzzy-match stringft
: A shortcut for mdfinding tagged items system-widefuck
: Correct your previous console commandgc
: git commit -amget_ext
: Get the file extension from the argumentgetignore
: Get ignore file from gitignore.io and save to .gitignoregetignores
: Pull gitignore.io list of available .gitignore filesgg
: Commit pending changes and quote all args as messagegist
: gist is defunkt, use jistgistp
: private gistgitar
: Automatically add new and remove deleted files from the git indexgmine
: Resolve git conflicts with minegsearch
: Grep git commit historygt
: jump to top level of git repogtheirs
: Resolve git conflicts with theirshs
: Search, select, and exec from historyidea
: Record an idea with doingimdown
: Test for internet connection and notify when it comes upimgsize
: Quickly get image dimensions from the command lineip
: Get external IP addressips
: Display all ip addresses for this hostistext
: test if given file is plain textjs
: lint with jslintlb
: Select file in LaunchBar, fall back to the current directorylbash
: launch bash login shelllno
: Print file with line numberslsgrep
: Wildcard folder/file searchlsz
: ls for inside of compressed archiveslt
: List directory from oldest to newestltr
: List directory from newest to oldestmack
: ack for markdownmd
: Test if current directory is bookmarkedmkdir
: mkdir with subdirs, option to cd after creatingmmdc
: Open MultiMarkdown Composer with optional file (completion available)nope
: echo "nope"o
: Shortcut to open an app from the command lineoptim
: Open ImageOptim with optional file (completion available)pbgist
: public gist from clipboardpbgistp
: private gist from clipboardpercentof
: Quick calculation for sale discountspercentoff
: Quick calculation for sale discountspless
: cat a file with pygments highlightingpman
: Display a man page as a PostScript PDF in Preview.appprev
: Open Preview with optional file (completion available)preview
: Preview text files using fzf and batprioritize
: set a numeric prefix on a file for sortingr
: Run Reiki via bashrule
: Print a horizontal rulerulem
: Print a horizontal rule with messagervm
: Ruby enVironment Managerserve
: Start a local server for the current directory, open in browsershellesc
: Ruby shellwords escapeshellunesc
: Ruby shellwords unescapeshorten
: Truncate every line of input to specified widthspell
: Get spelling options from aspellspellf
: Get spelling options from aspellsrc
: reload config filesublp
: Open a Sublime Text project (completion available)sum
: Take a list of numbers and return the sumtd
: [Create and] open project todotmj
: For use with my tmux utility (bash_scripts/tm)tower
: Open Tower for directory (default CWD)tp
: Open TaskPaper with optional file (completion available)unbak
: remove bak extensionunesc
: Ruby cgi unescapeup
: cd to a parent folder with fuzzy matchingurlenc
: url encode the passed stringwatchthis
: Watch for changes in the current directory and execute commandxc
: Open Xcode with optional file (completion available)yep
: echo "yep"yn
: Simple pass/fail test for given commandzipup
: exports a clean copy of the current git repo (master) to a zip file
I'll update these every once in a while. If you're digging through and spot a problem, a stupid mistake, or something that could just plain be done better, please add an issue and let me know!