conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "feat: Add pip completion to fish\n" }, { "from": "human", "value": "# Path to Oh My Fish install.\nset -gx OMF_PATH \"/home/e4r7hbug/.local/share/omf\"\n\n# Customize Oh My Fish configuration path.\n#set -gx OMF_CONFIG \"/home/e4r7hbug/.config/omf\"\n\n# Load oh-my-...
fish
chosen
[ { "from": "system", "value": "[fish] Update fish 2.4.0 vi insert mode bindings\n" }, { "from": "human", "value": "function vi_key_bindings\n fish_vi_key_bindings\n bind \\cl clear 'commandline -f repaint'\n bind -M insert \\cl clear 'commandline -f repaint'\nend\n" }, { "from": ...
fish
chosen
[ { "from": "system", "value": "Add ability to display tag name or short SHA\n" }, { "from": "human", "value": "function _prompt_dir_component\n _prompt_wrap_text (abbreviated_working_directory) brblue\nend\n\nfunction _prompt_err_component --argument-names {real_status}\n if [ $real_status -ne ...
fish
chosen
[ { "from": "system", "value": "Add test stub for ta plugin.\n" }, { "from": "human", "value": "import plugins/fish-spec\nimport plugins/ta\n\nfunction describe_ta -d \"ta: to-done task manager\"\n function before_all\n end\n\n function after_all\n end\n\n # function it_does_somethi...
fish
chosen
[ { "from": "system", "value": "Fix for the fish shell integration and the path setting. The problem only affected fish on cygwin.\n" }, { "from": "human", "value": "# This file should be sourced from your ~/.config/config.fish file.\n#\n# Copyright 2014-2016 Simon Edwards <simon@simonzone.com>\n#...
fish
chosen
[ { "from": "system", "value": "Change echo options for prompt to work in vagrant\n" }, { "from": "human", "value": "# Set the prompt.\nfunction fish_prompt --description \"Write out the prompt\"\n\techo -n \"$USER:\"\n\tset_color $fish_color_cwd\n\techo -ns (prompt_pwd)\n\tset_color normal\n\tech...
fish
chosen
[ { "from": "system", "value": "Increase the zubora function visibility\n" }, { "from": "human", "value": "# pyenv fish\nset -gx PYENV_ROOT \"$HOME/.pyenv\"\nset -x PATH $PATH \"$PYENV_ROOT/bin\"\nstatus --is-interactive; and . (pyenv init - | psub)\n\n# emacs alias\nalias e=\"emacs -nw\"\n\n# pec...
fish
chosen
[ { "from": "system", "value": "Use proper fish shell syntax for export\n" }, { "from": "human", "value": "#!/usr/bin/fish\n\nset -x DISPLAY=:20.0\nset -x GOMA_DIR=$HOME/goma\npython $GOMA_DIR/goma_ctl.py ensure_start\n" }, { "from": "gpt", "value": "#!/usr/bin/fish\n\nset -x DISPLAY :...
fish
chosen
[ { "from": "system", "value": "[fish] Set /usr/bin first in PATH\n\n- Fix intermittent clang issues with brewed llvm\n “stdarg.h not found”" }, { "from": "human", "value": "#!/usr/bin/env fish\n\nset fish_greeting\nset -x GOPATH $HOME/Code/gopkg\nset -x MAILDIR $HOME/mail\nset -x EDITOR vim\nset...
fish
chosen
[ { "from": "system", "value": "Use `.` for sourcing in fish\n\nIt appears that travis uses fish version without this command. Though `.` is \ndeprecated on new versions it is still supported for backwards compatibility, \nthus may be used here." }, { "from": "human", "value": "set POWERLINE_COMMA...
fish
chosen
[ { "from": "system", "value": "Add alias for `python manage.py shell_plus`\n" }, { "from": "human", "value": "set LS_COLORS dxfxcxdxbxegedabagacad\n\nfunction serve\n if test (count $argv) -ge 1\n if python -c 'import sys; sys.exit(sys.version_info[0] != 3)'\n /bi...
fish
chosen
[ { "from": "system", "value": "Add right prompt to fish config\n\nCurrently simply displays the current date and time,\nbut could potentially be used in any number of ways.\n" }, { "from": "human", "value": "function __parse_git_branch\n git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \\(....
fish
chosen
[ { "from": "system", "value": "Remove duplicates in `Open With` menu.\n" }, { "from": "human", "value": "function update-casks -d \"Update, upgrade, and cleanup Homebrew casks\"\n command brew cask update; and brew cu; and brew cask cleanup; and brew cask doctor\nend\n" }, { "from": "gpt...
fish
chosen
[ { "from": "human", "value": "Add function to show functions visible to fish.\n" }, { "from": "gpt", "value": "function list-functions --description \"Lists all autoloaded functions fish can see. Does not guarantee order.\"\n\tfor dir in $fish_function_path\n\t\tfor func in (ls \"$dir\")\n\t\t\te...
fish
chosen
[ { "from": "system", "value": "Change greeting colors for the billionth time\n" }, { "from": "human", "value": "# urdh prompt theme, by Simon Sigurdhsson <http://github.com/urdh/>\nfunction fish_greeting --description 'Print the shell greeting'\n colors\n\n set -l c_n '\\x1b[92m'\n set -...
fish
chosen
[ { "from": "system", "value": "Fix a brew doctor issue\n" }, { "from": "human", "value": "set --export EDITOR vim\nset --export PATH /usr/local/bin $PATH\n\nset fish_color_command white\nset fish_color_autosuggestion yellow\nset fish_pager_color_description yellow\nset fish_color_param white\n\ns...
fish
chosen
[ { "from": "human", "value": "Create a smarter dev-enironment script\n" }, { "from": "gpt", "value": "#!/usr/local/bin/fish\n\nset applicationsFolder \"/Applications\"\nset apps \"CodeKit\" \"Tower\" \"Transmit\" \"MAMP PRO\"\n\n# Functions\n\nfunction __open_app\n set -l application $argv\n ...
fish
chosen
[ { "from": "system", "value": "Fix aliases to work with fish\n" }, { "from": "human", "value": "############################################\n# ALIASES\n############################################\n\n# navigation\nalias .. \"cd ..\"\nalias ... \"cd ../..\"\nalias .... \"cd ../../..\"\nalias .......
fish
chosen
[ { "from": "system", "value": "Fish: Fix not to show error messages when there is no context for kubectl\n" }, { "from": "human", "value": "function fish_prompt\n echo '> '\nend\n\nfunction fish_right_prompt\n set -l current_k8s_context (kubectl config current-context)\n set -l gcp_proje...
fish
chosen
[ { "from": "system", "value": "Use same arg parsing for mkvirtualenv as `vf new`\n\nThese are supposed to be aliases to the underlying `vf` commands, so it\ndoesn't make much sense for their behavior to differ.\n" }, { "from": "human", "value": "function workon\n if not set -q argv[1]\n ...
fish
chosen
[ { "from": "system", "value": "Add zathura abbreviation in fish.\n" }, { "from": "human", "value": "set fish_greeting \"\"\n\nabbr --add g git\nabbr --add gc 'git commit'\nabbr --add gca 'git commit -a'\nabbr --add gd 'git diff'\nabbr --add gst 'git status'\nabbr --add p 'pass'\nabbr --add pc 'pa...
fish
chosen
[ { "from": "system", "value": "[most_host] Remove .local domain from host case\n" }, { "from": "human", "value": "function moj_host --description='Prints an emoji for the current host.'\n\n set -l host (hostname)\n if string match '*.*' $host >/dev/null\n set -l tokens (string split ...
fish
chosen
[ { "from": "system", "value": "Use pango formatting, add bar mode\n" }, { "from": "human", "value": "function check_vpn --description=\"Return true if connected to VPN\"\n command curl --silent https://am.i.mullvad.net/json | jq '.mullvad_exit_ip'\nend\n" }, { "from": "gpt", "value":...
fish
chosen
[ { "from": "system", "value": "Simplify the startup script even more\n" }, { "from": "human", "value": "\nset --global --export SCRIPT_DIR (dirname (dirname (status -f)))\nset --global --export SOURCE_DIR (dirname $SCRIPT_DIR)\nset --global --export PROFILE (status -f)\n\nset --local os (uname -s...
fish
chosen
[ { "from": "system", "value": "Make Node.js upgrade earlier than NPM module updates" }, { "from": "human", "value": "function app-update --description 'Update with Homebrew and Nodejs'\n set os (uname)\n\n if test $os = 'Linux'\n if type -q apt\n log info 'Updating Advanced Package Tool...
fish
chosen
[ { "from": "system", "value": "meta: Add git branch information to fish prompt\n\nIf I stayed on zsh instead of switch to fish, I would've probably never\nknown how easy it is to add certain information to the prompt. Since\nthe prompt itself is just a function, you can run any commands you want\ninside it t...
fish
chosen
[ { "from": "human", "value": "Add fish function to retrieve lxc ip address\n" }, { "from": "gpt", "value": "function lxcip --description \"Retrieve IP address of a lxc container based on container name and network interface\"\n\n # Set command line options for parsing\n # -h/--help: Print h...
fish
chosen
[ { "from": "system", "value": "Update fish_user_paths only if it is defined\n\nfish_user_paths variable is prepended to $PATH automatically. Some people set fish_user_paths, while others set PATH.\r\nIt will be better to test if fish_user_paths is set, and prepend it if it is, while just prepending to PATH o...
fish
chosen
[ { "from": "system", "value": "Add git status to prompt\n" }, { "from": "human", "value": "# based on Simple by Sota Yamashita: https://github.com/sotayamashita/simple\n\nfunction __git_upstream_configured\n git rev-parse --abbrev-ref @\"{u}\" > /dev/null 2>&1\nend\n\nfunction __print_color\n ...
fish
chosen
[ { "from": "system", "value": "Add @goobuntu to prompt when on my goobuntu\n" }, { "from": "human", "value": "function fish_prompt --description 'Write out the prompt'\n \n # Use after set_color to reset bold\n if not set -q __fish_prompt_color_normal\n set -g __fish_prompt_color_...
fish
chosen
[ { "from": "system", "value": "Fix rounding errors in printf\n" }, { "from": "human", "value": "function __paradox_command_duration --description \"Get the current command duration\"\n if begin; set -q CMD_DURATION; and test $CMD_DURATION -ge 500; end\n # I do it in this somewhat roundabout w...
fish
chosen
[ { "from": "system", "value": "[gitconfig] Fix check for missing name and email\n" }, { "from": "human", "value": "# Sets git user.name and user.email\n#\n# ~/.gitconfig is tracked and shared. Sensitive or machine-specific data is\n# stored in the alternate global config file.\n# > If $XDG_CONFIG...
fish
chosen
[ { "from": "system", "value": "Fix __gitconfig when machine hasn't been set up yet\n" }, { "from": "human", "value": "# Sets git user.name and user.email\n#\n# ~/.gitconfig is tracked and shared. Sensitive or machine-specific data is\n# stored in the alternate global config file.\n# > If $XDG_CON...
fish
chosen
[ { "from": "system", "value": ":white_check_mark: Add test for --help option\n" }, { "from": "human", "value": "test \"prints help when given -h option\"\n \"Usage: gh [--help] USER REPO\" \\\n \"\" \\\n \"Description:\" \\\n \" Quickly navigate across git repositories cloned from GitHub.\...
fish
chosen
[ { "from": "system", "value": "Send error output to /dev/null\n" }, { "from": "human", "value": "function init -a path --on-event init_homebrew-command-not-found\n if not available brew\n echo \"Please install 'brew' first\"\n return 1\n end\n\n if not available brew command command-not-...
fish
chosen
[ { "from": "system", "value": "Fix bug in git prompt\n\nThe function git_is_dirty doesn't return anything (due to lack of echo).\nIt sets the exit code in $status which the condition wasn't checking.\n" }, { "from": "human", "value": "function fish_right_prompt -d \"Displays git branch and dirty ...
fish
chosen
[ { "from": "human", "value": "Add fish function to show manpage as pdf\n" }, { "from": "gpt", "value": "function pman --description \"Show a man page as a pdf document\"\n man -w $argv[1] 2>&1 >/dev/null && begin;\n man -t $argv[1] | ps2pdf - | zathura -\n end\nend\n" } ]
fish
chosen
[ { "from": "human", "value": "Add function to update all VPCs\n" }, { "from": "gpt", "value": "function update-vpcs\n for name in (get vpcs)\n set vpc (lookup vpc $name)\n\n vpc-exists $name\n or set vpc (create-vpc)\n and begin\n add-tag-to-vpc $vpc Name...
fish
chosen
[ { "from": "human", "value": "Add function to set a user's password\n" }, { "from": "gpt", "value": "function set-password --argument user password\n if empty \"$user\" \"$password\"\n usage set-password '<user>' '<password>'\n return (false)\n end\n\n if user-has-password ...
fish
chosen
[ { "from": "system", "value": "Add /usr/local/sbin to path per brew's advice\n" }, { "from": "human", "value": "# don't show annoying welcome message\nset fish_greeting \"\"\n\n# environment variables\nset -gx GOPATH ~/.go\nset -gx fish_user_paths $GOPATH/bin\nset -gx EDITOR nvim\nset -gx FZF_DEF...
fish
chosen
[ { "from": "human", "value": "Add function to create routes\n" }, { "from": "gpt", "value": "function create-route --argument cidr gateway table\n trace (status --current-filename) $argv\n\n if empty \"$cidr\" \"$gateway\" \"$table\"\n usage create-route '<cidr>' '<gateway>' '<route-...
fish
chosen
[ { "from": "system", "value": "Add goneovim as available editor\n" }, { "from": "human", "value": "set fvim /Applications/FVim.app/Contents/MacOS/FVim\nif [ -e $fvim ]\n\tset --export EDITOR $fvim\nelse\n\tset --export EDITOR nvim\nend\n\n# Nix\nset NIX_LINK $HOME/.nix-profile\nset --export NIX_P...
fish
chosen
[ { "from": "system", "value": "Update author generation script to retain existing ones.\n" }, { "from": "human", "value": "#!/usr/bin/env fish\n# This script generates the AUTHORS file from Git history.\n\necho '# This file lists all individuals having contributed content to the repository.'\nech...
fish
chosen
[ { "from": "system", "value": "themes/gitstatus: Fix where it shows extra a space\n\nFor example, if $HOME is not a git repository, it should show:\n\n ~>\n\nBut previously it incorrectly showed:\n\n ~ >\n\nThis commit makes it aware of such case, inserting the space\naccordingly instead of always addi...
fish
chosen
[ { "from": "system", "value": "Remove s3 from create bucket\n" }, { "from": "human", "value": "function create-bucket --argument name\n if empty \"$name\"\n usage create-bucket '<name>'\n return (false)\n end\n\n print-status s3/create-bucket $name\n set --local options...
fish
chosen
[ { "from": "system", "value": "Add aliases to launch different versions of Atom\n" }, { "from": "human", "value": "set --export EDITOR atom\nset --export VISUAL $EDITOR\n\nset --export ATOM_DEV_RESOURCE_PATH ~/Source/atom/atom\nset --export ATOM_REPOS_HOME ~/Source\n" }, { "from": "gpt", ...
fish
chosen
[ { "from": "system", "value": "Exit wait loop if it exceeds timeout\n\nTimeout default value is is 30 seconds.\n" }, { "from": "human", "value": "function __fresco_wait\n if test (count $argv) != 0\n while true\n set -l remain 0\n\n for j in $argv\n ...
fish
chosen
[ { "from": "system", "value": "Use better names for gpg aliases\n" }, { "from": "human", "value": "if not status --is-interactive\n exit\nend\n\nalias g git\n\nalias vi nvim\nalias vim nvim\n\nalias mux tmuxinator\n\nalias gpg gpg2\nalias scramble 'gpg --encrypt --recipient me@rdavis.xyz --arm...
fish
chosen
[ { "from": "system", "value": "Make stderr redirection compatible with Fish 3.0.\n" }, { "from": "human", "value": "function ql -d \"Quick Look a specified file or directory\"\n if [ (count $argv) -gt 0 ]\n qlmanage >/dev/null ^/dev/null -p $argv &\n else\n echo \"No arguments given\"\n ...
fish
chosen
[ { "from": "system", "value": "Add aws-cli autocompletion for fish\n" }, { "from": "human", "value": "#!fish\nfundle plugin 'edc/bass'\nfundle plugin 'lethalpaga/deadlygoldfish-theme'\nfundle init\n\n# Setup PATH\nset -g -x PATH $PATH ~/.local/bin ~/bin\n\n# Load all scripts in config.d\nif [ -z ...
fish
chosen
[ { "from": "human", "value": "Add function to create a VPC\n" }, { "from": "gpt", "value": "function create-vpc\n print-status vpc/create\n aws ec2 create-vpc --cidr-block 10.10.10.0/24 | jq --raw-output .Vpc.VpcId\nend\n" } ]
fish
chosen
[ { "from": "system", "value": "Set fish to use solarized theme\n" }, { "from": "human", "value": "# load solarized colors\r\n. $HOME/.config/fish/solarized.fish\r\n. $HOME/.config/fish/colours.fish\r\n" }, { "from": "gpt", "value": "# load solarized colors\nset -g theme_color_scheme s...
fish
chosen
[ { "from": "system", "value": "Store typescript logs in /tmp\n" }, { "from": "human", "value": "if status is-login\n if test -z \"$DISPLAY\" -a \"$XDG_VTNR\" = 1\n exec startx -- -keeptty\n end\nend\n\nset -x PATH ~/.emacs.d/bin ~/.local/bin ~/.cargo/bin (yarn global bin) $PATH\nset ...
fish
chosen
[ { "from": "system", "value": "Add support for bucket ACLs\n" }, { "from": "human", "value": "function create-bucket --argument-names name\n print-status s3/create-bucket $name\n set --local options\n\n has region s3/buckets/$name\n and set -- options $options --create-bucket-configur...
fish
chosen
[ { "from": "system", "value": "Update pass abbreviation in fish.\n" }, { "from": "human", "value": "set fish_greeting \"\"\n\nabbr --add g git\nabbr --add gc 'git commit'\nabbr --add gca 'git commit -a'\nabbr --add gd 'git diff'\nabbr --add gst 'git status'\nabbr --add p 'pass'\nabbr --add pc 'pa...
fish
chosen
[ { "from": "system", "value": "Update to using Java 11 by default\n" }, { "from": "human", "value": "# For ClojureScript development:\n\n# Need to set this here, as this env.fish file is run before the Java one.\n# set -x JAVA_HOME (/usr/libexec/java_home -v 1.8)\nset -x JAVA_HOME \"/Library/Java...
fish
chosen
[ { "from": "system", "value": "Add timeout to git hash function for safety\n" }, { "from": "human", "value": "function paradox_git_hash --description \"Get the current git commit hash, if we're in a git working tree\"\n set -l git_info (command git rev-parse --is-inside-work-tree --short HEAD ^/...
fish
chosen
[ { "from": "system", "value": "Fix display of home directory as ~ in fish prompt CWD.\n\n* Fix subdirectories with the same name as the home directory (e.g.\n /mnt/backup/home/username) being displayed as ~ (e.g. /mnt/backup~) by\n only replacing the string when it's found at the start of the current\n pa...
fish
chosen
[ { "from": "system", "value": "Check for brew as files, not directories\n" }, { "from": "human", "value": "# Colorized ls output\nset --export CLICOLOR 1\nset --export LSCOLORS Exfxcxdxbxegedabagacad\n\n# Ensure the HOSTNAME environment variable is set so that `rcm` works properly\nif ! set --que...
fish
chosen
[ { "from": "system", "value": "Make variables universal instead of global\n" }, { "from": "human", "value": "function __proxy.set -a proxy \\\n -d \"Set all proxy vars to specified value\"\n\n set -l envars http_proxy HTTP_PROXY \\\n https_proxy HTTPS_PROXY \\\n ftp_proxy FTP_PROXY \\\n ...
fish
chosen
[ { "from": "system", "value": "Revert \"Do not start tmux if we are logged in via ssh\"\n\nThis reverts commit ee093e0d541231b1ba6795c1f74d1dd4afbf986f.\n" }, { "from": "human", "value": "# Initializes sharship prompt\nif command -v starship > /dev/null\n starship init fish | source\nend\n\n# ...
fish
chosen
[ { "from": "system", "value": "Add ghcup bin dir to path\n" }, { "from": "human", "value": "if status is-login\n if test -z \"$DISPLAY\" -a \"$XDG_VTNR\" = 1\n exec startx -- -keeptty\n end\nend\n\nset -x PATH ~/.emacs.d/bin ~/.local/bin ~/.cargo/bin (yarn global bin) /usr/share/bcc/...
fish
chosen
[ { "from": "system", "value": "Add go bin folder to PATH\n" }, { "from": "human", "value": "# Set path\nset -g fish_user_paths $fish_user_paths $HOME/bin\n\n# Include abbreviations\nsource $HOME/.config/fish/abbreviations.fish\n\n# Initialize special functions\nsource $HOME/.config/fish/functions...
fish
chosen
[ { "from": "system", "value": "Add `show-proc` to print detailed process command\n" }, { "from": "human", "value": "function system-info -d 'Print the system information'\n free -m | awk 'NR==2{printf \"Memory Usage: %s/%sMB (%.2f%)\\n\", $3,$2,$3*100/$2 }'\n df -h | awk '$NF==\"/\"{printf \"Di...
fish
chosen
[ { "from": "system", "value": "Add option to not show untracked files as dirty in git status\n" }, { "from": "human", "value": "# name: RobbyRussel\nfunction _git_branch_name\n echo (command git symbolic-ref HEAD ^/dev/null | sed -e 's|^refs/heads/||')\nend\n\nfunction _is_git_dirty\n echo (com...
fish
chosen
[ { "from": "system", "value": "Include all emacs keybindings in fish insert mode\n" }, { "from": "human", "value": "function fish_user_key_bindings\n bind -M insert \\eg 'commandline -i \" | rg\"'\n bind -M insert jk 'if commandline -P; commandline -f cancel; else; set fish_bind_mode defaul...
fish
chosen
[ { "from": "system", "value": "Add check for REPO_HOME environment variable\n" }, { "from": "human", "value": "function project \\\n --description 'Shortcut from anywhere to a project directory' \\\n --argument-names {project}\n\n cd $REPO_HOME/$project\nend\n" }, { "from": "gpt", ...
fish
chosen
[ { "from": "system", "value": "Load fzf fish bindings from nix\n" }, { "from": "human", "value": "function fish_user_key_bindings\n fish_vi_key_bindings\n\n if type -q fzf_key_bindings\n fzf_key_bindings\n end\n\n bind -M insert -m default jk backward-char force-repaint\nend\n" }, { ...
fish
chosen
[ { "from": "system", "value": "Add alias for python3 and pip3\n" }, { "from": "human", "value": "set -x PATH $PATH $HOME/.dotfiles/scripts\n\n# tmux\nif status --is-interactive\n if test -z (echo $TMUX)\n tmux-status\n if test $status -eq 0\n exec tmux\n end\n end\nend\n\n# aliases...
fish
chosen
[ { "from": "system", "value": "Sort results before piping to comm\n" }, { "from": "human", "value": "function users-without-mfa\n comm -13 (users-with-mfa | psub) (get users | psub)\nend\n" }, { "from": "gpt", "value": "function users-without-mfa\n comm -13 (users-with-mfa | sor...
fish
chosen
[ { "from": "system", "value": "Remove test for usage help.\n" }, { "from": "human", "value": "test \"$TESTNAME - use custom string to display null values\"\n \"▂?▄?▆?█\" = (\n printf \"%s\\n\" 1,,2,,3,,4 | shark --null=\"?\"\n )\nend\n\ntest \"$TESTNAME - no data prints nothing a...
fish
chosen
[ { "from": "system", "value": "Add better git prompt to fish\n" }, { "from": "human", "value": "function git_status\n if git rev-parse --is-inside-work-tree 1> /dev/null 2>& 1\n if not git diff --quiet\n set_color red\n echo -n \"✘\"\n set_color normal\n...
fish
chosen
[ { "from": "system", "value": "Fix ruby version spacing, and add a few comments\n" }, { "from": "human", "value": "function fish_right_prompt\n if status --is-interactive\n set -l __paradox_date (command date +%I:%M:%S%P ^/dev/null)\n if type ruby >/dev/null ^/dev/null\n # have to use...
fish
chosen
[ { "from": "system", "value": "Add branch to fish prompt\n" }, { "from": "human", "value": "alias myip=\"curl -s checkip.dyndns.org | grep -Eo '[0-9\\.]+'\"\n" }, { "from": "gpt", "value": "alias myip=\"curl -s checkip.dyndns.org | grep -Eo '[0-9\\.]+'\"\n\nfunction update_dots\n cd ...
fish
chosen
[ { "from": "system", "value": "Update Atom packages when updating all the things\n" }, { "from": "human", "value": "function update\n sudo softwareupdate -i -a\n brew update\n brew upgrade --force --all\n brew cleanup\n npm install npm -g\n npm update -g\n mas upgrade\nend\n"...
fish
chosen
[ { "from": "system", "value": "Create `~/bin` directory before adding it to the PATH.\n\nUses `mkdir -pv ~/bin` to create directory if it does not exist.\n" }, { "from": "human", "value": "# Here is the configuration for the fish shell\n\nsource ~/deoxys314_dotfiles/fish/aliases.fish\n\nsource ~/...
fish
chosen
[ { "from": "system", "value": "Use function to determine presence of ssh-agent\n" }, { "from": "human", "value": "set ssh_agent_pid (pgrep ssh-agent)\nif $ssh_agent_pid[0]\n __test_ssh_identities\nelse\n __start_ssh_agent\nend\n" }, { "from": "gpt", "value": "function agent_is_p...
fish
chosen
[ { "from": "system", "value": "Make this script suitable for adding only one directory\n" }, { "from": "human", "value": "# Run this in the directory you want the subtrees to be located in\n# Takes the path to the directory where the plugins are, usually ~/.vim/bundle\n# Can be passed a blacklist...
fish
chosen
[ { "from": "human", "value": "Add function to create security groups\n" }, { "from": "gpt", "value": "function create-security-group --argument name vpc description\n trace (status --current-filename) $argv\n\n if empty \"$name\"\n usage create-security-group '<name>' '[vpc]' '[descr...
fish
chosen
[ { "from": "system", "value": "Revise EditorConfig TextMate plugin install to download binary\n" }, { "from": "human", "value": "# Manage TextMate bundles.\nfunction tmbundles\n set -l bundles editorconfig fish gradle\n set -l bundle_dev ~/dev/textmate\n set -l bundle_dir ~/Library/Appli...
fish
chosen
[ { "from": "human", "value": "Add function to show diff between states\n" }, { "from": "gpt", "value": "function changed --argument subject\n if empty \"$subject\"\n usage changed '<subject>'\n return (false)\n end\n\n if not functions --query real-$subject\n echo \"...
fish
chosen
[ { "from": "human", "value": "Add fish function for converting PDFs to JPGs.\n\nIf I need to scan a document, I use Google Drive's scan feature on my\nphone which creates a PDF. But sometimes you need an image.\nThis converts the scanned PDF to a sharp and readable JPG.\n\nAlthough the size of the JPG isn't ...
fish
chosen
[ { "from": "system", "value": "[fish] Use custom colors in fish prompt\n\n- I like those colors\n" }, { "from": "human", "value": "function fish_prompt --description 'Write out the prompt'\n\tset -l last_status $status\n\n # User\n set_color $fish_color_quote\n echo -n (whoami)\n set_color no...
fish
chosen
[ { "from": "system", "value": "Fix the git commit -m wrapper\n" }, { "from": "human", "value": "function gcm --description=\"git commit with message\"\n if test (count (command git status --porcelain | command grep \"^[^ ?]\")) -eq 0\n set_color yellow\n echo \"Nothing to commit...\"\n ...
fish
chosen
[ { "from": "system", "value": "Add abbreviation for clojure with cheshire and rebel-readline\n\nNeeds ~/.clojure/deps.edn to work\n" }, { "from": "human", "value": "abbr -a -- - 'cd -'\nabbr -a axel 'axel -a'\nabbr -a b 'brew'\nabbr -a dl 'wget -r -l 1 -np -nd'\nabbr -a fn 'find . -iname'\nabbr -...
fish
chosen
[ { "from": "system", "value": "Fix fish shell init snippet\n\n- add `bin` and `shims` directories from asdf installation to PATH\n- add `shims` directory from `$ASDF_DATA_DIR` (default `$HOME/.asdf`) to\n PATH\n- don't create directories in init script (directories are only added to\n PATH if they exist, b...
fish
chosen
[ { "from": "system", "value": "Add text expansion for editing dotfiles\n" }, { "from": "human", "value": "# Abbreviations (text expansion)\nabbr --add gp 'git push'\nabbr --add gpf 'git push --force'\nabbr --add gst 'git status' # gs taken by Ghostscript\nabbr --add icat 'kitty +kitten icat'\nab...
fish
chosen
[ { "from": "system", "value": "[fish] Remove cargo binpath for multirust" }, { "from": "human", "value": "#!/usr/bin/env fish\n\nset fish_greeting\nset -x GOPATH $HOME/Code/gopkg\nset -x MAILDIR $HOME/mail\nset -x EDITOR vim\nset -x MANPAGER vimpager\nset -x GEM_HOME $HOME/.local/gems/(ruby -v | ...
fish
chosen
[ { "from": "system", "value": "Revert \"Add /usr/local/sbin in $PATH\"\n\nThis reverts commit fd131ca67fab8608af69a652b06989c6dbfbd10d.\n" }, { "from": "human", "value": "export EDITOR=\"nvim\"\nexport XDG_CONFIG_HOME=\"$HOME/.config\"\nexport PAGER=\"less\"\nexport LESS=\"-g -i -M -R -S -W -z-4 ...
fish
chosen
[ { "from": "system", "value": "Initialize Homebrew properly on both Intel and ASi Macs\n" }, { "from": "human", "value": "# Colorized ls output\nset --export CLICOLOR 1\nset --export LSCOLORS Exfxcxdxbxegedabagacad\n\n# Ensure the HOSTNAME environment variable is set so that `rcm` works properly\...
fish
chosen
[ { "from": "system", "value": "Comment out VI bindings because it's irritating to hit the ESC key every time\n" }, { "from": "human", "value": "# Disable fish greeting\nset fish_greeting \"\"\n\nfunction my_vi_key_bindings\n fish_vi_key_bindings\n bind -M insert \\cl 'clear; commandline -f ...
fish
chosen
[ { "from": "system", "value": "Add color to virtual env\n" }, { "from": "human", "value": "function fish_right_prompt\n if set -q VIRTUAL_ENV\n # Let's hope python won't break this way to read the version\n set -l python_version (python --version | sed -e 's/Python //g')\n set -l virtua...
fish
chosen
[ { "from": "system", "value": "Make rm on macOS use trash\n" }, { "from": "human", "value": "# allows sudo to use aliases\nfunction sudo\n\tcommand sudo $argv\nend\n\n\n# better ls\nfunction ls\n\tcommand ls -lhFG $argv\nend\n\nfunction la\n\tcommand ls -lhFGA $argv\nend\n\n\n# symlink by default...
fish
chosen
[ { "from": "system", "value": "Use the `--quiet` option when appropriate\n" }, { "from": "human", "value": "function gco --description=\"git checkout\"\n if test -z (command git rev-parse --show-toplevel 2> /dev/null)\n set_color red\n echo \"Not in a git repository\"\n set_color normal...
fish
chosen
[ { "from": "system", "value": "Disable python virtualenv prompt in fish\n" }, { "from": "human", "value": "# Aliases\nalias ll=\"exa -lg --group-directories-first\"\n\nabbr --add g git\nabbr --add v nvim\nabbr --add tree \"ll --tree\"\n" }, { "from": "gpt", "value": "# Aliases\nalias ...
fish
chosen
[ { "from": "system", "value": "Use red color to indicate master branch\n" }, { "from": "human", "value": "# name: eclm\nfunction _git_branch_name\n echo (command git symbolic-ref HEAD ^/dev/null | sed -e 's|^refs/heads/||')\nend\n\nfunction _is_git_dirty\n echo (command git status -s --ignore-s...
fish
chosen
[ { "from": "system", "value": "[fish] Disable homebrew updating and analytics\n\nWhy does every shell command need to report my behavior now?" }, { "from": "human", "value": "#!/usr/bin/env fish\n\nset fish_greeting\nset -x GOPATH $HOME/Code/gopkg\nset -x MAILDIR $HOME/mail\nset -x EDITOR vim\nse...
fish
chosen
[ { "from": "system", "value": "Use vi keybindings in fish.\n" }, { "from": "human", "value": "if not status --is-login\n exit\nend\n\ntest -f \"$HOME/.config/dotfile/init.fish\"; and source \"$HOME/.config/dotfile/init.fish\"\ndotfile::load_if_exists \"$HOME/.config/env/init.fish\"\ndotfile::loa...
fish
chosen
[ { "from": "system", "value": "Add go setup for fish shell\n" }, { "from": "human", "value": "set PATH (brew --prefix coreutils)/libexec/gnubin $PATH\nset PATH ~/bin $PATH\nset PATH $PATH ~/.cask/bin\n\n# http://www.martinklepsch.org/posts/git-prompt-for-fish-shell.html\nset __fish_git_prompt_sho...
fish
chosen
[ { "from": "system", "value": "Use fish_indent to fix funcsave output\n" }, { "from": "human", "value": "# Save a function to user's autoload dir.\nfunction fs --argument-names function_name\n set -l dest_file ~/.config/fish/functions/$function_name.fish\n set -l original_contents\n set ...
fish
chosen