commit stringlengths 40 40 | old_file stringlengths 4 264 | new_file stringlengths 4 264 | old_contents stringlengths 0 4.24k | new_contents stringlengths 1 5.44k | subject stringlengths 14 778 | message stringlengths 15 9.92k | lang stringclasses 277
values | license stringclasses 13
values | repos stringlengths 5 127k |
|---|---|---|---|---|---|---|---|---|---|
af1ef135998ca8446cdefd5ab64c910a5143999c | fish/config.fish | fish/config.fish | fish_add_path "$HOME/.local/bin"
fish_add_path "$HOME/.elan/bin"
fish_add_path "$HOME/.cargo/bin"
fish_add_path "$HOME/.local/bin"
fish_add_path "$HOME/.emacs.d/bin"
fish_add_path "$HOME/.ghcup/bin"
fish_add_path "$HOME/.cabal/bin"
fish_add_path "$HOME/Documents/go/bin"
fish_add_path "$HOME/.local/share/npm/bin"
set -... | fish_add_path "$HOME/.local/bin"
fish_add_path "$HOME/.elan/bin"
fish_add_path "$HOME/.cargo/bin"
fish_add_path "$HOME/.emacs.d/bin"
fish_add_path "$HOME/.ghcup/bin"
fish_add_path "$HOME/.cabal/bin"
fish_add_path "$HOME/Documents/go/bin"
fish_add_path "$HOME/.local/share/npm/bin"
fish_add_path "$HOME/.config/dotfiles/b... | Add dotfiles bin to path | [fish] Add dotfiles bin to path
| fish | mit | mpardalos/dotfiles,mpardalos/dotfiles |
f4a801785a18ff5ea95913a4efd3b23e8954620e | fish/config.fish | fish/config.fish | alias vim=nvim
set EDITOR nvim
set VISUAL nvim
fish_vi_key_bindings
set -x GOPATH $HOME/go
set PATH /usr/local/sbin $PATH
set PATH /var/lib/snapd/snap/bin $PATH
set PATH $HOME/.local/bin $PATH
set PATH $HOME/bin $PATH
alias :q=exit
# golang at fb
set -x GOPATH "/data/users/$USER/gopaths/gothrift:/data/users/$USER/g... | alias vim=nvim
set EDITOR nvim
set VISUAL nvim
fish_vi_key_bindings
set -x GOPATH $HOME/go
set PATH /usr/local/sbin $PATH
set PATH /var/lib/snapd/snap/bin $PATH
set PATH $HOME/.local/bin $PATH
set PATH $HOME/bin $PATH
alias :q=exit
# golang at fb
# TODO: only enable this on fb devserver
# set -x GOPATH "/data/users... | Comment out fb go stuff | Comment out fb go stuff
| fish | mit | vmagro/dotfiles,vmagro/dotfiles |
5be6703d860798838e8620c6ed02c80387be1391 | fish_prompt.fish | fish_prompt.fish | # name: mars (based on eclm)
function _git_branch_name
echo (command git symbolic-ref HEAD ^/dev/null | sed -e 's|^refs/heads/||')
end
function _is_git_dirty
echo (command git status -s --ignore-submodules=dirty ^/dev/null)
end
function fish_prompt
set -l last_status $status
set -l cyan (set_color -o cyan)
... | # name: mars (based on eclm)
function _git_branch_name
echo (command git symbolic-ref HEAD 2> /dev/null | sed -e 's|^refs/heads/||')
end
function _is_git_dirty
echo (command git status -s --ignore-submodules=dirty 2> /dev/null)
end
function fish_prompt
set -l last_status $status
set -l cyan (set_color -o cyan... | Make stderr redirection compatible with Fish 3.0. | Make stderr redirection compatible with Fish 3.0.
| fish | mit | oh-my-fish/theme-mars |
387505ea5fbcc7f6ab39cdcaf51cdb4887a5762c | fish_prompt.fish | fish_prompt.fish | # name: Krisleech
function _git_branch_name
echo (command git symbolic-ref HEAD ^/dev/null | sed -e 's|^refs/heads/||')
end
function _is_git_dirty
echo (command git status -s --ignore-submodules=dirty ^/dev/null)
end
function fish_prompt
set -l cyan (set_color -o cyan)
set -l yellow (set_color -o yellow)
se... | # name: Krisleech
function _git_branch_name
echo (command git symbolic-ref HEAD 2> /dev/null | sed -e 's|^refs/heads/||')
end
function _is_git_dirty
echo (command git status -s --ignore-submodules=dirty 2> /dev/null)
end
function fish_prompt
set -l cyan (set_color -o cyan)
set -l yellow (set_color -o yellow)
... | Make stderr redirection compatible with Fish 3.0. | Make stderr redirection compatible with Fish 3.0.
| fish | mit | oh-my-fish/theme-krisleech |
fc79cc975f571eb20501578b4d36701de594648b | functions/gdc.fish | functions/gdc.fish | function gdc --description="git diff cached files"
set -l arguments
set -l cmd "command git diff --cached --name-only"
if test (count $argv) -gt 0
set arguments (gish find -c $cmd $argv)
end
command git diff --cached -- $arguments
end
| Add a fish function to diff staged files | Add a fish function to diff staged files
| fish | mit | RobertAudi/gish,RobertAudi/gish | |
ab4bd2ef4d37fda4c31564f00e80249656b75e76 | grc.fish | grc.fish | function init --on-event init_grc
set -l execs cat cvs diff dig gcc g++ ls make mount mtr \
netstat ping ps tail traceroute wdiff
if not available grc
echo 'You need to install grc!'
return 0
end
if set -q grc_plugin_execs
set execs $execs $grc_plugin_execs
end
for executable i... | function init --on-event init_grc
set -l execs cat cvs df diff dig gcc g++ ls ifconfig \
make mount mtr netstat ping ps tail traceroute \
wdiff
if not available grc
echo 'You need to install grc!'
return 0
end
if set -q grc_plugin_execs
set execs $execs $grc_plugin_e... | Add df and ifconfig commands | Add df and ifconfig commands
| fish | mit | oh-my-fish/plugin-grc |
6b9302762958d1ac736c7716cc6025fdd272881d | fish/.config/fish/config.fish | fish/.config/fish/config.fish | set -x VIRTUAL_ENV_DISABLE_PROMPT 1
set -x HOMEBREW_NO_ANALYTICS 1
set -x HOMEBREW_NO_AUTO_UPDATE 1
status --is-interactive; and source (pyenv init - | psub)
status --is-interactive; and source (pyenv virtualenv-init - | psub)
set PATH "$HOME/.local/bin" $PATH
# https://docs.python-guide.org/dev/pip-virtualenv/#requir... | set -x VIRTUAL_ENV_DISABLE_PROMPT 1
set -x PIP_REQUIRE_VIRTUALENV 1
set -x HOMEBREW_NO_ANALYTICS 1
set -x HOMEBREW_NO_AUTO_UPDATE 1
status --is-interactive; and source (pyenv init - | psub)
status --is-interactive; and source (pyenv virtualenv-init - | psub)
set PATH "$HOME/.local/bin" $PATH
# https://docs.python-guid... | Stop Pip installing packages outside virtualenvs | Stop Pip installing packages outside virtualenvs
| fish | mit | flother/dotfiles |
502cf0c19df763dea5a3a0f9c26d23d17a7edac8 | cookbooks/fish/files/.config/fish/conf.d/basic.fish | cookbooks/fish/files/.config/fish/conf.d/basic.fish | set -x EDITOR nvim
set -x XDG_CONFIG_HOME $HOME/.config
set -x PAGER less
set -x LESS "-g -i -M -R -S -W -z-4 -x4"
if [ -d "$HOME/.bin" ]
set -x PATH $HOME/.bin $PATH
end
## Set Locale
set -x LC_ALL en_US.UTF-8
set -x LC_CTYPE en_US.UTF-8
set -x LANG en_US.UTF-8
| set -x EDITOR nvim
set -x XDG_CONFIG_HOME $HOME/.config
set -x PAGER less
set -x LESS "-g -i -M -R -S -W -z-4 -x4 -X"
if [ -d "$HOME/.bin" ]
set -x PATH $HOME/.bin $PATH
end
## Set Locale
set -x LC_ALL en_US.UTF-8
set -x LC_CTYPE en_US.UTF-8
set -x LANG en_US.UTF-8
| Add -X option to $LESS | Add -X option to $LESS
```
-X or --no-init
Disables sending the termcap initialization and deinitialization strings to the terminal. This is sometimes desirable if the deinitialization string does something unnecessary, like clearing the screen.
```
| fish | mit | tsub/dotfiles,tsub/dotfiles,tsub/dotfiles,tsub/dotfiles,tsub/dotfiles |
d70951668c936978aa82ecde69d29228e5b97333 | share/gist.fish | share/gist.fish | complete -c create -d "Creates a new gist"
complete -c edit -d "Edit the files in your gist"
complete -c list -d "Prints a list of your gists"
complete -c clone -d "Clones a gist"
complete -c delete -d "Deletes a gist from github"
complete -c files -d "Prints a list of the files in a gist"
complete -c archive -d "Ownlo... | Add completion support for the Fish shell | Add completion support for the Fish shell
Signed-off-by: Eric James Michael Ritz <3d928645612786af07f011fdfbce45f81efe5a40@plutono.com>
| fish | mit | jdowner/gist,jdowner/gist | |
2100004a1b250289f979704da5e2403e24aa497b | conf/config/fish/config.fish | conf/config/fish/config.fish | # load solarized colors
set -g theme_color_scheme solarized-dark
| # load solarized colors
set -g theme_color_scheme solarized-dark
set -g __fish_git_prompt_show_informative_status 1
| Set fish to use informative vcs prompt | Set fish to use informative vcs prompt
| fish | mit | dueyfinster/dotfiles |
094985cd97fb33b318fc30935fe3751ec6acf2b5 | functions/resync-mfa.fish | functions/resync-mfa.fish | function resync-mfa --argument user first second
if empty "$user" "$first" "$second"
usage resync-mfa '<user>' '<first>' '<second>'
return (false)
end
aws iam resync-mfa-device --user-name $user --serial-number (mfa-serial $user) --authentication-code-1 $first --authentication-code-2 $secon... | Add function to resync a user's MFA device | Add function to resync a user's MFA device
| fish | mit | colstrom/piranha,colstrom/shellops-aws | |
1b5ae6ce0280d8f2a4ee6b24a8d6c70d07ea64ef | fish/.config/fish/config.fish | fish/.config/fish/config.fish | # initialize rbenv
if test -d ~/.rbenv/shims
if test -d ~/.rbenv/bin
set PATH ~/.rbenv/bin $PATH
end
status --is-interactive; and source (rbenv init - --no-rehash|psub)
end
# initialize nodenv
if test -d ~/.nodenv/shims
if test -d ~/.nodenv/bin
set PATH ~/.nodenv/bin $PATH
end
status --is-interac... | # initialize rbenv
if test -d ~/.rbenv/shims
if test -d ~/.rbenv/bin
set PATH ~/.rbenv/bin $PATH
end
status --is-interactive; and source (rbenv init - --no-rehash|psub)
end
# initialize nodenv
if test -d ~/.nodenv/shims
if test -d ~/.nodenv/bin
set PATH ~/.nodenv/bin $PATH
end
status --is-interac... | Update fish path and fzf settings | Update fish path and fzf settings
| fish | mit | patricklewis/dotfiles |
2eed8019d164bfae3b42ca0796a31720bb5f1929 | functions/__fisher_index_update.fish | functions/__fisher_index_update.fish | function __fisher_index_update -a timeout
if test -z "$timeout"
set timeout 5
if set -q fisher_timeout
set timeout "0$fisher_timeout"
end
end
set -l url $fisher_index
if test ! -d $fisher_cache
mkdir -p $fisher_cache
end
set -l index $fisher_cache/... | function __fisher_index_update -a timeout
if test -z "$timeout"
set timeout 5
if set -q fisher_timeout
set timeout "0$fisher_timeout"
end
end
set -l url $fisher_index
if test ! -d $fisher_cache
mkdir -p $fisher_cache
end
set -l index $fisher_cache/... | Fix broken index URL link. | Fix broken index URL link. | fish | mit | fisherman/fisherman |
0f88af597977a56d44e48d76a3a994df20e708ab | functions/attached-policies.fish | functions/attached-policies.fish | function attached-policies --argument type name
if empty "$type" "$name"
usage attached-policies '<type>' '<name>'
return (false)
end
print-status attached-policies "$argv"
aws iam list-attached-$type-policies --$type-name "$name" | jq --raw-output .AttachedPolicies[].PolicyName
end
| Add function to find policies attached to things | Add function to find policies attached to things
| fish | mit | colstrom/shellops-aws,colstrom/piranha | |
5a1232b334984a6073e8e9efca3ae42374345234 | config/fish/config.fish | config/fish/config.fish | # Path to Oh My Fish install.
set -gx OMF_PATH "$HOME/.local/share/omf"
# Customize Oh My Fish configuration path.
#set -gx OMF_CONFIG "$HOME/.config/omf"
# Load oh-my-fish configuration.
source $OMF_PATH/init.fish
fish_vi_mode
set PATH \
"$HOME/bin" \
"$HOME/.local/bin" \
"$HOME/Library/Python/2.7/bin"... | # Path to Oh My Fish install.
set -gx OMF_PATH "$HOME/.local/share/omf"
# Customize Oh My Fish configuration path.
#set -gx OMF_CONFIG "$HOME/.config/omf"
# Load oh-my-fish configuration.
source $OMF_PATH/init.fish
fish_vi_mode
set PATH \
"$HOME/bin" \
"$HOME/.local/bin" \
"$HOME/Library/Python/2.7/bin"... | Add Mac autojump to fish | fix: Add Mac autojump to fish
| fish | mit | e4r7hbug/dotfiles,e4r7hbug/dotfiles |
8587d6c73a7f421484def95efa26b4ca271a5d9d | .config/fish/functions/bwUnlock.fish | .config/fish/functions/bwUnlock.fish | function bwUnlock --description "Unlock the bitwarden vault"
set -xU BW_SESSION (bw unlock --raw (read -s -P "Master Password: "))
end
| function bwUnlock --description "Unlock the bitwarden vault"
if set -q BW_PASSWORD
set -xU BW_SESSION (bw unlock --raw --passwordenv BW_PASSWORD)
else
set -xU BW_SESSION (bw unlock --raw (read -s -P "Master Password: "))
end
end
| Update fish function for unlocking bitwarden to allow the use of the env variable for password | Update fish function for unlocking bitwarden to allow the use of the env variable for password
| fish | mit | brentbrownfield/dotfiles |
6b3525218c2478940c85f0c721d509789a1db718 | .config/fish/functions/default/available/python.fish | .config/fish/functions/default/available/python.fish | function pvc
python3 -m venv .venv
end
function pva
# TODO this probably doesn't work as activate would be bash
source .venv/bin/activate
end
set -x PYTHONSTARTUP ~/.pythonrc
| function pvc
python3 -m venv .venv
end
function pva
# TODO this probably doesn't work as activate would be bash
source .venv/bin/activate
end
set -x PYTHONSTARTUP ~/.pythonrc
set -x PIPENV_VENV_IN_PROJECT 1
| Set env var so pipenv puts .env in project folder | Set env var so pipenv puts .env in project folder
| fish | unlicense | michd/dotfiles,michd/dotfiles,michd/dotfiles |
15fbec22e6f8abc4e13a1e8d65649e5084527d8c | bitbar/brew.1h.fish | bitbar/brew.1h.fish | #!/usr/local/bin/fish
# <bitbar.title>Homebrew updates</bitbar.title>
# <bitbar.author>Sebastian Klatt</bitbar.author>
# <bitbar.author.github>sebastianmarkow</bitbar.author.github>
# <bitbar.desc>List available updates from Homebrew</bitbar.desc>
# <bitbar.dependencies>fish,cut,wc,printf</bitbar.dependencies>
set -l ... | #!/usr/local/bin/fish
# <bitbar.title>Homebrew updates</bitbar.title>
# <bitbar.author>Sebastian Klatt</bitbar.author>
# <bitbar.author.github>sebastianmarkow</bitbar.author.github>
# <bitbar.desc>List available updates from Homebrew</bitbar.desc>
# <bitbar.dependencies>fish,cut,wc,printf</bitbar.dependencies>
set -l ... | Add update item on brew | bitbar: Add update item on brew
| fish | mit | sebastianmarkow/dotfiles |
4c390bb0a20305f6b71cfef5df08c342de879bb8 | fish/init/editor.fish | fish/init/editor.fish |
if [ (uname -s) = 'Darwin' ]
set --global --export EDITOR 'subl -w'
else
set --global --export EDITOR vim
end
|
if [ (uname -s) = 'Darwin' -a -f '/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl' ]
set --global --export EDITOR 'subl -w'
else
set --global --export EDITOR vim
end
| Add check to see if Sublime Text is installed before setting EDITOR | Add check to see if Sublime Text is installed before setting EDITOR
| fish | mit | lee-dohm/environment,lee-dohm/environment,lee-dohm/environment |
6798d4cb15549e26812dd2ad75fd57f0fba49887 | functions/bass.fish | functions/bass.fish | function bass
set -l bash_args $argv
set -l bass_debug
if test "$bash_args[1]_" = '-d_'
set bass_debug true
set -e bash_args[1]
end
set -l script_file (mktemp)
set -l python "python"
if command -v python3 >/dev/null 2>&1
set python "python3"
end
command $python (dirname (status -f))/__b... | function bass
set -l bash_args $argv
set -l bass_debug
if test "$bash_args[1]_" = '-d_'
set bass_debug true
set -e bash_args[1]
end
set -l script_file (mktemp)
if command -v python3 >/dev/null 2>&1
command python3 (dirname (status -f))/__bass.py $bash_args 3>$script_file
else
command pyth... | Stop using command with a variable | Stop using command with a variable
Fixes #81
fish 2.x may not support using `command` with a variable.
| fish | mit | edc/bass,edc/bass |
9f3b7295266cc3c90e8f8d3ab5b4e406c89eff11 | functions/_pure_prompt_virtualenv.fish | functions/_pure_prompt_virtualenv.fish | function _pure_prompt_virtualenv --description "Display virtualenv directory"
if test -n "$VIRTUAL_ENV"
set --local virtualenv (basename "$VIRTUAL_ENV")
set --local virtualenv_color (_pure_set_color $pure_color_virtualenv)
echo "$virtualenv_color$virtualenv"
end
end
| function _pure_prompt_virtualenv --description "Display virtualenv directory"
if test -n "$VIRTUAL_ENV"
set --local virtualenv (basename "$VIRTUAL_ENV")
set --local virtualenv_color (_pure_set_color $pure_color_virtualenv)
echo "$virtualenv_color$virtualenv"
else if test -n "$CONDA_DEFA... | Add test for virtualenvs created through conda | Add test for virtualenvs created through conda
| fish | mit | rafaelrinaldi/pure |
b256aac2e19f3880c6d33130db03df66571acb1c | plugins/dpaste/tests/test_dpaste.fish | plugins/dpaste/tests/test_dpaste.fish | #!/usr/bin/env fish
function suite_dpaste
function setup
set -g __dpaste_expires_choises
source ../dpaste.fish
__dpaste_set_defaults
end
function test_dpaste_parse_expires
assert_equal text (__dpaste_parse_expires text)
assert_equal "https://dpaste.de/api/?format=url" $__dpaste_send_url
... | #!/usr/bin/env fish
set -l script_dir (dirname (status -f))
function suite_dpaste
function setup
set -g __dpaste_expires_choises
source $script_dir/../dpaste.fish
__dpaste_set_defaults
end
function test_dpaste_parse_expires
assert_equal text (__dpaste_parse_expires text)
assert_equal "https... | Allow test run with any working directory | [dpaste] Allow test run with any working directory
| fish | mit | oranja/oh-my-fish,oh-my-fish/oh-my-fish-legacy,wfscheper/oh-my-fish,lfiolhais/oh-my-fish,oranja/oh-my-fish,ovstetun/oh-my-fish,vukk/oh-my-fish,jeremiejig/oh-my-fish,lfiolhais/oh-my-fish,hfs/oh-my-fish,setswei/oh-my-fish,marcker/oh-my-fish,wfscheper/oh-my-fish,nelsonjchen/oh-my-fish,sheldon/oh-my-fish,cap10morgan/oh-my-... |
f07855bf7b180f927c24b934603110e8fa49372f | do.fish | do.fish | function do --description 'Do what I want'
set -l subject "$argv"
set -l command ''
if test -z "$subject"
if which xclip > /dev/null
set subject (xclip -o -selection clipboard)
if test -z "$subject"
set subject (xclip -o)
end
else if which... | function do --description 'Do what I want'
set -l subject "$argv"
set -l command ''
if test -z "$subject"
if which xclip > /dev/null
set subject (xclip -o -selection clipboard)
if test -z "$subject"
set subject (xclip -o)
end
else if which... | Fix oiw (exit function with return) | Fix oiw (exit function with return)
| fish | mit | MoritzKn/fish-functions |
e52626ed01745099112e151034fa3c8f360d8daf | fish/config.fish | fish/config.fish | set -x PATH /usr/local/bin /bin /usr/sbin /sbin /usr/local/git/bin $PATH
set TERM xterm-256color
. ~/.config/fish/amazon_work.fish
| set -x PATH /usr/local/bin /bin /usr/sbin /sbin /usr/local/git/bin $PATH
set -x PATH ~/.linuxbrew/bin/ $PATH
set TERM xterm-256color
. ~/.config/fish/amazon_work.fish
| Add some paths for work | Add some paths for work
| fish | unlicense | bjadamson/dotfiles,bjadamson/dotfiles |
d3300b06b09e152f480595275e10603a3a93e1eb | fish/functions/fish_user_key_bindings.fish | fish/functions/fish_user_key_bindings.fish | function fish_user_key_bindings
bind \cr -M insert -m insert historyf
bind \cr -m insert historyf
bind \cf -M insert -m insert insert_filepath
bind \cf -m insert insert_filepath
bind \cs -M insert -m insert forward-char
bind \cs -m insert forward-char
bind \cp -M insert -m insert select_edit... | function fish_user_key_bindings
bind \cr -M insert -m insert historyf
bind \cr -m insert historyf
bind \cf -M insert -m insert insert_filepath
bind \cf -m insert insert_filepath
bind \cs -M insert -m insert forward-char
bind \cs -m insert forward-char
bind \cx -M insert -m insert forward-big... | Add single world forward completion for fish | Add single world forward completion for fish
| fish | mit | sebastianmarkow/dotfiles |
4d87d8468acd62aadb324766582c441aa65d8eca | fish/.config/fish/functions/update.fish | fish/.config/fish/functions/update.fish | function update
pushd ~/dotfiles
git pull
if [ (which yaourt) ]
yaourt -Syua --noconfirm
else if [ (which pacman) ]
sudo pacman -Syu --noconfirm
else if [ (which apt-get) ]
sudo apt-get update; and sudo apt-get upgrade
else if [ (which brew) ]
brew update; and brew upgrade
end
for pack... | function update
pushd ~/dotfiles
git pull
if [ (which yaourt) ]
yaourt -Syua --noconfirm
else if [ (which pacman) ]
sudo pacman -Syu --noconfirm
else if [ (which apt-get) ]
sudo apt-get update; and sudo apt-get upgrade
else if [ (which brew) ]
brew update; and brew upgrade
end
for pack... | Remove npm gate, didn't work :( | Remove npm gate, didn't work :(
| fish | unlicense | Wolfy87/dotfiles,Olical/dotfiles,Wolfy87/dotfiles |
0e2364b74b2c30785a6514a27d6881cba3e2b247 | functions/delete-security-group.fish | functions/delete-security-group.fish | function delete-security-group --argument id
trace (status --current-filename) $argv
if empty $id
usage delete-security-group '<id>'
return 23
end
if security-group is-default $id
return
else
switch $id
case 'sg-*'
aws ec2 delete-security... | Add function to delete security groups | Add function to delete security groups
| fish | mit | colstrom/piranha,colstrom/shellops-aws | |
2960ecdd7e2b6b07b92ac953a109dc68254c210f | .config/fish/functions/🗄__gitconfig.fish | .config/fish/functions/🗄__gitconfig.fish | # Sets git user.name and user.email
#
# ~/.gitconfig is tracked and shared. Sensitive or machine-specific data is
# stored in the alternate global config file.
# > If $XDG_CONFIG_HOME is not set or empty, $HOME/.config/git/config will be used.
function 🗄__gitconfig --argument-names email name
echo "🗄 Git configu... | # Sets git user.name and user.email
#
# ~/.gitconfig is tracked and shared. Sensitive or machine-specific data is
# stored in the alternate global config file.
# > If $XDG_CONFIG_HOME is not set or empty, $HOME/.config/git/config will be used.
function 🗄__gitconfig --argument-names email name
echo "🗄 Git configu... | Revise logic around config checks | Revise logic around config checks
| fish | mit | phatblat/dotfiles,phatblat/dotfiles,phatblat/dotfiles,phatblat/dotfiles,phatblat/dotfiles,phatblat/dotfiles |
a5240e349ca605d9ed44b0cae909ff626cf79667 | functions/user-has-password.fish | functions/user-has-password.fish | function user-has-password --argument user
if empty "$user"
usage user-has-password '<user>'
return (false)
end
aws iam get-login-profile --user-name $user > /dev/null ^ /dev/null
end
| Add function to check if user has password | Add function to check if user has password
| fish | mit | colstrom/shellops-aws,colstrom/piranha | |
cb5e01e542d5dbdb77a964b414f192d770ddf3e2 | functions/expand:choose-next.fish | functions/expand:choose-next.fish | function expand:choose-next
# Since we can't conditionally switch key bind modes, we need to pass through command completion requests again even
# though we are already in expand mode.
if not set -q __expand_replacements[1]
commandline -f complete
return
end
# If a filter is specified and more than o... | function expand:choose-next
# Since we can't conditionally switch key bind modes, we need to pass through command completion requests again even
# though we are already in expand mode.
if not set -q __expand_replacements[1]
commandline -f complete
return
end
# If a filter is specified and more than o... | Remove quotes from around expansions | Remove quotes from around expansions
| fish | mit | oh-my-fish/plugin-expand |
63538809d54da944d835abd0d7171ad7edf2810f | .config/fish/functions/extract_archive.fish | .config/fish/functions/extract_archive.fish | function extract_archive --description "Extract from compressed files"
for file in $argv
if test -f $file
echo -s "Extracting " (set_color --bold blue) $file (set_color normal)
switch $file
case *.tar
tar -xvf $file
case *.tar.bz2 *.tbz2
tar -jxvf $file
case... | Add a function for extracting compressed files | Add a function for extracting compressed files
| fish | mit | aawc/dotfiles,aawc/dotfiles | |
848ee78bf481f5d5c73bcc3152d52ad11f26bc84 | .config/fish/functions/🗄__gitconfig.fish | .config/fish/functions/🗄__gitconfig.fish | # Sets git user.name and user.email
#
# ~/.gitconfig is tracked and shared. Sensitive or machine-specific data is
# stored in the alternate global config file.
# > If $XDG_CONFIG_HOME is not set or empty, $HOME/.config/git/config will be used.
function 🗄__gitconfig --argument-names email name
echo "🗄 Git configu... | # Sets git user.name and user.email
#
# ~/.gitconfig is tracked and shared. Sensitive or machine-specific data is
# stored in the alternate global config file.
# > If $XDG_CONFIG_HOME is not set or empty, $HOME/.config/git/config will be used.
function 🗄__gitconfig --argument-names email name
echo "🗄 Git configu... | Fix logic on git config checks | Fix logic on git config checks
| fish | mit | phatblat/dotfiles,phatblat/dotfiles,phatblat/dotfiles,phatblat/dotfiles,phatblat/dotfiles,phatblat/dotfiles |
92f4136be7aa22bc2d7b0799634d420d773cbc67 | common/.config/fish/config.fish | common/.config/fish/config.fish | # . ~/.env
# Leaving temporary. This doesn't belong here
# if test (tty) = '/dev/tty2' -a -z "$TOP_FISH"
# setenv TOP_FISH '1'
# zsh -c '. ~/.profile && fish'; and exit
# end
# You should set up path in /etc/fish/conf.d/bin.fish
# set -gx PATH $PATH ~/bin
# This should also be moved to /etc/
if not ssh-add -... | # . ~/.env
# You should set up path in /etc/fish/conf.d/bin.fish
# set -gx PATH $PATH ~/bin
# This should also be moved to /etc/
if not ssh-add -l >/dev/null 2>&1; and test -e ~/.ssh/id_rsa
ssh-add ~/.ssh/id_rsa
end
# OPAM configuration
. ~/.opam/opam-init/init.fish > /dev/null 2> /dev/null or true
| Delete top fish (Now in etc) | Delete top fish (Now in etc)
| fish | unlicense | ahmedalsudani/config,ahmedalsudani/config,ahmedalsudani/config |
b599f35164cf1d626bccfc552ea4a7a82dfedbbd | fish/functions/custom_shell_init.fish | fish/functions/custom_shell_init.fish | function custom_shell_init
abbr devlog tail -f log/development.log
abbr g git
abbr guard bundle exec guard
abbr l exa
abbr b bin/rails
set -Ux EDITOR code
# Setup rbenv
set PATH $HOME/.rbenv/shims $PATH
rbenv rehash >/dev/null ^&1
end
| function custom_shell_init
abbr devlog tail -f log/development.log
abbr g git
abbr guard bundle exec guard
abbr l exa
abbr b bin/rails
set -Ux EDITOR 'code --wait'
# Setup rbenv
set PATH $HOME/.rbenv/shims $PATH
rbenv rehash >/dev/null ^&1
end
| Update editor var to wait | Update editor var to wait | fish | mit | gshaw/dotfiles,gshaw/dotfiles |
9b48c99d882a6c21e22604cff9a29b64cb939e73 | fish/.config/fish/completions/fzf_configure_bindings.fish | fish/.config/fish/completions/fzf_configure_bindings.fish | complete fzf_configure_bindings --no-files
complete fzf_configure_bindings --long help --short h --description "Print help"
complete fzf_configure_bindings --long directory --description "Change the key binding for searching directory"
complete fzf_configure_bindings --long git_log --description "Change the key binding... | Add fish shell completions for fzf | Add fish shell completions for fzf
| fish | mit | nitul1991/dotfiles,nitul1991/dotfiles | |
0d66be5e763a7e598586ca4bdb432fb30dd3c34b | functions/_pure_set_default.fish | functions/_pure_set_default.fish | function _pure_set_default \
--description 'Set default value for configuration variable' \
--argument-names var default
if not set -q --universal $var
set --universal $var $default
end
end
| function _pure_set_default \
--description 'Set default value for configuration variable' \
--argument-names var default
if not set -q --universal $var; or test -z $$var; and not set -q --global $var
set --universal $var $default
end
end
| Fix empty defaults for base colors | Fix empty defaults for base colors
| fish | mit | rafaelrinaldi/pure |
485095ba50accc36e5229c4e3b2fdc40bc368a88 | cd-gitroot.fish | cd-gitroot.fish | function __cdgitroot_usage
echo 'Usage: cd-gitroot [PATH]'
echo 'Jump to git repository\'s root directory.'
echo 'If PATH is specified, it\'s recognized as relative path'
echo 'from repository\'s root directory. And jump to it.'
end
function cd-gitroot -d 'Jump to git repo\'s root'
if not command g... | function __cdgitroot_usage
echo 'Usage: cd-gitroot [PATH]'
echo 'Jump to git repository\'s root directory.'
echo 'If PATH is specified, it\'s recognized as relative path'
echo 'from repository\'s root directory. And jump to it.'
end
function cd-gitroot -d 'Jump to git repo\'s root'
if not command g... | Revert "Add error bundle in completion function" | Revert "Add error bundle in completion function"
This reverts commit 5a8d0452d2c1b79e46c82df372f4e727dc2e321a.
Completion become disbale
| fish | unlicense | tasuten/cd-gitroot-fish |
debd33c4d685aa38f4dfc69ea0f6c3dbbd90a178 | roles/fish/files/config.fish | roles/fish/files/config.fish | # MANAGED BY ANSIBLE, DO NOT TOUCH
# Commands to run in interactive sessions can go here
if status is-interactive
# Disable greeting on startup
set -U fish_greeting
# Set important variables
set -gx EDITOR vim
starship init fish | source
end
| # MANAGED BY ANSIBLE, DO NOT TOUCH
# Commands to run in interactive sessions can go here
if status is-interactive
# Disable greeting on startup
set -U fish_greeting
# Set important variables
set -gx EDITOR vim
# Enable colors for ls in kitty
dircolors -c | source
starship init fish | sou... | Enable colors for ls in kitty | Enable colors for ls in kitty
| fish | mit | flokoe/dotfiles |
b406fa1c67e1c2c2adb21bfa33fde4e32a160156 | init.fish | init.fish | # Skip if cgitc_revision is up to date
set -l current_revision (git -C (dirname (status -f)) rev-parse HEAD)
if [ "$cgitc_revision" != "$current_revision" ]
printf 'Initializing \x1b[33mcgitc\x1b[0m ... '
set -l cgitc_text (
for line in (cat (dirname (status -f))/abbreviations)
# 1. Strip out comments
... | # Support fish < 2.2
switch "$FISH_VERSION"; case 2.1.2 2.1.1 2.1.0 2.0.0
for line in (cat (dirname (status -f))/abbreviations)
# 1. Strip out comments
# 2. Squeeze repeating spaces
# 3. Strip trailing whitespaces
set line (echo "$line" | cut -d '#' -f 1 | tr -s ' ' | sed 's/[[:space:]]*$//')
... | Support fish without abbr command | fish: Support fish without abbr command
Closes #20
| fish | mit | simnalamburt/pkg-cgitc |
ac39273f3dd85607804d8b4bd7440c9d2105e506 | configs/fish/functions/fish_prompt.fish | configs/fish/functions/fish_prompt.fish | function fish_prompt --description 'Write out the prompt'
set -l last_status $status
if not set -q __fish_prompt_normal
set -g __fish_prompt_normal (set_color normal)
end
# PWD
set_color $fish_color_cwd
echo -n (prompt_pwd)
set_color normal
printf '%s ' (__fish_git_prompt)
if not test $last_status -eq 0
... | function fish_prompt --description 'Write out the prompt'
set -l last_status $status
if not set -q __fish_prompt_normal
set -g __fish_prompt_normal (set_color normal)
end
# Disable path shortening
set -g fish_prompt_pwd_dir_length 0
set_color -b 000000 $fish_color_cwd
printf ' %s%s ' (prompt_pwd) (__fish_gi... | Extend prompt and make it graphical with powerline symbols | Extend prompt and make it graphical with powerline symbols
| fish | mit | adius/dotfiles,adius/dotfiles,adius/dotfiles,adius/dotfiles |
62047ea08b22e5f6e957d963c982885d74f7f65a | omf/init.fish | omf/init.fish | ## SETTINGS
# editors, pagers
set -gx BROWSER open
set -gx EDITOR vim
set -gx PAGER less
set -gx MANPAGER $PAGER
# fish greeting
set -gx fish_greeting ""
## ALIASES
# navigation
alias .. "cd .."
alias ... "cd ../.."
alias .... "cd ../../.."
# ls
alias l "ls -F"
alias la "ls -AF"
alias ll "ls -lF"
alias lla ... | ## SETTINGS
# editors, pagers
set -gx BROWSER open
set -gx EDITOR vim
set -gx PAGER less
set -gx MANPAGER $PAGER
# fish greeting
set -gx fish_greeting ""
## ALIASES
# navigation
alias .. "cd .."
alias ... "cd ../.."
alias .... "cd ../../.."
# ls
alias l "ls -F"
alias la "ls -AF"
alias ll "ls -lF"
alias lla ... | Add atom alias and remove npm and node | Add atom alias and remove npm and node
| fish | mit | chuckeles/dotfiles |
240e8958dca227dc3e1c67eaf01ca78483e02ef9 | .config/fish/functions/🧰__sdkman.fish | .config/fish/functions/🧰__sdkman.fish | # Installs and updates SDKs.
# https://sdkman.io/
# https://get.sdkman.io/
# https://github.com/sdkman/sdkman-cli
#
# Sequencing
# - After: omf
function 🧰__sdkman
echo "🧰 SDKman"
echo
if test -z "$sdkman_prefix"
error "\$sdkman_prefix is not set"
return 1
end
# Using /bin dir as... | # Installs and updates SDKs.
# https://sdkman.io/
# https://get.sdkman.io/
# https://github.com/sdkman/sdkman-cli
#
# Sequencing
# - After: omf
function 🧰__sdkman
echo "🧰 SDKman"
echo
if test -z "$sdkman_prefix"
error "\$sdkman_prefix is not set"
return 1
end
# Using /bin dir as... | Fix type in sdkman upstall | Fix type in sdkman upstall
| fish | mit | phatblat/dotfiles,phatblat/dotfiles,phatblat/dotfiles,phatblat/dotfiles,phatblat/dotfiles,phatblat/dotfiles |
de6530467b96ce2884df19a1e8e8c789ab31be51 | init.fish | init.fish | # Initialize the current fish session and connect to the tmux session.
function init --on-event init_tmux-zen
# If we're running in a superuser shell, do nothing.
if test $USER = root
return 0
end
# Connect to the TMUX session if it exists, or create it if it doesn't.
if not set -q TMUX
set -l tmux_b... | # Initialize the current fish session and connect to the tmux session.
function init --on-event init_tmux-zen
# If we're not running in an interactive terminal, do nothing.
if begin; not isatty; or not status --is-interactive; end
return 0
end
# If we're running in a superuser shell, do nothing.
if test ... | Fix unwanted exec when fish is used to externally run shell commands | Fix unwanted exec when fish is used to externally run shell commands
| fish | mit | coderstephen/tmux-zen |
2048b19ab262ebd1f5e72e0ffff31b398d43207b | fish/functions/fish_user_key_bindings.fish | fish/functions/fish_user_key_bindings.fish | function fish_user_key_bindings
bind \cr -M insert -m insert historyf
bind \cr -m insert historyf
bind \cs -M insert -m insert insert_filepath
bind \cs -m insert insert_filepath
end
| function fish_user_key_bindings
bind \cr -M insert -m insert historyf
bind \cr -m insert historyf
bind \cs -M insert -m insert insert_filepath
bind \cs -m insert insert_filepath
bind \cj -M insert -m insert down-or-search
bind \cj -m insert down-or-search
bind \ck -M insert -m insert up-or-s... | Add ctrl + j/k to iterate through history | fish: Add ctrl + j/k to iterate through history
| fish | mit | sebastianmarkow/dotfiles |
201380aab20be621baf1abcb26385dbdf38c0cf3 | .config/fish/config.fish | .config/fish/config.fish | # pyenv fish
set -gx PYENV_ROOT "$HOME/.pyenv"
set -x PATH $PATH "$PYENV_ROOT/bin"
status --is-interactive; and . (pyenv init - | psub)
# emacs alias
alias e="emacs -nw"
# peco
function peco_select_history
if set -q $argv
history | peco | read line; commandline $line
else
history | peco --quer... | # pyenv fish
set -gx PYENV_ROOT "$HOME/.pyenv"
set -x PATH $PATH "$PYENV_ROOT/bin"
status --is-interactive; and . (pyenv init - | psub)
# emacs alias
alias e="emacs -nw"
# peco
function peco_select_history
if set -q $argv
history | peco | read line; commandline $line
else
history | peco --quer... | Fix gacp function with count command | Fix gacp function with count command
| fish | mit | kyon-bll/.dotfiles |
28b87982d9b6ad8f79b5f3202ff7b262dadecf11 | fish/config.fish | fish/config.fish | # remove greeting
set fish_greeting
# Set aliases
alias k "kubectl"
alias c "clear"
alias b "babel-node"
alias fi "fisher"
alias tc "itermocil"
alias brc "brew cask"
alias brci "brew cask install"
alias brcu "brew cask uninstall"
alias y "yarn"
alias r "yarn"
alias gcl "git clone"
alias gs "git status"
alias gp "git p... | # remove greeting
set fish_greeting
# Set aliases
alias k "kubectl"
alias c "clear"
alias b "babel-node"
alias fi "fisher"
alias tc "itermocil"
alias brc "brew cask"
alias brci "brew cask install"
alias brcu "brew cask uninstall"
alias y "yarn"
alias r "yarn"
alias gcl "git clone"
alias gs "git status"
alias gp "git p... | Add built from source pgloader to PATH | :wrench: Add built from source pgloader to PATH
| fish | unlicense | mistadikay/dotfiles |
3628a544ffb9a50a7265ca446b9aac51eb51fafc | fish/config.fish | fish/config.fish | set -g fish_greeting ''
set -x EDITOR /usr/local/bin/vim
set -x NODE_PATH /usr/local/lib/node_modules
set -x PATH /usr/local/bin $PATH
set -x PATH /usr/local/sbin $PATH
set -x PATH /usr/local/share/npm/bin $PATH
set -x PATH $HOME/.rbenv/bin $PATH
set -x PATH $HOME/.rbenv/shims $PATH
set -x PATH $HOME/bin $PATH
set -x ... | set -g fish_greeting ''
set -x EDITOR (which vim)
set -x NODE_PATH /usr/local/lib/node_modules
set -x PATH /usr/local/bin $PATH
set -x PATH /usr/local/sbin $PATH
set -x PATH /usr/local/share/npm/bin $PATH
set -x PATH $HOME/.rbenv/bin $PATH
set -x PATH $HOME/.rbenv/shims $PATH
set -x PATH $HOME/bin $PATH
set -x RUBYGEM... | Use any editor, as long as it's vim | Use any editor, as long as it's vim
| fish | mit | sferik/dotfiles,atogle/dotfiles,sferik/dotfiles |
e90ce31394a60771fbf9b29257a20e0cbe31903a | .config/fish/gpg.fish | .config/fish/gpg.fish | function __refresh_gpg_agent_info -d "Re-load ~/.gpg-agent-info into environment"
cat ~/.gpg-agent-info | sed 's/=/ /' | while read key value
set -e $key
set -U -x $key "$value"
end
end
if not set -q -x GPG_AGENT_INFO
gpg-agent --daemon >/dev/null
end
if test -f ~/.gpg-agent-info
__refresh_gpg_agent_info
gp... | function __refresh_gpg_agent_info -d "Re-load ~/.gpg-agent-info into environment"
cat ~/.gpg-agent-info | sed 's/=/ /' | while read key value
set -e $key
set -U -x $key "$value"
end
end
if not set -q -x GPG_AGENT_INFO
gpg-agent --daemon --write-env-file ~/.gpg-agent-info >/dev/null
end
if test -f ~/.gpg-agent-... | Fix GPG agent env file | Fix GPG agent env file
| fish | mit | Gres/dotfiles,Gres/dotfiles,JDevlieghere/dotfiles,JDevlieghere/dotfiles,JDevlieghere/dotfiles,Gres/dotfiles |
ff001906c2e22c1c792c9982385a7a39a1c8642d | fish/init/editor.fish | fish/init/editor.fish |
set --global --export EDITOR 'subl -w'
|
if [ (uname -s) -eq 'Darwin' ]
set --global --export EDITOR 'subl -w'
else
set --global --export EDITOR vim
end
| Fix EDITOR to work on more than just OS X | Fix EDITOR to work on more than just OS X
| fish | mit | lee-dohm/environment,lee-dohm/environment,lee-dohm/environment |
1d7652687c7cce076e5792c0a94223c21ceb931d | fish/config.fish | fish/config.fish | # Atom
set -gx EDITOR 'atom -wd'
set -gx ATOM_REPOS_HOME /Projects/2014/ryansobol
# postgres
set -gx PGDATA /usr/local/var/postgres
# chruby
source /usr/local/share/chruby/chruby.fish
source /usr/local/share/chruby/auto.fish
| # Atom
set -gx EDITOR 'atom -wd'
set -gx ATOM_REPOS_HOME /Projects/2014/ryansobol
# chruby
source /usr/local/share/chruby/chruby.fish
source /usr/local/share/chruby/auto.fish
| Remove the PGDATA env variable | Remove the PGDATA env variable
| fish | mit | ryansobol/config,ryansobol/config |
17b135ea3c20e16aafd63a5ee6027b242be67200 | config/fish/functions/my_vi_key_bindings.fish | config/fish/functions/my_vi_key_bindings.fish | function my_vi_key_bindings --description "Mikel's vi-like key bindings for fish"
if contains -- -h $argv
or contains -- --help $argv
echo "Sorry but this function doesn't support -h or --help"
return 1
end
# Start with the standard Fish bindings that are similar to Vi.
fish_vi_... | Add fish Vi-mode key bindings that act like vim's virtualedit mode. | Add fish Vi-mode key bindings that act like vim's virtualedit mode.
| fish | apache-2.0 | mikelward/conf,mikelward/conf | |
37cf2ebce455f3a2b10d75fa1129ef753d02de09 | functions/fish_title.fish | functions/fish_title.fish | function _ssh_find_config_value
ssh -G $argv[2..-1] | grep -ie "^$argv[1] " | sed "s/^$argv[1] \(.*\)/\1/I"
end
function fish_title
set -l title ""
switch $_
case fish
set title (prompt_pwd)
case vim
set -l args (echo $argv[1] | sed 's/ /\n/g')
if test (count $args) -gt 1
set tit... | function _ssh_find_config_value
ssh -G $argv[2..-1] | grep -ie "^$argv[1] " | sed "s/^$argv[1] \(.*\)/\1/I"
end
function _tokenize_command
commandline -r $argv[1]
commandline -o
commandline -r ""
end
function fish_title
set -l title ""
switch $_
case fish
set title (prompt_pwd)
case vim
... | Use the commandline buffer for tokenization | Use the commandline buffer for tokenization
The original approaches would have broken up arguments with spaces. This
should prevent that.
| fish | mit | wilfriedvanasten/miscvar,wilfriedvanasten/miscvar,wilfriedvanasten/miscvar |
04511f11c5f665b278be828f9d97d1d680cd524c | .config/fish/functions/bwFields.fish | .config/fish/functions/bwFields.fish | function bwFields --description "Lookup password in bitwarden based on username and search term"
set -l options (fish_opt -s h -l help)
set options $options (fish_opt --short s --long search --required-val)
set options $options (fish_opt --short u --long username --required-val)
argparse $options ... | Add fish function to lookup fields in bitwarden | Add fish function to lookup fields in bitwarden
| fish | mit | brentbrownfield/dotfiles | |
e763e3f518c7562990cad12b5fc89030fb5c9d74 | .config/fish/env.fish | .config/fish/env.fish | ## Note: Replaced calls to brew --prefix with actual values since
## it is slow (~ 200 ms)
set -x PATH /usr/local/opt/libexec/gnubin $PATH
### RBENV
set -x RBENV_ROOT /usr/local/opt/rbenv
set -x PATH $RBENV_ROOT/bin $PATH
set -x PATH $RBENV_ROOT/shims $PATH
set -x GEM_HOME /usr/local/opt/gems
set -x GEM_PATH /usr/loc... | ## Note: Replaced calls to brew --prefix with actual values since
## it is slow (~ 200 ms) (min. b. -p. coreutils; b. -p itsel is quick)
set -x PATH /usr/local/opt/coreutils/libexec/gnubin $PATH
### RBENV
set -x RBENV_ROOT /usr/local/opt/rbenv
set -x PATH $RBENV_ROOT/bin $PATH
set -x PATH $RBENV_ROOT/shims $PATH
set ... | Add manually path to nvm bin/ | Add manually path to nvm bin/
| fish | epl-1.0 | jakubholynet/dotfiles,jakubholynet/dotfiles |
5cc3020a6683eaf03ec9370b601f3d1e110edad3 | functions/ami.fish | functions/ami.fish | function ami --argument distribution release
trace (status --current-filename) $argv
switch "$distribution"
case ubuntu
switch "$release"
case 16.04 xenial lts
aws ec2 describe-images --filters "Name=name,Values=ubuntu/images/hvm-ssd/ubuntu-xenial-16.04-a... | Add function to find AMIs (currently only Ubuntu) | Add function to find AMIs (currently only Ubuntu)
| fish | mit | colstrom/piranha,colstrom/shellops-aws | |
698193df1cb284632e40965637cb708c5eaea7a6 | conf.d/_mason-cd.fish | conf.d/_mason-cd.fish | # Go
function g -d 'Change directory and look up'
set is_okay true
if test -z $argv
cd -
else
if test -e $argv
cd $argv
else
set is_okay false
set_color $red
echo 'Cannot find "'$argv'"'
set_color normal
end
end
if eval $is_okay
ls -AF .
end
end
alias gh 'g... | # Go
function g -d 'Change directory and look up'
set is_okay true
if test -z $argv # if no argument
cd -
else
if test -e $argv # if the file exists
cd $argv
else
set is_okay false
set_color $red
echo 'Cannot find "'$argv'"'
set_color normal
end
end
if eval $is_o... | Add comments for test statements | Add comments for test statements | fish | mit | masonwan/fish-config,masonwan/fish-config |
6c8696df64a2fd90a1b4b162093b241391510c17 | fish/.config/fish/config.fish | fish/.config/fish/config.fish | # Set path
set -x PATH $HOME/bin $PATH
# Include abbreviations
source $HOME/.config/fish/abbreviations.fish
# Initialize commajump
source ~/.config/fish/functions/__commajump_add.fish
# Activate chruby
[ -f /usr/local/share/chruby/chruby.fish ]; and source /usr/local/share/chruby/chruby.fish
[ -f /usr/local/share/ch... | # Set path
set -x PATH $HOME/bin $PATH
# Include abbreviations
source $HOME/.config/fish/abbreviations.fish
# Initialize commajump
source ~/.config/fish/functions/__commajump_add.fish
# Activate chruby
[ -f /usr/local/share/chruby/chruby.fish ]; and source /usr/local/share/chruby/chruby.fish
[ -f /usr/local/share/ch... | Set GOPATH if golang is installed | [fish] Set GOPATH if golang is installed
| fish | mit | spinningarrow/.files,spinningarrow/.files |
84b523f78a75d587a1eb483b30788f107c2674bd | fish/functions/pman.fish | fish/functions/pman.fish |
function pman --description 'Opens a man page in the OS X Preview app'
if [ (uname -s) = 'Darwin' ]
man -t $argv[1] | open -f -a /Applications/Preview.app
else
man $argv
end
end
|
function pman --description 'Opens a man page in the OS X Preview app'
if test (uname -s) = 'Darwin'
man -t $argv[1] | open -f -a /Applications/Preview.app
else
man $argv
end
end
| Use standard format for tests | Use standard format for tests
| fish | mit | lee-dohm/environment,lee-dohm/environment,lee-dohm/environment |
97eebdcdcd832c7e2085b302fbadc7890ed49851 | fish_greeting.fish | fish_greeting.fish | function fish_greeting -d "What's up, fish?"
set_color $fish_color_autosuggestion
uname -nmsr
# TODO: `command -q -s` only works on fish 2.5+, so hold off on that for now
command -s uptime >/dev/null
and uptime
set_color normal
end
| function fish_greeting -d "What's up, fish?"
set_color $fish_color_autosuggestion
uname -nmsr
# TODO: `command -q -s` only works on fish 2.5+, so hold off on that for now
command -s uptime >/dev/null
and command uptime
set_color normal
end
| Use `command uptime` to avoid coloured output when using grc plugin | Use `command uptime` to avoid coloured output when using grc plugin
| fish | mit | oh-my-fish/theme-bobthefish |
dc3e75c86a4783bb2a0b709f2e18d3a1b8cd208a | shell/jump.fish | shell/jump.fish | # Hook jump on directory changes.
function __jump_add --on-variable PWD
status --is-command-substitution; and return
jump update
end
# Shortcut to j for the autojump folks.
function j
set -l output (jump cd $argv)
if test -d "$output"
cd $output
end
end
| Add prototypical fish shell integration | Add prototypical fish shell integration
| fish | mit | gsamokovarov/jump | |
5e91e4ca0446c59c391339b558ac0c40af2cf632 | config/fish/config.fish | config/fish/config.fish | # Path to Oh My Fish install.
set -gx OMF_PATH "/home/e4r7hbug/.local/share/omf"
# Customize Oh My Fish configuration path.
#set -gx OMF_CONFIG "/home/e4r7hbug/.config/omf"
# Load oh-my-fish configuration.
source $OMF_PATH/init.fish
fish_vi_mode
| # Path to Oh My Fish install.
set -gx OMF_PATH "/home/e4r7hbug/.local/share/omf"
# Customize Oh My Fish configuration path.
#set -gx OMF_CONFIG "/home/e4r7hbug/.config/omf"
# Load oh-my-fish configuration.
source $OMF_PATH/init.fish
fish_vi_mode
set PATH \
"$HOME/bin" \
"$HOME/.local/bin" \
"$HOME/Libra... | Extend $PATH with bin dirs in fish | feat: Extend $PATH with bin dirs in fish
| fish | mit | e4r7hbug/dotfiles,e4r7hbug/dotfiles |
eedb481041be3c1b5c6bcc394a6ed472c5470f00 | fish/init/postgresql.fish | fish/init/postgresql.fish |
if which postgres > /dev/null
set --global --export POSTGRES (get_active_brew_dir (which postgres))
set --global --export POSTGRES_BIN $POSTGRES/bin
end
|
if which postgres > /dev/null
set --global --export POSTGRES_DATA /usr/local/var/postgres
function start_postgres
set --local logfile $argv[1]
if [ -z $logfile ]
set logfile ~/postgres.log
end
pg_ctl start --pgdata $POSTGRES_DATA --log $logfile
end
functio... | Add PostgreSQL startup and shutdown functions | Add PostgreSQL startup and shutdown functions
| fish | mit | lee-dohm/environment,lee-dohm/environment,lee-dohm/environment |
b6e14efae31c4cec967afe51d5773f3d8d709a90 | functions/__paradox_git_hash.fish | functions/__paradox_git_hash.fish | function __paradox_git_hash --description "Get the current git commit hash, if we're in a git working tree"
if status --is-interactive
set -l git_command 'git rev-parse --is-inside-work-tree --short HEAD ^/dev/null'
if type gtimeout >/dev/null ^/dev/null
set -l git_command 'timeout 1' git_command
... | function __paradox_git_hash --description "Get the current git commit hash, if we're in a git working tree"
set -l git_command 'git rev-parse --is-inside-work-tree --short HEAD ^/dev/null'
if type gtimeout >/dev/null ^/dev/null
set -l git_command 'timeout 1' git_command
end
set -l git_info (eval $git_com... | Allow git_hash to be run uninteractively | Allow git_hash to be run uninteractively
| fish | mit | paradox460/paradox-theme |
4fa9d227b4b6eeef9ea8572e3b2cf0388943da79 | share/fry/fry.fish | share/fry/fry.fish | # Set defaults
set -q fry_rubies ; or set -gx fry_rubies $HOME/.rubies
set -q fry_auto_switch ; or set -gx fry_auto_switch 0
# Path
set -l fry_path (dirname (status -f))
if not contains $fry_path/functions $fish_function_path
set fish_function_path $fry_path/functions $fish_function_path
end
if not contains... | # Set defaults
set -q fry_rubies ; or set -gx fry_rubies $HOME/.rubies
set -q fry_auto_switch ; or set -gx fry_auto_switch 0
test -d $fry_rubies; or mkdir -p $fry_rubies
# Path
set -l fry_path (dirname (status -f))
if not contains $fry_path/functions $fish_function_path
set fish_function_path $fry_path/func... | Create rubies directory if not existing | Create rubies directory if not existing
| fish | mit | terlar/fry |
9f0057e6e39649023d923a59760466cd46f39080 | .config/fish/config.fish | .config/fish/config.fish | # pyenv fish
set -gx PYENV_ROOT "$HOME/.pyenv"
set -x PATH $PATH "$PYENV_ROOT/bin"
status --is-interactive; and . (pyenv init - | psub)
# emacs alias
alias e="emacs -nw"
# peco
function peco_select_history
if set -q $argv
history | peco | read line; commandline $line
else
history | peco --quer... | # pyenv fish
set -gx PYENV_ROOT "$HOME/.pyenv"
set -x PATH $PATH "$PYENV_ROOT/bin"
status --is-interactive; and . (pyenv init - | psub)
# emacs alias
alias e="emacs -nw"
# peco
function peco_select_history
if set -q $argv
history | peco | read line; commandline $line
else
history | peco --quer... | Fix gacp function with count command | Fix gacp function with count command
| fish | mit | kyon-bll/.dotfiles |
e764a058b0ba7b3883d252e74417b10d521ed2d7 | plugins/find-in/find-in.fish | plugins/find-in/find-in.fish | # The MIT License
#
# Copyright (c) Simon Lees <http://simotek.net/> and contributors
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the ... | Add a plugin for finding a string in files, find + grep | Add a plugin for finding a string in files, find + grep
| fish | mit | simotek/tackle,simotek/tackle | |
0513ebdced1436cb4c7fede47fe4af15c32ffc2b | homeshick.fish | homeshick.fish | # This script should be sourced in the context of your shell like so:
# source $HOME/.homesick/repos/homeshick/homeshick.fish
# Once the homeshick() function is defined, you can type
# "homeshick cd CASTLE" to enter a castle.
function homeshick
if test \( (count $argv) = 2 -a $argv[1] = "cd" \)
cd "$HOME/.homesick/... | # This script should be sourced in the context of your shell like so:
# source $HOME/.homesick/repos/homeshick/homeshick.fish
# Once the homeshick() function is defined, you can type
# "homeshick cd CASTLE" to enter a castle.
function homeshick
if test \( (count $argv) = 2 -a $argv[1] = "cd" \)
cd "$HOME/.homesick/... | Fix fish path resolution for paths with spaces | Fix fish path resolution for paths with spaces | fish | mit | andsens/homeshick,languitar/homeshick,agvim/homeshick |
ccadd2efe7c85604147073304e105da162800241 | config/fish/functions/fish_prompt.fish | config/fish/functions/fish_prompt.fish | function _prompt_dir_component
_prompt_wrap_text (prompt_pwd) brblue
end
function _prompt_err_component --argument-names {error_code}
if [ $error_code -ne 0 ]
_prompt_wrap_text $error_code brred
end
end
function _prompt_git_component
if __fish_is_git_repository
set --local sha (git rev-parse HEAD)
... | function _prompt_dir_component
_prompt_wrap_text (prompt_pwd) brblue
end
function _prompt_err_component --argument-names {error_code}
if [ $error_code -ne 0 ]
_prompt_wrap_text $error_code brred
end
end
function _prompt_git_component
if __fish_is_git_repository
set --local sha (git rev-parse HEAD)
... | Fix git prompt component when checking out an individual commit | Fix git prompt component when checking out an individual commit
| fish | mit | lee-dohm/dotfiles,lee-dohm/dotfiles,lee-dohm/dotfiles,lee-dohm/dotfiles |
0663399c87985144423a33e21a5f7a215c0ed952 | functions/create-instance-profile.fish | functions/create-instance-profile.fish | function create-instance-profile --argument name
trace (status --current-filename) $argv
if empty "$name"
usage create-instance-profile '<name>'
return (false)
end
if not instance-profile-exists $name
aws iam create-instance-profile --instance-profile-name $name
end
end
| Add function to create instance profiles | Add function to create instance profiles
| fish | mit | colstrom/piranha,colstrom/shellops-aws | |
d0c7796a572832e8c8374b3877da027d9d504417 | functions/update-users.fish | functions/update-users.fish | function update-users
for user in (get iam/users)
user-exists $user
or create-user $user
and for policy in (get iam/users/$user/policies)
apply-policy iam/users/$user/policies/$policy
end
end
end
| Add function to update all users | Add function to update all users
| fish | mit | colstrom/shellops-aws,colstrom/piranha | |
9ba095bc282ec29e2fec81ddbe8a81440121006f | fish/functions/pip3.fish | fish/functions/pip3.fish | function pip3
set -l cmd $argv[1]
set -e argv[1]
switch "$cmd"
case install list
command pip3 $cmd --user $argv
case update upgrade
pip3 list --outdated --format=legacy $argv | cut -d ' ' -f 1 | xargs -n 1 pip3 install --upgrade $argv
case '*'
com... | function pip3
set -l cmd $argv[1]
set -e argv[1]
switch "$cmd"
case install list
command pip3 $cmd --user $argv
case update upgrade
command pip3 list --user --outdated --format=legacy $argv | cut -d ' ' -f 1 | xargs -n 1 pip3 install --user --upgrade $argv
ca... | Fix installation of user pip packages | Fix installation of user pip packages
| fish | mit | Rypac/dotfiles,Rypac/dotfiles,Rypac/dotfiles |
7fbb1c641482ebba63b3b93801ebfac4a5edd000 | .config/fish/config.fish | .config/fish/config.fish | # pyenv fish
set -gx PYENV_ROOT "$HOME/.pyenv"
set -x PATH $PATH "$PYENV_ROOT/bin"
status --is-interactive; and . (pyenv init - | psub)
# peco
function peco_select_history
if set -q $argv
history | peco | read line; commandline $line
else
history | peco --query $argv | read line; commandline $l... | # pyenv fish
set -gx PYENV_ROOT "$HOME/.pyenv"
set -x PATH $PATH "$PYENV_ROOT/bin"
status --is-interactive; and . (pyenv init - | psub)
# peco
function peco_select_history
if set -q $argv
history | peco | read line; commandline $line
else
history | peco --query $argv | read line; commandline $l... | Add "git merge" as gm and "git checkout master" as gcm | Add "git merge" as gm and "git checkout master" as gcm
| fish | mit | kyon-bll/.dotfiles |
d2c4f0efeacaaf242fc14da49fddf1a8b0f12899 | .config/fish/config.fish | .config/fish/config.fish | source ~/.asdf/asdf.fish
set -x ERL_AFLAGS "-kernel shell_history enabled"
set -x HOMEBREW_EDITOR "vim"
set -x GOPATH "/Users/rockwood/devel/go"
| source ~/.asdf/asdf.fish
set -x ERL_AFLAGS "-kernel shell_history enabled"
set -x HOMEBREW_EDITOR "vim"
set -x GOPATH "/Users/rockwood/devel/go"
set -g fish_user_paths "/usr/local/sbin" $fish_user_paths
| Add sbin to fish paths | Add sbin to fish paths
| fish | mit | rockwood/dotfiles,rockwood/dotfiles |
ec16ce7343feae3fd08996a8b16284693c98adfa | init.fish | init.fish | # global encoding
set -gx LANG en_US.UTF-8
# global path
mkdir -p $HOME/bin $HOME/.local/bin
set PATH $HOME/bin $HOME/.local/bin /usr/local/bin $PATH
# homebrew settings
function check_brew_installtion --description "check homebrew if installed"
if not which brew >/dev/null ^&1
echo 'Homebrew is not installed, ... | # global encoding
set -gx LANG en_US.UTF-8
# global path
mkdir -p $HOME/bin $HOME/.local/bin
set PATH $HOME/bin $HOME/.local/bin /usr/local/bin $PATH
# homebrew settings
function check_brew_installtion --description "check homebrew if installed"
if not which brew >/dev/null ^&1
echo 'Homebrew is not installed, ... | Fix exec-path-from-shell :config: Expected printf output from shell, but got: "" | Fix exec-path-from-shell :config: Expected printf output from shell, but got: ""
https://github.com/syl20bnr/spacemacs/issues/4755
| fish | mit | douglarek/fish |
65b82fc41ae0b629ebe261aaf83958c0690f256f | functions/database-instance-create.fish | functions/database-instance-create.fish | function database-instance-create --argument name
trace (status --current-filename) $argv
if empty $name
usage database-instance-create '<name>'
return 23
end
if database instance exists $name
print --warning "$name already exists"
else
if has $name databases
... | Add function to create RDS instances | Add function to create RDS instances
| fish | mit | colstrom/shellops-aws,colstrom/piranha | |
3d96be0e61cfe38312ad5b123bfc02f4cd418867 | home/.config/fish/config.fish | home/.config/fish/config.fish | fish_vi_mode
set fish_bind_mode insert
set fish_key_bindings fish_user_key_bindings
set -x FZF_CTRL_T_COMMAND "$FZF_DEFAULT_COMMAND"
set -x EDITOR vim
set -x P4DIFF "vimdiff -R"
set -x P4MERGE vimdiff
# Load fishmarks (http://github.com/techwizrd/fishmarks)
if test -e $HOME/.fishmarks/marks.fish
source $HOME/.fis... | fish_vi_mode
set fish_bind_mode insert
set fish_key_bindings fish_user_key_bindings
set -x FZF_CTRL_T_COMMAND "$FZF_DEFAULT_COMMAND"
set -x EDITOR vim
set -x P4DIFF "vimdiff -R"
set -x P4MERGE vimdiff
# Load fishmarks (http://github.com/techwizrd/fishmarks)
# if test -e $HOME/.fishmarks/marks.fish
# source $HOME/.... | Disable fishmarks (so it doesn't clobber g as an alias for git | Disable fishmarks (so it doesn't clobber g as an alias for git
| fish | unlicense | dgfranklin/dotfiles |
86f7e1b720f8395964f348f601b4b8fd9a1cf671 | init.fish | init.fish | function init --on-event init_thefuck
if type -q thefuck
set -q __tf_func; or __tf_updt
eval $__tf_func
else
echo "Please install thefuck first. Check https://github.com/nvbn/thefuck"
end
end
| if type -q thefuck
set -q __tf_func; or __tf_updt
eval $__tf_func
else
echo "Please install thefuck first. Check https://github.com/nvbn/thefuck"
end
| Initialize immediately, rather than waiting for an event. | Initialize immediately, rather than waiting for an event.
| fish | mit | oh-my-fish/plugin-thefuck |
7759f5fbb95d8f31306fe04de2960e0f2bc53fe6 | init.fish | init.fish | function init --on-event init_thefuck
if available thefuck
eval (thefuck --alias | tr '\n' ';') # function stays up-to-date, always
else
echo "Please install thefuck first. Check https://github.com/nvbn/thefuck"
end
end
| function init --on-event init_thefuck
if type -q thefuck
eval (thefuck --alias | tr '\n' ';') # function stays up-to-date, always
else
echo "Please install thefuck first. Check https://github.com/nvbn/thefuck"
end
end
| Replace `available` usage with `type -q` | Replace `available` usage with `type -q`
| fish | mit | oh-my-fish/plugin-thefuck |
59b1315ab4b92d69db3b913e88715ded447d63cc | fish/config.fish | fish/config.fish | if status --is-login
set PATH ~/bin /usr/local/bin $PATH
end
if test -f ~/.autojump/etc/profile.d/autojump.fish
. ~/.autojump/etc/profile.d/autojump.fish
end
| if status --is-login
set PATH ~/bin /usr/local/bin $PATH
end
if test -f ~/.autojump/etc/profile.d/autojump.fish
. ~/.autojump/etc/profile.d/autojump.fish
end
set -e TERM
set -Ux TERM xterm-256color
if test ! (which vi 2>/dev/null)
alias vi=vim
end
| Set TERM to xterm-256color for tmux... Alias vim to vi if vi does not exists. | Set TERM to xterm-256color for tmux...
Alias vim to vi if vi does not exists.
| fish | mit | lfont/dotfiles,lfont/dotfiles,lfont/dotfiles |
ace6504b4edb25516d7357a7b99d03ad30a315ab | fish_prompt.fish | fish_prompt.fish | # name: eclm
function _git_branch_name
echo (command git symbolic-ref HEAD ^/dev/null | sed -e 's|^refs/heads/||')
end
function _is_git_dirty
echo (command git status -s --ignore-submodules=dirty ^/dev/null)
end
function fish_prompt
set -l last_status $status
set -l cyan (set_color -o cyan)
set -l yellow (s... | # name: eclm
function _git_branch_name
echo (command git symbolic-ref HEAD ^/dev/null | sed -e 's|^refs/heads/||')
end
function _is_git_dirty
echo (command git status -s --ignore-submodules=dirty ^/dev/null)
end
function fish_prompt
set -l last_status $status
set -l cyan (set_color -o cyan)
set -l yellow (s... | Make branch name more prominent | Make branch name more prominent
| fish | mit | oh-my-fish/theme-eclm |
7997d7e883cad4c4084b3a6851877e66b1152c3c | config/fish/config.fish | config/fish/config.fish | umask 077 # WSL: Default umask is not applied (github:Microsoft/WSL/issues/352)
set -x PATH $PATH ~/bin
set -x SHELL (which fish)
# github:danhper/fish-ssh-agent
if test -z "$SSH_ENV"
set -xg SSH_ENV $HOME/.ssh/environment
end
if not __ssh_agent_is_started
__ssh_agent_start
end
# Base16 Shell
if status --is... | umask 077 # WSL: Default umask is not applied (github:Microsoft/WSL/issues/352)
set -x PATH $PATH ~/.bin
set -x SHELL (which fish)
# github:danhper/fish-ssh-agent
if test -z "$SSH_ENV"
set -xg SSH_ENV $HOME/.ssh/environment
end
if not __ssh_agent_is_started
__ssh_agent_start
end
# Base16 Shell
if status --i... | Change bin path to .bin (refactor) | Change bin path to .bin (refactor)
| fish | cc0-1.0 | tulhan/.files,tulhan/.files |
6ec2aa38232a5275f982b206f2d38ca4fb778c7a | .config/fish/config.fish | .config/fish/config.fish | # Replace the process to tmux
if [ -z "$TMUX" -a x"$TERM" != x"screen" ]
switch "$WSLENV"
case 'VSCODE*'
/bin/true # do nothing
case '*'
which tmux && exec tmux -u
end
end
| # Create temporary files if running on WSL
if [ -n "$WSLENV" ]
sudo systemd-tmpfiles --create
end
# Replace the process to tmux
if [ -z "$TMUX" -a x"$TERM" != x"screen" ]
switch "$WSLENV"
case 'VSCODE*'
/bin/true # do nothing
case '*'
which tmux && exec tmux -u
end
e... | Create temporary files if running on WSL | Create temporary files if running on WSL
| fish | unlicense | yusuke-arai/dotfiles |
518be867acdaa2bc423eada3b3d68a9b7682de40 | config/fish/aliases.fish | config/fish/aliases.fish | set LS_COLORS dxfxcxdxbxegedabagacad
function serve
if test (count $argv) -ge 1
if python -c 'import sys; sys.exit(sys.version_info[0] != 3)'
/bin/sh -c "(cd $argv[1] && python -m http.server)"
else
/bin/sh -c "(cd $argv[1] && python -m SimpleHTTPServer)"... | set LS_COLORS dxfxcxdxbxegedabagacad
function serve
if test (count $argv) -ge 1
if python -c 'import sys; sys.exit(sys.version_info[0] != 3)'
/bin/sh -c "(cd $argv[1] && python -m http.server)"
else
/bin/sh -c "(cd $argv[1] && python -m SimpleHTTPServer)"... | Add alias for pkill when Emacs hangs | Add alias for pkill when Emacs hangs
| fish | bsd-3-clause | jonathanchu/dotfiles,jonathanchu/dotfiles,jonathanchu/dotfiles |
e0ebcd2f2421903dc7aca502aa4786bbf2889d21 | fish/functions/switchaudio.fish | fish/functions/switchaudio.fish | function switchaudio --description 'Switch between audio outputs (assuming there are only 2)'
set -l sinks (pactl list short sinks)
for sink in $sinks
set sink_info (string split \t $sink)
set sink_id $sink_info[1]
set sink_state $sink_info[5]
switch $sink_state
case RUNN... | function switchaudio --description 'Switch between audio outputs (assuming there are only 2)'
set sinks (pactl list short sinks)
for sink in $sinks
set sink_info (string split \t $sink)
set sink_id $sink_info[1]
set sink_state $sink_info[5]
switch $sink_state
case RUNNING... | Remove unnecessary '--local' option from 'set' call | Remove unnecessary '--local' option from 'set' call
| fish | mit | ammgws/dotfiles,ammgws/dotfiles,ammgws/dotfiles |
aa85e128636e57996b941a63f2064910c3756a02 | fish/config.fish | fish/config.fish | set -x SHELL /usr/local/bin/fish
set -x EDITOR vim
set -x PATH $PATH /usr/local/sbin
# Golang
set -x GOPATH $HOME/go
set -x PATH $GOPATH/bin:$PATH
set gorootbin "/usr/local/go/bin"
if not contains $gorootbin $PATH
set -x PATH $PATH $gorootbin
end
# Rust
set -x PATH $HOME/.cargo/bin:$PATH
if type -q rustc
s... | set -x SHELL /usr/local/bin/fish
set -x EDITOR vim
set -x PATH $PATH /usr/local/sbin
# Golang
set -x GOPATH $HOME/go
set -x PATH $GOPATH/bin:$PATH
set gorootbin "/usr/local/go/bin"
if not contains $gorootbin $PATH
set -x PATH $PATH $gorootbin
end
# Rust
set -x PATH $HOME/.cargo/bin:$PATH
if type -q rustc
s... | Add pack completion to fish | Add pack completion to fish
| fish | mit | robdimsdale/dotfiles |
3035ad521d1c4bac447e466f59c546d6143f5b11 | functions/security-group-exists.fish | functions/security-group-exists.fish | function security-group-exists --argument group vpc
trace (status --current-filename) $argv
if empty $group
usage security-group-exists '<group>' '[vpc]'
return 23
end
if empty $vpc
security-group-exists $group (default-vpc)
end
if string match --quiet 'vpc-*' $vpc
... | Add function to check if a security group exists | Add function to check if a security group exists
| fish | mit | colstrom/piranha,colstrom/shellops-aws | |
e4baaacdd014a281330f866da2fdaa6d94fee401 | functions/fish_title.fish | functions/fish_title.fish | function _ssh_find_config_value
ssh -G $argv[2..-1] | grep -ie "^$argv[1] " | sed "s/^$argv[1] \(.*\)/\1/I"
end
function _tokenize_command
commandline -r $argv[1]
commandline -o
commandline -r ""
end
function fish_title
set -l title ""
switch $_
case fish
set title (prompt_pwd)
case vim
... | function _ssh_find_config_value
ssh -G $argv[2..-1] | grep -ie "^$argv[1] " | sed "s/^$argv[1] \(.*\)/\1/I"
end
function _tokenize_command
commandline -r $argv[1]
commandline -o
commandline -r ""
end
function fish_title
set -l title ""
switch $_
case fish
set title (prompt_pwd)
case vim
... | Add host and user to title if ssh connection is detected | Add host and user to title if ssh connection is detected
| fish | mit | wilfriedvanasten/miscvar,wilfriedvanasten/miscvar,wilfriedvanasten/miscvar |
dead2eb24d2335e69ea2bb5aa498675bf6658ec7 | _done.fish | _done.fish | function _done --on-event fish_prompt
if test $CMD_DURATION
# Store duration of last command
set duration (echo "$CMD_DURATION 1000" | awk '{printf "%.3fs", $1 / $2}')
# when a command takes longer than notify_duration
set notify_duration 10000
set exclude_cmd "zsh|bash|less|man|more|ssh|drush php|git add|... | set _bundleID ''
function _get_bundle_id
lsappinfo info -only bundleID (lsappinfo front) | cut -d '"' -f4
end
function _is_terminal_focused
test $_bundleID = _get_bundle_id
end
function _is_command_available
type -q $argv
end
function _started --on-event fish_preexec
if _is_command_available lsappinfo
set _b... | Add support for icons and all terminals on macOS | Add support for icons and all terminals on macOS
For icon support you need to install terminal-notifier
with `brew install terminal-notifier`.
| fish | mit | fisherman/done |
8c29807c1cb7c8cd0d731d275ad4e575a67fe719 | fish_prompt.fish | fish_prompt.fish | function _git_branch_name
echo (git symbolic-ref HEAD ^/dev/null | sed -e 's|^refs/heads/||')
end
function _is_git_dirty
echo (git status -s --ignore-submodules=dirty ^/dev/null)
end
function fish_prompt
set -l cyan (set_color -o cyan)
set -l yellow (set_color -o yellow)
set -l red (set_color -o red)
set ... | function _git_branch_name
echo (git symbolic-ref HEAD ^/dev/null | sed -e 's|^refs/heads/||')
end
function _is_git_dirty
echo (git status -s --ignore-submodules=dirty ^/dev/null)
end
function fish_prompt
set -l cyan (set_color -o cyan)
set -l yellow (set_color -o yellow)
set -l red (set_color -o red)
set ... | Fix prompt so it shows the red pipe even when in the home directory | Fix prompt so it shows the red pipe even when in the home directory | fish | mit | krisleech/theme-krisleech,oh-my-fish/theme-krisleech |
5b8a8c4ec2e6952b2c69057e45a7293d3c165526 | .config/fish/functions/🔻_upstall.fish | .config/fish/functions/🔻_upstall.fish | # Updates and installs system and shell dependencies (utilities, libraries, plugins, apps).
# Sometimes these are custom forks or configuration to tweak any of these.
function 🔻_upstall
createdirs ~/.config/upstall
set -l last_ran_file ~/.config/upstall/last_run.(machine_id)
set -l last_ran (cat $last_ran... | # Updates and installs system and shell dependencies (utilities, libraries, plugins, apps).
# Sometimes these are custom forks or configuration to tweak any of these.
function 🔻_upstall
createdirs ~/.config/upstall
set -l last_ran_file ~/.config/upstall/last_run.(machine_id)
set -l last_ran (cat $last_ran... | Add options: --no-fisherman (--nofm), --no-textmate (--notm) | [upstall] Add options: --no-fisherman (--nofm), --no-textmate (--notm)
| fish | mit | phatblat/dotfiles,phatblat/dotfiles,phatblat/dotfiles,phatblat/dotfiles,phatblat/dotfiles,phatblat/dotfiles |
6b24d5df202766a8e12e12f8f4f4c4913a9cf791 | .config/fish/functions/git-new-branch.fish | .config/fish/functions/git-new-branch.fish | function git-new-branch --description "Create a new branch and opens a Pull Request for it"
git checkout -b $argv[1]
git commit --allow-empty -m 'Empty commit to open PR'
git push origin HEAD
git pull-request # Opens your default text editor. Uses hub.
end
| Add function for quickly creating a PR with your new branch | Add function for quickly creating a PR with your new branch
| fish | mit | dideler/dotfiles,dideler/dotfiles | |
ed0d42bf394a8992d498fc501864785584456edc | fish_prompt.fish | fish_prompt.fish | # name: FishFace
function _git_branch_name
echo (command git symbolic-ref HEAD ^/dev/null | sed -e 's|^refs/heads/||')
end
function _is_git_dirty
echo (command git status -s --ignore-submodules=dirty ^/dev/null)
end
function fish_prompt
set -l blue (set_color -o blue)
set -l green (set_color -o green)
if ... | # name: FishFace
function _git_branch_name
echo (command git symbolic-ref HEAD 2> /dev/null | sed -e 's|^refs/heads/||')
end
function _is_git_dirty
echo (command git status -s --ignore-submodules=dirty 2> /dev/null)
end
function fish_prompt
set -l blue (set_color -o blue)
set -l green (set_color -o green)
... | Make stderr redirection compatible with Fish 3.0. | Make stderr redirection compatible with Fish 3.0.
| fish | mit | oh-my-fish/theme-fishface |
1678bc9c0e453a1293f683c6b93730a7548b22a2 | config.fish | config.fish | set -xg TERM "xterm-256color"
set -xg DOTFILES "$HOME/.dotfiles"
source "$DOTFILES/__abbreviations.fish"
source "$DOTFILES/__aliases.fish"
source "$DOTFILES/__env.fish"
source "$DOTFILES/__path.fish"
for completion_dir in $DOTFILES/fish/*/completions
set fish_complete_path $completion_dir $fish_complete_path
end
... | set -xg TERM "xterm-256color"
set -xg DOTFILES "$HOME/.dotfiles"
source "$DOTFILES/__abbreviations.fish"
source "$DOTFILES/__aliases.fish"
source "$DOTFILES/__env.fish"
source "$DOTFILES/__path.fish"
# Completions
set -xp fish_complete_path $DOTFILES/completions
for completion_dir in $DOTFILES/*/completions
set -... | Fix completions and functions paths | Fix completions and functions paths
But completions still don't seem to work...
| fish | mit | montchr/dotfiles,montchr/dotfiles,montchr/dotfiles,montchr/dotfiles |
9236fe849124e4f94cc9eaac377ccc29da32a948 | functions/users-not-in-group.fish | functions/users-not-in-group.fish | function users-not-in-group --argument group
if empty "$group"
usage users-not-in-group '<group>'
return (false)
end
comm -13 (users-in-group $group | psub) (get iam/users | psub)
end
| Add function to find users not in a group | Add function to find users not in a group
| fish | mit | colstrom/piranha,colstrom/shellops-aws | |
9a03443c617044a10ac23f7e8aa03a228b9b88df | fish/config.fish | fish/config.fish | set PATH /usr/local/sbin $PATH
# Perl
set -x PERL_MM_OPT "INSTALL_BASE=$HOME/perl5"
eval (perl -I$HOME/perl5/lib/perl5 -Mlocal::lib)
# Android tools
set PATH ~/Library/Android/sdk/platform-tools $PATH
# Add directory with "subl" command to lunch Sublime Text
set PATH /Applications/Sublime\ Text.app/Contents/SharedSu... | set PATH /usr/local/sbin $PATH
# Perl
set -x PERL_MM_OPT "INSTALL_BASE=$HOME/perl5"
eval (perl -I$HOME/perl5/lib/perl5 -Mlocal::lib)
# Android tools
set PATH ~/Library/Android/sdk/platform-tools $PATH
# Add directory with "subl" command to lunch Sublime Text
set PATH /Applications/Sublime\ Text.app/Contents/SharedSu... | Add function for serving a directory through HTTP | Add function for serving a directory through HTTP
| fish | mit | gentlecat/dotfiles,gentlecat/dotfiles,gentlecat/dotfiles |
8e3d0ca42263a1878c79c33e181b583ce6adb805 | fish/functions/fish_prompt.fish | fish/functions/fish_prompt.fish | function fish_prompt --description 'Write out the prompt'
set -l last_status $status
# Just calculate these once, to save a few cycles when displaying the prompt
if not set -q __fish_prompt_hostname
set -g __fish_prompt_hostname (hostname|cut -d . -f 1)
end
if not set -q __fish_prompt... | function fish_prompt --description 'Write out the prompt'
# Just calculate these once, to save a few cycles when displaying the prompt
if not set -q __fish_prompt_hostname
set -g __fish_prompt_hostname (hostname|cut -d . -f 1)
end
if not set -q __fish_prompt_normal
set -g __fish_pr... | Remove unused settings and variables | Remove unused settings and variables
| fish | apache-2.0 | ithinkihaveacat/dotfiles,ithinkihaveacat/dotfiles,ithinkihaveacat/dotfiles |
e706cc58b8713c470cabe0f3be177bf4550294ab | fish/.config/fish/functions/,.fish | fish/.config/fish/functions/,.fish | function , --description 'Commajump'
set found_paths (grep $argv ~/.commajump | grep -v (pwd)\$)
set found_folders (printf '%s\n' $found_paths | xargs basename | grep -in $argv)
if test (count $found_folders) -ne 0
set found_paths $found_paths[(printf '%s\n' $found_folders | cut -d':' -f1 | paste -d' ' -s -)]
en... | function , --description 'Commajump'
set found_paths (grep $argv ~/.commajump | grep -v (pwd)\$)
set found_folders (printf '%s\n' $found_paths | xargs basename | grep -in $argv)
if test (count $found_folders) -ne 0
set found_paths $found_paths[(printf '%s\n' $found_folders | cut -d':' -f1 | paste -d' ' -s -)]
en... | Fix splitting paths that include spaces | [fish/commajump] Fix splitting paths that include spaces
- Didn't know cut could do that!
| fish | mit | spinningarrow/.files,spinningarrow/.files |
e4c0cf85840f831fad21a7e9cdfdb740730b3ee5 | tmpdir.fish | tmpdir.fish | function tmpdir --description "cd into a fresh, one-time temporary directory"
if not set --global --query TMPDIR_TAB
mkdir -p /tmp/tmpdir
set --global --export TMPDIR_TAB (mktemp -d /tmp/tmpdir/XXXXXX)
end
cd $TMPDIR_TAB
end
function _tmpdir_on_exit --on-process-exit %self
if set --global --query TMPD... | function tmpdir --description "cd into a fresh, one-time temporary directory"
if set --global --query TMPDIR_TAB
cd $TMPDIR_TAB
rm -- {.*,*}
else
mkdir -p /tmp/tmpdir
set --global TMPDIR_TAB (mktemp -d /tmp/tmpdir/XXXXXX)
cd $TMPDIR_TAB
end
end
function _tmpdir_on_exit --on-process-exit %sel... | Fix subshells / same shell behavior | Fix subshells / same shell behavior
| fish | mit | eush77/fish-tmpdir |
ae494050510646f3ffcbf619f30d2a9eed8e9cf2 | completions/gabbr.fish | completions/gabbr.fish | complete -c gabbr -d 'Global abbreviation for fish'
complete -c gabbr -s a -l add -d 'Add abbreviation'
complete -c gabbr -s e -l erase -d 'Erase abbreviation'
complete -c gabbr -s l -l list -d 'Print all abbreviation names'
complete -c gabbr -s s -l show -d 'Print all abbreviations'
complete -c gabbr -s h -l help -d '... | complete -c gabbr -d 'Global abbreviation for fish'
complete -c gabbr -s a -l add -d 'Add abbreviation'
complete -c gabbr -s e -l erase -d 'Erase abbreviation'
complete -c gabbr -s f -l function -d 'Add function-abbreviation'
complete -c gabbr -s l -l list -d 'Print all abbreviation names'
complete -c gabbr -s s -l sho... | Add completion for --function option | Add completion for --function option
| fish | mit | ryotako/fish-global-abbreviation |
43e5b50167fe0ef5d52b0ea3abbc3b597b02712d | share/fry/functions/fry-find.fish | share/fry/functions/fry-find.fish | function fry-find --description 'Find ruby by name'
set -l name $argv[1]
set -l rubyless_name (echo $name | sed 's/^ruby-//')
for i in (fry-ls | tail -r)
switch $i
case "$name*" "$rubyless_name*" "ruby-$name*"
echo $i
return
end
end
return 1
end
| function fry-find --description 'Find ruby by name'
set -l name $argv[1]
set -l rubyless_name (echo $name | sed 's/^ruby-//')
for i in (fry-ls | sed '1!G;h;$!d')
switch $i
case "$name*" "$rubyless_name*" "ruby-$name*"
echo $i
return
end
end
return 1
end
| Use sed instead of tail | Use sed instead of tail
tail -r was not a universal command
| fish | mit | terlar/fry |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.