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
describecommand 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.
__auto_dir: n/a__best_pager: Choose the best available pager (opinionated)__complete_extension: Complete extension with filecomplete.rb__exec_available: test if command is available__expand_path: commandline function to expand str/str using fasd and fzf__f_dir_regex: Construct regex from multiple directory arguments__fuzzy_cd: fuzzy cd with jump bookmarks__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 arguments__unfuck_previous_command: Unfuck the previous command_doing_is_active: Check if doing is active_tide_item_doing_active:_tide_item_doing_now:_tide_item_message:_tide_item_ssh_badge: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 clipboardabbrs: Search abbreviationsack: 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)ans: Get the accepted or all answers from StackOverflow as Markdownax: Make file executableb: Run a binstub from the current project with bundlerbadge: Set iTerm session badgebak: Back up a file by moving or copying to FILE.bakbe: Run a command in the context of the current bundlebid: Get bundle id for app namebld: Run howzit build systembox: Draw a box around text.browser: Write output to a temp HTML file and open in default browserc: n/acalc: CLI calculatorcapitalize: Capitalize the first letter of a given textcat: Use appropriate cat replacement for file typecatc: Concatenate files and print on the standard output (bypass cat alias)cbp: ClipBoard Previewcd_fuzz: n/acdb: Open broot with folders onlycdd: Choose cd dir from menu (fzf)cdr: cd to a recently visited directorycdt: Change dir based on TagFiler tagschar-count: Count characters in a filechrome: Open Google Chrome with optional file (completion available)cl: copy output of last command to clipboardclean-unzip: Unzip a zipfile to a clean folderclip: Copy file to clipboardcode: n/acodep: Open a VS Code project (completion available)coln: Column Nconfirm: Prompt for confirmationcop: alias cop=gh copilotcope: alias cope=gh copilot explaincops: alias cops=gh copilot suggestcopy: Copy piped contents to clipboard without newlinescorner_print: Print to a corner of the screencpu: Show CPU usagecpwd: Copy the current directory path to the clipboardcr: Open CodeRunnercrush: pngcrushcursor: n/adadjoke: Get a dad joke from icanhazdadjoke.comdash: Open argument in Dashdays_in: get the number of days in a given month/yearddg: search duckduckgodefault: Default value if first argument is emptydegit: Remove all traces of git from a folderdesc: Print the description of a Fish function.describe: Show description for functiondhelp: Display command help in Dashdirfor: get origin directory for running processdit: alias dit docker run -itdman: Open man page in Dashdockcomm: commit a docker imagedockerfish: alias dockerfish docker run -it --rm andreiborisov/fish:3docx2mmd: Convert docx to markdown: docx2mmd [source] [target]doing_active: Check if doing is active and add tide itemdoing_now: Get the current doing now for tidedpl: alias dpl=howzit -r deploydpld: howzit -r --default deploydpln: howzit -r --no deploydply: howzit -r --yes deployeat: Move files from a directory to the current directoryecho-variable: Echo the value of a variable, uppercased if needededit-git: Edit the first file changed in the current git branchedit-gitconfig: Edit the git config file for the current repoeds: Shortcut for editscriptensure-trailing-newline: Ensure a file ends with a newlineer: edit recent file using fasd and fzfesc: Ruby cgi escapeeschtml: Ruby cgi HTML escapeextract: unarchive any file typef: Open directory in Finder with jump shortcutsfallback: allow a fallback value for variablefarch: Test Architecture of Frameworkfasdfzf: Helper function to return a file via fasd and fzfffdir: fuzzy find a directory, pass root dir and sequential search stringsfffile: fuzzy find a file, pass root dir and sequential search stringsffmark: fuzzy find a jump markfiletype: Returns the kMDItemContentTypeTree for a filefindgist: select gist from list and display contentsfindgistid: select gist from list and display contentsfinish: Finish last unfinished doing task by searchfire: Open Firefox with optional file (completion available)fix: Fix up last command with search/replaceflush: Flush DNS cachefo: Open file using jump shortcuts and fuzzy matchingfp: Find and list processes matching a case-insensitive fuzzy-match stringft: A shortcut for mdfinding tagged items system-widefuck: Correct your previous console commandfunced-last: Edit last functionfuncsave-last: Save last functionfuncsubl: Edit a function with Sublime Text (autosaves)g2: Fish "jump" replacement with fuzzy subdirectory matchinggaa: alias gaa git add (git top)gc: n/ageminfo: Get info for a gem with partial name matchinggeminstall: install a gem with fuzzy searchgemuninstall: Uninstall a gem with partial name matchingget_ext: Get the file extension from the argumentget: alias get=git clonegetignore: 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 messagegi: gitignore.io cli for fishgit-changing-files: List all files that have changed in the current git repositorygit-protocol-https-to-git: Change git remote protocol from https to gitgit-restage: Restage all changes in the current git repositorygit-restore: Restore files in the working tree from the index or another treegitar: Automatically add new and remove deleted files from the git indexgitrelease: Create a git release using hubgmine: Resolve git conflicts with minegsearch: Grep git commit historygt: n/agtheirs: Resolve git conflicts with theirsh: howdoi shortcuthalp: Get help for any builtin, alias, or functionhi: Import historyhist: Print the command from historyhistory_select: Select a command from history (fzf)hmark: n/ahooks: n/ahowlong: show last command execution timehs: Search, select, and exec from historyidea: Record an idea with doingidletil: Wait until system idle time has reached X seconds and optionally execute command (requires beengone)imdown: Test for internet connection and notify when it comes upimgsize: Quickly get image dimensions from the command lineindex_of: return the 1-based index of the first argument in remaining argumentsinsert_aligned: Replace a portion of a string with another string with alignmentinsert: Insert a string in another string at start positionip: Get external IP addressips: Display all ip addresses for this hostis-clean-zip: Check if a zipfile is cleanis: test if given file is of a file type. is TYPE FILEisodate: Return the current date in ISO 8601 formatisodatetime: Return the current date and time in ISO 8601 formatistext: test if given file is plain textjfind: jtag: search for tagsjothers: jtag: List tags of other posts containing (all) tagsjump_fasd: n/ajump: Fish "jump" replacement with subdirectory matchinglast_history_item: Return the last item from command historylb: Select file in LaunchBar, fall back to the current directorylbash: launch bash login shelllicense: Get license text from GitHubline-count: Count lines in a filelld: n/alno: Print file with line numbersloop: looplsfuncs: Print user-defined Fish functions (including any executable files in first path of $fish_user_paths).\n\tOpts:\n\t\t-a: only print fish functions;\n\t\t-p : pass additional path(s) in which to search for potential scripts, bins, commands.lsgrep: Wildcard folder/file searchlsregister: Rebuild Launch Services databaselsz: ls for inside of compressed archiveslt: List directory from oldest to newestltr: List directory from newest to oldestm.: Check if the current directory is bookmarkedmack: ack for markdownmd: Test if current directory is bookmarkedmdgrep: ripgrep for markdownmem: Show memory usagemkdir: mkdir with subdirs, option to cd after creatingmmdc: Open MultiMarkdown Composer 5 with optional file (completion available)move: move files and directoriesnans: Save the accepted answer from StackOverflow as Markdown to nvUltranman: Open man pages in a new terminal windownope: echo "nope"o: Shortcut to open an app from the command lineoptim: Open ImageOptim with optional file (completion available)pbgist: private gist from clipboardpbgistp: gist from clipboardpbp: Pasteboard Previewpbpmd: Pasteboard Markdown Previewpercentof: Quick calculation for sale discountspercentoff: Quick calculation for sale discountspg: Case insensitive search for processpless: 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 sortingprompt_message: Set the prompt messager: Run Reiki via bashraise: Like ruby raise, but for fishrandom-file: Select a random file from the current directoryreadpass: Read a password from stdin and export it as an environment variableremove_user_path: Shows user added PATH entries and removes the selected one (fzf)remove: Remove files and directories, but only if they are git repositoriesrename-pwd: Rename the current directory to new_namerepeat: Repeat the given command indefinitely with a pauseretry: Retry a command until it succeedsrule: Print a horizontal rule with optional messagesend: Send to other iTerm paneserve: Start a local server for the current directory, open in browsersetapp: Get an is.gd link to a setapp affiliate page for an app (requires Setapp Affiliate shortcut)setapplink: Generate an internal Setapp link for an appshellesc: Ruby shellwords escapeshellunesc: Ruby shellwords unescapeshellwords: Split a string like a shell wouldshorten: Truncate every line of input to specified widthshortest: Return the shortest string in arrayshowalias: Show an aliassign: Sign a macOS app with Developer ID Applicationskylight: alias skylight=skylighting -n -t ~/styles/kde/breeze-dark.themespell: Get spelling options from aspellspellcheck: Check all Markdown files in git repo (recursive)spellf: Get first spelling option from aspellsrc: reload config filestretch: Stretch and Clean URL (requires Stretch and Clean URL Shortcut)sublp: Open a VS Code project (completion available)sum: Take a list of numbers and return the sumsymlink: Create a symlink from _from to _to, makes paths absolutetd: [Create and] open project todotitle-case: Convert a string to title casetmj: For use with my tmux utility (bash_scripts/tm)todos: Search for TODOs and FIXMEs in the current directorytower: Open Tower for directory (default CWD)tp: Open TaskPaper with optional file (completion available)trim-left: Trim character lefttrim-right: Trim character righttrim-scheme: Trim the scheme from a URLtrim-trailing-slash: Trim trailing slashes from a stringtunnel: Create a tunnel to a host and porttween: Display lines between start and end line numbersunbak: remove bak extensionuncolor: Remove color codes from stringunesc: Ruby cgi unescapeunexpand-home-tilde: Change $HOME to ~up: cd to a parent folder with fuzzy matchingupdown: cd to a directory and then fuzzy search its treeurldec: URL decodeurlenc: url encode the passed stringv: vim via fasd and fzfverify: alias verify=codesign --deep -vv --verifyvimver: Open the version file of the current gem in vimwarn: Echo log message to STDERRwatchdns: n/awatchthis: Watch for changes in the current directory and execute commandwhatsonport: find out what PID is running on a port (requires password)wifi-network-name: Get the name of the current wifi networkwifi-password: Get the password for the current wifi networkwifi-reset: Reset the Wi-Fi connectionword-count: Count the number of words in a string (piped)xc: Open Xcode with optional file (completion available)yep: echo "yep"yn: Simple pass/fail test for given commandz: Custom fasd cd with fzfzipup: exports a clean copy of the current git repo (master) to a zip file
__by_length:__ff_dir_regex:__ff_dir_to_regex:__should_na:__sort_by_length:append_slash: append a slash to each line/argument if neededmap:remove_empty: removes empty elements from an arrayreturn_array: Echo out an array one line at a timeshorten_home: substitutes $HOME with ~shortest_common:slash_if_dir: Add trailing slash if directoryslugify:to_slug:trim_pwd: removes the current working directory from an array of paths
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!