From 9e1c281973d3d507b97847caba1bc4322b92de3e Mon Sep 17 00:00:00 2001 From: Justin Hileman Date: Sun, 31 May 2015 08:30:48 -0700 Subject: [PATCH 01/97] [split] Move android-sdk plugin to oh-my-fish/plugin-android-sdk https://github.com/oh-my-fish/plugin-android-sdk --- plugins/android-sdk/android-sdk.load | 7 ------- 1 file changed, 7 deletions(-) delete mode 100644 plugins/android-sdk/android-sdk.load diff --git a/plugins/android-sdk/android-sdk.load b/plugins/android-sdk/android-sdk.load deleted file mode 100644 index 633802e..0000000 --- a/plugins/android-sdk/android-sdk.load +++ /dev/null @@ -1,7 +0,0 @@ -if test -n "$ANDROID_SDK_ROOT" - _prepend_path $ANDROID_SDK_ROOT/tools - _prepend_path $ANDROID_SDK_ROOT/platform-tools -else - _prepend_path /opt/android-sdk/tools - _prepend_path /opt/android-sdk/platform-tools -end From a90b48144c1a8dbac72529795fb95cbb52da9dcc Mon Sep 17 00:00:00 2001 From: Justin Hileman Date: Sun, 31 May 2015 08:30:48 -0700 Subject: [PATCH 02/97] [split] Move archlinux plugin to oh-my-fish/plugin-archlinux https://github.com/oh-my-fish/plugin-archlinux --- plugins/archlinux/README.md | 22 --------- plugins/archlinux/archlinux.load | 6 --- plugins/archlinux/pacman/README.md | 52 -------------------- plugins/archlinux/pacman/pacdisowned.fish | 22 --------- plugins/archlinux/pacman/pacin.fish | 3 -- plugins/archlinux/pacman/pacins.fish | 3 -- plugins/archlinux/pacman/paclist.fish | 3 -- plugins/archlinux/pacman/pacloc.fish | 3 -- plugins/archlinux/pacman/paclocs.fish | 3 -- plugins/archlinux/pacman/paclsorphans.fish | 3 -- plugins/archlinux/pacman/pacmanallkeys.fish | 3 -- plugins/archlinux/pacman/pacmansignkeys.fish | 8 --- plugins/archlinux/pacman/pacmir.fish | 3 -- plugins/archlinux/pacman/pacre.fish | 3 -- plugins/archlinux/pacman/pacrem.fish | 3 -- plugins/archlinux/pacman/pacrep.fish | 3 -- plugins/archlinux/pacman/pacreps.fish | 3 -- plugins/archlinux/pacman/pacrmorphans.fish | 3 -- plugins/archlinux/pacman/pacupd.fish | 10 ---- plugins/archlinux/pacman/pacupg.fish | 3 -- 20 files changed, 162 deletions(-) delete mode 100644 plugins/archlinux/README.md delete mode 100644 plugins/archlinux/archlinux.load delete mode 100644 plugins/archlinux/pacman/README.md delete mode 100644 plugins/archlinux/pacman/pacdisowned.fish delete mode 100644 plugins/archlinux/pacman/pacin.fish delete mode 100644 plugins/archlinux/pacman/pacins.fish delete mode 100644 plugins/archlinux/pacman/paclist.fish delete mode 100644 plugins/archlinux/pacman/pacloc.fish delete mode 100644 plugins/archlinux/pacman/paclocs.fish delete mode 100644 plugins/archlinux/pacman/paclsorphans.fish delete mode 100644 plugins/archlinux/pacman/pacmanallkeys.fish delete mode 100644 plugins/archlinux/pacman/pacmansignkeys.fish delete mode 100644 plugins/archlinux/pacman/pacmir.fish delete mode 100644 plugins/archlinux/pacman/pacre.fish delete mode 100644 plugins/archlinux/pacman/pacrem.fish delete mode 100644 plugins/archlinux/pacman/pacrep.fish delete mode 100644 plugins/archlinux/pacman/pacreps.fish delete mode 100644 plugins/archlinux/pacman/pacrmorphans.fish delete mode 100644 plugins/archlinux/pacman/pacupd.fish delete mode 100644 plugins/archlinux/pacman/pacupg.fish diff --git a/plugins/archlinux/README.md b/plugins/archlinux/README.md deleted file mode 100644 index 8c04db1..0000000 --- a/plugins/archlinux/README.md +++ /dev/null @@ -1,22 +0,0 @@ - -# The Arch Linux Plugins - -The Arch Linux Plugins provides a number of plugins to make using arch easier. - -# The Plugins - -## archlinux - -This plugin includes all of provided Arch Linux Plugins wrapped in a single plugin. - -To use this plugin append the following `archlinux` to `fish_plugins`. - -## archlinux/pacman - -This plugin makes working with pacman easier and faster. Please refer to pacman/README.md for more information. - -To use this plugin append the following `archlinux/pacman` to `fish_plugins`. - - - - diff --git a/plugins/archlinux/archlinux.load b/plugins/archlinux/archlinux.load deleted file mode 100644 index 54d711a..0000000 --- a/plugins/archlinux/archlinux.load +++ /dev/null @@ -1,6 +0,0 @@ - - -set -l current_dir (dirname $argv) - -# add pacman related functions -set fish_function_path $current_dir/pacman $fish_function_path diff --git a/plugins/archlinux/pacman/README.md b/plugins/archlinux/pacman/README.md deleted file mode 100644 index 054d699..0000000 --- a/plugins/archlinux/pacman/README.md +++ /dev/null @@ -1,52 +0,0 @@ - -# pacman functions # - -* pacin -Install specific package(s) from the repositories - -* pacins -Install specific package not from the repositories but from a file - -* pacre -Remove the specified package(s), retaining its configuration(s) and required dependencies - -* pacrem -Remove the specified package(s), its configuration(s) and unneeded dependencies - -* pacrep -Display information about a given package in the repositories - -* pacreps -Search for package(s) in the repositories - -* pacloc -Display information about a given package in the local database - -* paclocs -Search for package(s) in the local database - -* pacupd -Update and refresh the local package and ABS databases against repositories - -* pacinsd -Install given package(s) as dependencies of another package - -* pacmir -Force refresh of all package lists after updating /etc/pacman.d/mirrorlist - -* paclist -List all installed packages with a short description - Source - -* paclsorphans -List all orphaned packages - -* pacrmorphans -Delete all orphaned packages - -* pacdisowned | less +F -List all disowned files in your system - - -# Based on aliases from oh-my-zsh - -Source: https://github.com/robbyrussell/oh-my-zsh/blob/master/plugins/archlinux/archlinux.plugin.zsh diff --git a/plugins/archlinux/pacman/pacdisowned.fish b/plugins/archlinux/pacman/pacdisowned.fish deleted file mode 100644 index 2f0f012..0000000 --- a/plugins/archlinux/pacman/pacdisowned.fish +++ /dev/null @@ -1,22 +0,0 @@ -function pacdisowned -d "Display list of disowned files" - if test -d "$TMPDIR" - set tmp $TMPDIR - else - set tmp "/tmp" - end - set dir (mktemp -d -p $tmp) - - set -l fs "$dir/fs" - set -l db "$dir/db" - - pacman -Qlq | sort -u > "$db" - - find /bin /etc /lib /sbin /usr ! -name lost+found \ - \( -type d -printf '%p/\n' -o -print \) | sort > "$fs" - - comm -23 "$fs" "$db" - - # clean-up after ourself - rm -rf "$dir" -end - diff --git a/plugins/archlinux/pacman/pacin.fish b/plugins/archlinux/pacman/pacin.fish deleted file mode 100644 index 07b2783..0000000 --- a/plugins/archlinux/pacman/pacin.fish +++ /dev/null @@ -1,3 +0,0 @@ -function pacin -d "Install specific package(s) from the repositories" - sudo pacman -S $argv -end diff --git a/plugins/archlinux/pacman/pacins.fish b/plugins/archlinux/pacman/pacins.fish deleted file mode 100644 index 4456eaf..0000000 --- a/plugins/archlinux/pacman/pacins.fish +++ /dev/null @@ -1,3 +0,0 @@ -function pacins -d "Install specific package not from the repositories but from a file" - sudo pacman -U $argv -end diff --git a/plugins/archlinux/pacman/paclist.fish b/plugins/archlinux/pacman/paclist.fish deleted file mode 100644 index 2c777f4..0000000 --- a/plugins/archlinux/pacman/paclist.fish +++ /dev/null @@ -1,3 +0,0 @@ -function paclist - pacman -Qei (pacman -Qu|cut -d" " -f 1)|awk ' BEGIN {FS=":"}/^Name/{printf("\033[1;36m%s\033[1;37m", $2)}/^Description/{print $2}' -end diff --git a/plugins/archlinux/pacman/pacloc.fish b/plugins/archlinux/pacman/pacloc.fish deleted file mode 100644 index 61f3e01..0000000 --- a/plugins/archlinux/pacman/pacloc.fish +++ /dev/null @@ -1,3 +0,0 @@ -function pacloc -d "Display information about a given package in the local database" - pacman -Qi $argv -end diff --git a/plugins/archlinux/pacman/paclocs.fish b/plugins/archlinux/pacman/paclocs.fish deleted file mode 100644 index 5f6ae70..0000000 --- a/plugins/archlinux/pacman/paclocs.fish +++ /dev/null @@ -1,3 +0,0 @@ -function paclocs -d "Search for package(s) in the local database" - pacman -Qs $argv -end diff --git a/plugins/archlinux/pacman/paclsorphans.fish b/plugins/archlinux/pacman/paclsorphans.fish deleted file mode 100644 index 7d1b334..0000000 --- a/plugins/archlinux/pacman/paclsorphans.fish +++ /dev/null @@ -1,3 +0,0 @@ -function paclsorphans -d "Display a list of packages that were installed as dependencies but are no longer required by any installed package" - pacman -Qdt $argv -end diff --git a/plugins/archlinux/pacman/pacmanallkeys.fish b/plugins/archlinux/pacman/pacmanallkeys.fish deleted file mode 100644 index 8dcbba7..0000000 --- a/plugins/archlinux/pacman/pacmanallkeys.fish +++ /dev/null @@ -1,3 +0,0 @@ -function pacmanallkeys -d "Get all keys for developers and trusted users" - curl https://www.archlinux.org/developers/ https://www.archlinux.org/trustedusers/ | awk -F\" '(/pgp.mit.edu/) {sub(/.*search=0x/,"");print $1}' | xargs sudo pacman-key --recv-keys -end diff --git a/plugins/archlinux/pacman/pacmansignkeys.fish b/plugins/archlinux/pacman/pacmansignkeys.fish deleted file mode 100644 index 5ad10cb..0000000 --- a/plugins/archlinux/pacman/pacmansignkeys.fish +++ /dev/null @@ -1,8 +0,0 @@ -function pacmansignkeys -d "Allow user to sign keys" - for key in $argv; - sudo pacman-key --recv-keys $key - sudo pacman-key --lsign-key $key - printf 'trust\n3\n' | sudo gpg --homedir /etc/pacman.d/gnupg \ - --no-permission-warning --command-fd 0 --edit-key $key - end -end diff --git a/plugins/archlinux/pacman/pacmir.fish b/plugins/archlinux/pacman/pacmir.fish deleted file mode 100644 index 58f1982..0000000 --- a/plugins/archlinux/pacman/pacmir.fish +++ /dev/null @@ -1,3 +0,0 @@ -function pacmir -d "Force refresh of all package lists after updating /etc/pacman.d/mirrorlist" - sudo pacman -Syy $argv -end diff --git a/plugins/archlinux/pacman/pacre.fish b/plugins/archlinux/pacman/pacre.fish deleted file mode 100644 index 94b7b34..0000000 --- a/plugins/archlinux/pacman/pacre.fish +++ /dev/null @@ -1,3 +0,0 @@ -function pacre -d "Remove the specified package(s), retaining its configuration(s) and required dependencies" - sudo pacman -R $argv -end diff --git a/plugins/archlinux/pacman/pacrem.fish b/plugins/archlinux/pacman/pacrem.fish deleted file mode 100644 index 79fdc27..0000000 --- a/plugins/archlinux/pacman/pacrem.fish +++ /dev/null @@ -1,3 +0,0 @@ -function pacrem -d "Remove the specified package(s), its configuration(s) and unneeded dependencies" - sudo pacman -Rns $argv -end diff --git a/plugins/archlinux/pacman/pacrep.fish b/plugins/archlinux/pacman/pacrep.fish deleted file mode 100644 index 74dfbec..0000000 --- a/plugins/archlinux/pacman/pacrep.fish +++ /dev/null @@ -1,3 +0,0 @@ -function pacrep -d "Display information about a given package in the repositories" - pacman -Si $argv -end diff --git a/plugins/archlinux/pacman/pacreps.fish b/plugins/archlinux/pacman/pacreps.fish deleted file mode 100644 index 8b5e6f3..0000000 --- a/plugins/archlinux/pacman/pacreps.fish +++ /dev/null @@ -1,3 +0,0 @@ -function pacreps -d "Search for package(s) in the repositories" - pacman -Ss $argv -end diff --git a/plugins/archlinux/pacman/pacrmorphans.fish b/plugins/archlinux/pacman/pacrmorphans.fish deleted file mode 100644 index 740ac98..0000000 --- a/plugins/archlinux/pacman/pacrmorphans.fish +++ /dev/null @@ -1,3 +0,0 @@ -function pacrmorphans -d "Remove all real orphan packages" - sudo pacman -Rs (pacman -Qtdq) $argv -end diff --git a/plugins/archlinux/pacman/pacupd.fish b/plugins/archlinux/pacman/pacupd.fish deleted file mode 100644 index fdd9c64..0000000 --- a/plugins/archlinux/pacman/pacupd.fish +++ /dev/null @@ -1,10 +0,0 @@ -which abs ^ /dev/null > /dev/null -if test $status -ne 1 - function pacupd -d "Update and refresh the local package and ABS databases against repositories" - sudo pacman -Sy; and sudo abs - end -else - function pacupd -d "Update and refresh the local package against repositories" - sudo pacman -Sy - end -end diff --git a/plugins/archlinux/pacman/pacupg.fish b/plugins/archlinux/pacman/pacupg.fish deleted file mode 100644 index 0f0ee5b..0000000 --- a/plugins/archlinux/pacman/pacupg.fish +++ /dev/null @@ -1,3 +0,0 @@ -function pacupg -d "Synchronize with repositories before upgrading packages that are out of date on the local system." - sudo pacman -Syu $argv -end From b2549c2005b4d1534a0c4041cf16381b075c5c2b Mon Sep 17 00:00:00 2001 From: Justin Hileman Date: Sun, 31 May 2015 08:30:48 -0700 Subject: [PATCH 03/97] [split] Move bak plugin to oh-my-fish/plugin-bak https://github.com/oh-my-fish/plugin-bak --- plugins/bak/bak.load | 60 ---------------------------------------- plugins/bak/cpbak.fish | 6 ---- plugins/bak/mvbak.fish | 6 ---- plugins/bak/uncpbak.fish | 6 ---- plugins/bak/unmvbak.fish | 6 ---- 5 files changed, 84 deletions(-) delete mode 100644 plugins/bak/bak.load delete mode 100644 plugins/bak/cpbak.fish delete mode 100644 plugins/bak/mvbak.fish delete mode 100644 plugins/bak/uncpbak.fish delete mode 100644 plugins/bak/unmvbak.fish diff --git a/plugins/bak/bak.load b/plugins/bak/bak.load deleted file mode 100644 index a1e6a15..0000000 --- a/plugins/bak/bak.load +++ /dev/null @@ -1,60 +0,0 @@ -function __bak_help - echo -e \ -"Usage: - $argv[1] SOURCE..." -end - -function __bak_parse_help - if [ (count $argv) -lt 3 ] - __bak_help $argv[1] - else - return 1 - end -end - -function __bak_name - # trim / for directories - set file (echo $argv[1] | sed 's/\/*$//') - echo "$file."(date +'%Y%m%d_%H%M%S')".bak" -end - -function __bak - __bak_parse_help $argv - or begin - set program $argv[2] - for file in $argv[3..-1] - eval $program $file (__bak_name $file) - end - end -end - -set -g __bak_re '(.*)\.[0-9]{8,8}_[0-9]{6,6}\.bak\/*$' - -function __is_bak - set file $argv[1] - echo "$file" | grep -Eq $__bak_re -end - -function __bak_normalized - set file $argv[1] - echo "$file" | sed -E "s/$__bak_re/\1/g" -end - -function __unbak - __bak_parse_help $argv - or begin - set program $argv[2] - for file in $argv[3..-1] - set normalized (__bak_normalized $file) - if test ! -e $file - echo "File \"$file\" not exists! Cannot unbak \"$file\"." - else if not __is_bak $file - echo "File \"$file\" don't meet bak files convention! Cannot unbak \"$file\"." - else if test -e $normalized - echo "File \"$normalized\" exists! Cannot unbak \"$file\"." - else - eval $program $file $normalized - end - end - end -end diff --git a/plugins/bak/cpbak.fish b/plugins/bak/cpbak.fish deleted file mode 100644 index 1e6d4a4..0000000 --- a/plugins/bak/cpbak.fish +++ /dev/null @@ -1,6 +0,0 @@ -# Function to copy files and directories (a.txt copy to a.txt.20140608_195859.bak) -# (c) Roman Inflianskas (rominf) , 2014 - -function cpbak --description 'Copy files to make a backup copies' - __bak cpbak 'cp -a' $argv -end diff --git a/plugins/bak/mvbak.fish b/plugins/bak/mvbak.fish deleted file mode 100644 index 41eda59..0000000 --- a/plugins/bak/mvbak.fish +++ /dev/null @@ -1,6 +0,0 @@ -# Function to rename files and directories (a.txt rename to a.txt.20140608_195859.bak) -# (c) Roman Inflianskas (rominf) , 2014 - -function mvbak --description 'Rename files to make a backup copies' - __bak mvbak mv $argv -end diff --git a/plugins/bak/uncpbak.fish b/plugins/bak/uncpbak.fish deleted file mode 100644 index 984fad7..0000000 --- a/plugins/bak/uncpbak.fish +++ /dev/null @@ -1,6 +0,0 @@ -# Function to copy files and directories (a.txt.20140608_195859.bak copy to a.txt) -# (c) Roman Inflianskas (rominf) , 2014 - -function uncpbak --description 'Copy files to revert a backup copies to a normal files' - __unbak uncpbak 'cp -a' $argv -end diff --git a/plugins/bak/unmvbak.fish b/plugins/bak/unmvbak.fish deleted file mode 100644 index 813e92d..0000000 --- a/plugins/bak/unmvbak.fish +++ /dev/null @@ -1,6 +0,0 @@ -# Function to move files and directories (a.txt.20140608_195859.bak move to a.txt) -# (c) Roman Inflianskas (rominf) , 2014 - -function unmvbak --description 'Move files to revert a backup copies to a normal files' - __unbak unmvbak mv $argv -end From 1963af4cb028ea12cdbd2a595384dca650c54931 Mon Sep 17 00:00:00 2001 From: Justin Hileman Date: Sun, 31 May 2015 08:30:48 -0700 Subject: [PATCH 04/97] [split] Move balias plugin to oh-my-fish/plugin-balias https://github.com/oh-my-fish/plugin-balias --- plugins/balias/README.md | 16 --------------- plugins/balias/balias.fish | 10 --------- plugins/balias/balias.spec.fish | 36 --------------------------------- 3 files changed, 62 deletions(-) delete mode 100644 plugins/balias/README.md delete mode 100644 plugins/balias/balias.fish delete mode 100644 plugins/balias/balias.spec.fish diff --git a/plugins/balias/README.md b/plugins/balias/README.md deleted file mode 100644 index 348cf1e..0000000 --- a/plugins/balias/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# A better alias provide completion - -Use `balias` instead of `alias`,you can get same completion meanwhile you set alias. - -# Example - -``` -balias apti 'sudo apt-get install' -balias gc 'git checkout' -``` - -Then,you will get - -![apti](http://www.geekpics.net/images/2014/08/23/TJn6kfBY.png) - -![gc](http://www.geekpics.net/images/2014/08/23/655x76xcPJolvxqra.png.pagespeed.ic.4S9hgPfZ53.png) diff --git a/plugins/balias/balias.fish b/plugins/balias/balias.fish deleted file mode 100644 index a80c725..0000000 --- a/plugins/balias/balias.fish +++ /dev/null @@ -1,10 +0,0 @@ -function balias --argument alias command - eval 'alias $alias $command' - if expr $command : '^sudo '>/dev/null - set command (echo "$command" | cut -c6-) - end - complete -c $alias -xa "( - set -l cmd (commandline -pc | sed -e 's/^ *\S\+ *//' ); - complete -C\"$command \$cmd\"; - )" -end diff --git a/plugins/balias/balias.spec.fish b/plugins/balias/balias.spec.fish deleted file mode 100644 index e1cd347..0000000 --- a/plugins/balias/balias.spec.fish +++ /dev/null @@ -1,36 +0,0 @@ -import plugins/fish-spec -import plugins/balias - -function describe_library -d "balias: better-alias" - - function after_all - functions -e changedir - functions -e ls_as_root - end - - function it_doesnt_fail - balias changedir cd - expect $status --to-equal 0 - end - - function it_defines_an_alias - balias changedir cd - set -l ignore_output (functions changedir) - expect $status --to-equal 0 - end - - function you_can_use_the_alias - mkdir testdir - changedir testdir - expect test $status --to-be-true - cd .. - rmdir testdir - end - - function it_chops_off_sudo - balias ls_as_root 'sudo ls' - expect test $status --to-be-true - end -end - -spec.run $argv From dfff6fa67988a26e9e0697f283c153267e810c1c Mon Sep 17 00:00:00 2001 From: Justin Hileman Date: Sun, 31 May 2015 08:30:48 -0700 Subject: [PATCH 05/97] [split] Move brew plugin to oh-my-fish/plugin-brew https://github.com/oh-my-fish/plugin-brew --- plugins/brew/brew.load | 24 ------------------------ 1 file changed, 24 deletions(-) delete mode 100644 plugins/brew/brew.load diff --git a/plugins/brew/brew.load b/plugins/brew/brew.load deleted file mode 100644 index c69f1c1..0000000 --- a/plugins/brew/brew.load +++ /dev/null @@ -1,24 +0,0 @@ -set -l brew_paths /usr/local/bin /usr/bin /bin /usr/local/sbin /usr/sbin /sbin - -# Append all existing brew paths to PATH -set -l existing_brew_paths -for brew_path in $brew_paths - if test -d $brew_path - set PATH $PATH $brew_path - set existing_brew_paths $existing_brew_paths $brew_path - end -end - -# Remove brew paths from tail to head that were not recently added -set -l number_of_paths_to_ignore (math (count $PATH) - (count $existing_brew_paths)) -for i in (seq (count $PATH))[-1..1] - if test $i -le $number_of_paths_to_ignore - if contains $PATH[$i] $brew_paths - set -e PATH[$i] - end - end -end - -set -e brew_paths -set -e existing_brew_paths -set -e existing_brew_paths_count From 26332748f7c3630b8cde6a7e33123c647f970ea1 Mon Sep 17 00:00:00 2001 From: Justin Hileman Date: Sun, 31 May 2015 08:30:48 -0700 Subject: [PATCH 06/97] [split] Move bundler plugin to oh-my-fish/plugin-bundler https://github.com/oh-my-fish/plugin-bundler --- plugins/bundler/bundler.load | 63 ------------------------------------ 1 file changed, 63 deletions(-) delete mode 100644 plugins/bundler/bundler.load diff --git a/plugins/bundler/bundler.load b/plugins/bundler/bundler.load deleted file mode 100644 index 52d19ce..0000000 --- a/plugins/bundler/bundler.load +++ /dev/null @@ -1,63 +0,0 @@ -# These methods override the default calls to append `bundle exec` if this gem -# is available within the context of bundler. -# -# You can add more bundled executables in your config.fish: -# -# set bundler_plugin_execs jekyll mustache -# -set -l execs annotate \ - cap \ - capify \ - cucumber \ - dashing \ - foreman \ - guard \ - kitchen \ - middleman \ - nanoc \ - puma \ - rackup \ - rainbows \ - rake \ - rspec \ - rubocop \ - ruby \ - shotgun \ - sidekiq \ - spec \ - spinach \ - spork \ - thin \ - thor \ - unicorn \ - unicorn_rails - -if set -q bundler_plugin_execs - set execs $execs $bundler_plugin_execs -end - -# Fish 2.1.1+ has support for --inherit-variable -set -l do_eval (echo $FISH_VERSION | grep 2.1.1-) - -for executable in $execs - if test -z "$do_eval" - eval "function $executable; __execute_as_bundler $executable \$argv; end" - else - function $executable --inherit-variable executable - __execute_as_bundler $executable $argv - end - end -end - -function __execute_as_bundler - if __is_a_bundled_executable $argv[1] - command bundle exec $argv - else - eval command $argv - end -end - -function __is_a_bundled_executable - set -l bindir (command bundle exec ruby -e 'puts Gem.bindir') - test -f "$bindir/$argv" -end From bbbc08b95310c2499349fa52206bfcad43c7cfe3 Mon Sep 17 00:00:00 2001 From: Justin Hileman Date: Sun, 31 May 2015 08:30:48 -0700 Subject: [PATCH 07/97] [split] Move cask plugin to oh-my-fish/plugin-cask https://github.com/oh-my-fish/plugin-cask --- plugins/cask/cask.load | 1 - 1 file changed, 1 deletion(-) delete mode 100644 plugins/cask/cask.load diff --git a/plugins/cask/cask.load b/plugins/cask/cask.load deleted file mode 100644 index 3701854..0000000 --- a/plugins/cask/cask.load +++ /dev/null @@ -1 +0,0 @@ -_prepend_path $HOME/.cask/bin \ No newline at end of file From 652612208ab64577727f92dd765cd6773abe5b54 Mon Sep 17 00:00:00 2001 From: Justin Hileman Date: Sun, 31 May 2015 08:30:48 -0700 Subject: [PATCH 08/97] [split] Move ccache plugin to oh-my-fish/plugin-ccache https://github.com/oh-my-fish/plugin-ccache --- plugins/ccache/ccache.load | 9 --------- 1 file changed, 9 deletions(-) delete mode 100644 plugins/ccache/ccache.load diff --git a/plugins/ccache/ccache.load b/plugins/ccache/ccache.load deleted file mode 100644 index 38184d0..0000000 --- a/plugins/ccache/ccache.load +++ /dev/null @@ -1,9 +0,0 @@ -# Use ccache for building Android -# See: https://source.android.com/source/initializing.html#setting-up-ccache -set -gx USE_CCACHE 1 - -if test -n "$CCACHE_ROOT" - _prepend_path $CCACHE_ROOT -else - _prepend_path /usr/lib/ccache/bin -end From c3e8ee6e3278640fa21d223fd539719395856a2b Mon Sep 17 00:00:00 2001 From: Justin Hileman Date: Sun, 31 May 2015 08:30:48 -0700 Subject: [PATCH 09/97] [split] Move chruby plugin to oh-my-fish/plugin-chruby https://github.com/oh-my-fish/plugin-chruby --- plugins/chruby/README.md | 9 --------- plugins/chruby/chruby.load | 23 ----------------------- 2 files changed, 32 deletions(-) delete mode 100644 plugins/chruby/README.md delete mode 100644 plugins/chruby/chruby.load diff --git a/plugins/chruby/README.md b/plugins/chruby/README.md deleted file mode 100644 index cb4423e..0000000 --- a/plugins/chruby/README.md +++ /dev/null @@ -1,9 +0,0 @@ -## chruby plugin - -Depends on `chruby-fish`: https://github.com/JeanMertz/chruby-fish - -set `CHRUBY_AUTO_ENABLED` to `false` to disable auto loading Ruby versions on -directory change. - -set `CHRUBY_ROOT` to point to the root path of chruby. The path will be -appended by `share/chruby/chruby.fish` and `share/chruby/auto.fish`. diff --git a/plugins/chruby/chruby.load b/plugins/chruby/chruby.load deleted file mode 100644 index eaf397d..0000000 --- a/plugins/chruby/chruby.load +++ /dev/null @@ -1,23 +0,0 @@ -# -# Depends on `chruby-fish` (https://github.com/JeanMertz/chruby-fish) -# -# set `CHRUBY_AUTO_ENABLED` to `false` to disable auto loading Ruby versions on -# directory change. -# -# set `CHRUBY_ROOT` to point to the root path of chruby. The path will be -# appended by `share/chruby/chruby.fish` and `share/chruby/auto.fish`. -# -set -q CHRUBY_ROOT; or set CHRUBY_ROOT /usr/local - -if test -f "$CHRUBY_ROOT/share/chruby/chruby.fish" - . "$CHRUBY_ROOT/share/chruby/chruby.fish" -else - echo '`chruby` plugin loaded but chruby-fish not installed.' \ - 'See: https://github.com/JeanMertz/chruby-fish' -end - -if test "$CHRUBY_AUTO_ENABLED" != "false" -a \ - -f "$CHRUBY_ROOT/share/chruby/auto.fish" - - . "$CHRUBY_ROOT/share/chruby/auto.fish" -end From 6683f68f086e835b5fefa23931ca05389c2ee506 Mon Sep 17 00:00:00 2001 From: Justin Hileman Date: Sun, 31 May 2015 08:30:48 -0700 Subject: [PATCH 10/97] [split] Move composer plugin to oh-my-fish/plugin-composer https://github.com/oh-my-fish/plugin-composer --- plugins/composer/composer.fish | 10 ---------- plugins/composer/composer.load | 16 ---------------- plugins/composer/composer_install.fish | 4 ---- 3 files changed, 30 deletions(-) delete mode 100644 plugins/composer/composer.fish delete mode 100644 plugins/composer/composer.load delete mode 100644 plugins/composer/composer_install.fish diff --git a/plugins/composer/composer.fish b/plugins/composer/composer.fish deleted file mode 100644 index 192984c..0000000 --- a/plugins/composer/composer.fish +++ /dev/null @@ -1,10 +0,0 @@ -# composer command -function composer - if test -e ./composer.phar # if there is composer in this path use local one - ./composer.phar $argv; - else if test -n "$COMPOSER_BIN" - eval "$COMPOSER_BIN" $argv; - else - echo "Please install composer.phar to your PATH. Or use \"composer_install\" to install Composer to current directory." - end -end diff --git a/plugins/composer/composer.load b/plugins/composer/composer.load deleted file mode 100644 index fd03cdb..0000000 --- a/plugins/composer/composer.load +++ /dev/null @@ -1,16 +0,0 @@ -# add Composer's global binaries to PATH -if test -z "$COMPOSER_BIN_PATH" - set -gx COMPOSER_BIN_PATH $HOME/.composer/vendor/bin -end -set PATH $COMPOSER_BIN_PATH $PATH - -# get composer path -if test -z "$COMPOSER_BIN" - if type "composer.phar" > /dev/null - set -gx COMPOSER_BIN (which composer.phar) - else if type "composer" > /dev/null - set -gx COMPOSER_BIN (which composer) - else - echo "FAILED to find Composer! Please install composer.phar to your PATH." - end -end diff --git a/plugins/composer/composer_install.fish b/plugins/composer/composer_install.fish deleted file mode 100644 index 5fe3499..0000000 --- a/plugins/composer/composer_install.fish +++ /dev/null @@ -1,4 +0,0 @@ -# install composer in the current directory -function composer_install - curl -s https://getcomposer.org/installer | php -end From d3b2629a889abf2c3595b48b44b12cb8ff03b410 Mon Sep 17 00:00:00 2001 From: Justin Hileman Date: Sun, 31 May 2015 08:30:48 -0700 Subject: [PATCH 11/97] [split] Move django plugin to oh-my-fish/plugin-django https://github.com/oh-my-fish/plugin-django --- plugins/django/djtest.fish | 12 ------------ 1 file changed, 12 deletions(-) delete mode 100644 plugins/django/djtest.fish diff --git a/plugins/django/djtest.fish b/plugins/django/djtest.fish deleted file mode 100644 index ad07f23..0000000 --- a/plugins/django/djtest.fish +++ /dev/null @@ -1,12 +0,0 @@ -# time, cleanup pyc and running test, settings as first argument -# e.g. djtest settings_dev -function djtest - set VERBOSE --verbosity=1 - find . -name "*.pyc" -delete - - if set -q argv - time python manage.py test $VERBOSE --settings=$argv - else - time python manage.py test $VERBOSE - end -end From a6da48b4146cb991c734f82fa9b8c26ec882f3d5 Mon Sep 17 00:00:00 2001 From: Justin Hileman Date: Sun, 31 May 2015 08:30:48 -0700 Subject: [PATCH 12/97] [split] Move dpaste plugin to oh-my-fish/plugin-dpaste https://github.com/oh-my-fish/plugin-dpaste --- plugins/dpaste/LICENSE | 23 ------ plugins/dpaste/dpaste.fish | 104 ------------------------ plugins/dpaste/tests/helper.fish | 7 -- plugins/dpaste/tests/test_dpaste.fish | 109 -------------------------- 4 files changed, 243 deletions(-) delete mode 100644 plugins/dpaste/LICENSE delete mode 100644 plugins/dpaste/dpaste.fish delete mode 100644 plugins/dpaste/tests/helper.fish delete mode 100755 plugins/dpaste/tests/test_dpaste.fish diff --git a/plugins/dpaste/LICENSE b/plugins/dpaste/LICENSE deleted file mode 100644 index 2bcfcd0..0000000 --- a/plugins/dpaste/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 Roman Inflianskas - -Copyright (c) 2014 Paul Joannon (sprunge.fish) - -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 rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/plugins/dpaste/dpaste.fish b/plugins/dpaste/dpaste.fish deleted file mode 100644 index 11fb562..0000000 --- a/plugins/dpaste/dpaste.fish +++ /dev/null @@ -1,104 +0,0 @@ -#!/usr/bin/env fish -# vim: ai ts=2 sw=2 et sts=2 - - -# Just a dpaste (https://github.com/bartTC/dpaste) wrapper for fish-shell -# Roman Inflianskas (rominf) -# Based on fish-sprunge plugin: -# Paul Joannon (paulloz) -# https://github.com/Paulloz/fish-sprunge -# Based on oh-my-zsh's sprunge plugin - - -set __dpaste_expires_choises '(onetime|1|twotimes|2|hour|week|month|never)' - -function __dpaste_set_defaults - set -g __dpaste_url_dpaste_de 'https://dpaste.de/api/?format=url' - set -g __dpaste_keyword_dpaste_de 'content' - set -g __dpaste_url_sprunge_us 'http://sprunge.us/' - set -g __dpaste_keyword_sprunge_us 'sprunge' - - set -q dpaste_site; or set -g dpaste_site 'dpaste.de' - set suffix (echo $dpaste_site | sed "s/\./_/g") - - set -g __dpaste_keyword (eval 'echo $__dpaste_keyword_'$suffix) - set -q __dpaste_keyword; or set -g __dpaste_keyword $__dpaste_keyword_dpaste_de - set -g __dpaste_send_url (eval 'echo $__dpaste_url_'$suffix) - set -q __dpaste_send_url; or set -g __dpaste_send_url $__dpaste_url_dpaste_de - set -g __dpaste_eat_once 0 -end - -function __dpaste_send - function curl - command curl --silent $argv - end - - curl -F "$__dpaste_keyword=<-" $__dpaste_send_url | read -l url - if [ $__dpaste_eat_once = 1 ] - curl $url >/dev/null - end - echo $url -end - -function __dpaste_parse_expires - set expires_spec "-t $__dpaste_expires_choises" - set expires (echo $argv | sed -E "s/.*$expires_spec.*/\1/") - if [ -z (echo $expires | sed -E "s/$__dpaste_expires_choises//") ] - echo $expires | grep -qE '(onetime|1)'; set -g __dpaste_eat_once (and echo 1; or echo 0) - set expires (echo $expires | sed -E 's/(1|2|twotimes)/onetime/;s/hour/3600/;s/week/604800/;s/month/2592000/') - set __dpaste_send_url "$__dpaste_send_url&expires=$expires" - end - echo $argv | sed -E "s/$expires_spec//" | xargs -end - -function __dpaste_help - echo -e \ -"Usage: - dpaste [-t EXPIRES] < README.md - dpaste [-t EXPIRES] README.md - cat README.md | dpaste [-t EXPIRES] - dpaste [-t EXPIRES] \"I \<3 to paste\" - -Options: - -t EXPIRES set snippet expiration time: $__dpaste_expires_choises [default: month] - -Configuration: - You can use this plugin with other dpaste instances. - If you have a dpaste instance on 'example.com' just insert those lines - into your config.fish file: - set __dpaste_url_example_com 'https://example.com/api/?format=url' - set dpaste_site 'example.com' - - You can even use this plugin with sprunge.us. - Note, that sprunge.us doesn't support '-t' option. - set dpaste_site 'sprunge.us'" -end - -function __dpaste_parse_help - begin - contains -- -h $argv - or contains -- --help $argv - end - and __dpaste_help -end - -function dpaste - __dpaste_set_defaults - __dpaste_parse_help $argv - or begin - set argv (__dpaste_parse_expires $argv) - if isatty - if [ -n $argv ] - if [ -f $argv ] - cat $argv - else - echo $argv - end | __dpaste_send - else - __dpaste_help - end - else - __dpaste_send - end - end -end diff --git a/plugins/dpaste/tests/helper.fish b/plugins/dpaste/tests/helper.fish deleted file mode 100644 index 0ac6202..0000000 --- a/plugins/dpaste/tests/helper.fish +++ /dev/null @@ -1,7 +0,0 @@ -set -l fish_tank /usr/local/share/fish-tank/tank.fish -if not test -e $fish_tank - echo 'error: fish-tank is required to run these tests (https://github.com/terlar/fish-tank)' - exit 1 -end - -source $fish_tank diff --git a/plugins/dpaste/tests/test_dpaste.fish b/plugins/dpaste/tests/test_dpaste.fish deleted file mode 100755 index 43c2fad..0000000 --- a/plugins/dpaste/tests/test_dpaste.fish +++ /dev/null @@ -1,109 +0,0 @@ -#!/usr/bin/env fish -# vim: ai ts=2 sw=2 et sts=2 - - -function echo_text - set -g __test_text 'Hello, tests! I am just testing suite for oh-my-fish plugin: https://github.com/bpinto/oh-my-fish/pull/170' - echo -e $__test_text -end - -function curl - command curl --silent $argv -end - -function curl_and_check - assert_equal $argv[2..-1] (curl $argv[1]) -end - -function curl_and_fail - assert_match '.*404 Not found.*' (curl $argv[1]) -end - -function test_dpaste_system - set url (eval $argv[1])/raw - curl_and_check $url (echo_text) - # now it shouldn't be available - curl_and_fail $url -end - -function dpaste_setup - set -g test_dir /tmp/dpaste_test - set -g test_file $test_dir/file - mkdir -p $test_dir - pushd - cd $test_dir - echo_text > $test_file -end - -function dpaste_teardown - rm -rf $test_dir - popd -end - -function suite_dpaste - - function setup - set dpaste_site 'dpaste.de' - __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 - end - - function test_dpaste_parse_expires_1 - assert_equal text (__dpaste_parse_expires -t 1 text) - assert_equal "https://dpaste.de/api/?format=url&expires=onetime" $__dpaste_send_url - end - - function test_dpaste_parse_expires_hour - assert_equal text (__dpaste_parse_expires -t hour text) - assert_equal "https://dpaste.de/api/?format=url&expires=3600" $__dpaste_send_url - end - - function test_dpaste_parse_expires_never - assert_equal text (__dpaste_parse_expires -t never text) - assert_equal "https://dpaste.de/api/?format=url&expires=never" $__dpaste_send_url - end - - function test_dpaste_system_file_redirect - function dpaste_file_redirect - dpaste -t onetime < /tmp/dpaste_test/file - end - test_dpaste_system dpaste_file_redirect - end - - function test_dpaste_system_file - function dpaste_file - dpaste -t onetime /tmp/dpaste_test/file - end - test_dpaste_system dpaste_file - end - - function test_dpaste_system_stdin - function dpaste_stdin - echo_text | dpaste -t onetime - end - test_dpaste_system dpaste_stdin - end - - function test_dpaste_system_text - function dpaste_text - dpaste -t onetime "$__test_text" - end - test_dpaste_system dpaste_text - end - -end - - -if not set -q tank_running - source (dirname (status -f))/helper.fish - set -g __dpaste_expires_choises - source (dirname (status -f))/../dpaste.fish - - dpaste_setup - tank_run - dpaste_teardown -end From 78d56bcfd197feefc8bb5473d9e3c54de30e7660 Mon Sep 17 00:00:00 2001 From: Justin Hileman Date: Sun, 31 May 2015 08:30:48 -0700 Subject: [PATCH 13/97] [split] Move ec2 plugin to oh-my-fish/plugin-ec2 https://github.com/oh-my-fish/plugin-ec2 --- plugins/ec2/ec2.load | 18 ------------------ 1 file changed, 18 deletions(-) delete mode 100644 plugins/ec2/ec2.load diff --git a/plugins/ec2/ec2.load b/plugins/ec2/ec2.load deleted file mode 100644 index ea542d6..0000000 --- a/plugins/ec2/ec2.load +++ /dev/null @@ -1,18 +0,0 @@ -### Main program - -if test -d (/usr/libexec/java_home) - set -gx JAVA_HOME (/usr/libexec/java_home) -end - -if test (/bin/ls $HOME/.ec2/pk-*.pem | /usr/bin/head -1) - set -gx EC2_PRIVATE_KEY (/bin/ls $HOME/.ec2/pk-*.pem | /usr/bin/head -1) -end - -if test (/bin/ls $HOME/.ec2/cert-*.pem | /usr/bin/head -1) - set -gx EC2_CERT (/bin/ls $HOME/.ec2/cert-*.pem | /usr/bin/head -1) -end - -if test -d /usr/local/Library/LinkedKegs/ec2-api-tools/jars - set -gx EC2_HOME /usr/local/Library/LinkedKegs/ec2-api-tools/jars -end - From 31fb8d02dcfd346723d76bec0c40787e7e45a9a4 Mon Sep 17 00:00:00 2001 From: Justin Hileman Date: Sun, 31 May 2015 08:30:48 -0700 Subject: [PATCH 14/97] [split] Move emacs plugin to oh-my-fish/plugin-emacs https://github.com/oh-my-fish/plugin-emacs --- plugins/emacs/README.md | 30 ----- plugins/emacs/emacs.load | 39 ------- plugins/emacs/functions/__kill_emacs.fish | 3 - plugins/emacs/functions/__launch_emacs.fish | 9 -- plugins/emacs/functions/e.fish | 3 - plugins/emacs/functions/ec.fish | 3 - plugins/emacs/functions/ecd.fish | 11 -- plugins/emacs/functions/eeval.fish | 3 - plugins/emacs/functions/efile.fish | 5 - plugins/emacs/functions/eframe.fish | 3 - plugins/emacs/functions/ek.fish | 3 - plugins/emacs/functions/emacs.fish | 3 - plugins/emacs/functions/emasc.fish | 3 - plugins/emacs/functions/emcas.fish | 3 - plugins/emacs/functions/et.fish | 3 - plugins/emacs/spec/emacs.spec.fish | 118 -------------------- 16 files changed, 242 deletions(-) delete mode 100644 plugins/emacs/README.md delete mode 100644 plugins/emacs/emacs.load delete mode 100644 plugins/emacs/functions/__kill_emacs.fish delete mode 100644 plugins/emacs/functions/__launch_emacs.fish delete mode 100644 plugins/emacs/functions/e.fish delete mode 100644 plugins/emacs/functions/ec.fish delete mode 100644 plugins/emacs/functions/ecd.fish delete mode 100644 plugins/emacs/functions/eeval.fish delete mode 100644 plugins/emacs/functions/efile.fish delete mode 100644 plugins/emacs/functions/eframe.fish delete mode 100644 plugins/emacs/functions/ek.fish delete mode 100644 plugins/emacs/functions/emacs.fish delete mode 100644 plugins/emacs/functions/emasc.fish delete mode 100644 plugins/emacs/functions/emcas.fish delete mode 100644 plugins/emacs/functions/et.fish delete mode 100644 plugins/emacs/spec/emacs.spec.fish diff --git a/plugins/emacs/README.md b/plugins/emacs/README.md deleted file mode 100644 index 302f400..0000000 --- a/plugins/emacs/README.md +++ /dev/null @@ -1,30 +0,0 @@ -# Emacs Plugin - -This plugin replicates the functionality of the [emacs](https://www.gnu.org/software/emacs/) plugin for [oh-my-zsh](http://ohmyz.sh/). -It is essentially a wrapper around the very useful [emacs daemon](http://www.emacswiki.org/emacs/EmacsAsDaemon) capability. - -Below is an extract from the original plugin source file: - -"Emacs 23 daemon capability is a killing feature. -One emacs process handles all your frames whether -you use a frame opened in a terminal via a ssh connection or X frames -opened on the same host. -Benefits are multiple - - * You don't have the cost of starting Emacs all the time anymore - * Opening a file is as fast as Emacs does not have anything else to do. - * You can share opened buffered across opened frames. - * Configuration changes made at runtime are applied to all frames." - - -### Usage - -To use this plugin add `emacs` to `fish_plugins` in you fish config file: - -```bash -set fish_plugins emacs -``` - -### Requirements - -Emacs 23 or later is required for this plugin. \ No newline at end of file diff --git a/plugins/emacs/emacs.load b/plugins/emacs/emacs.load deleted file mode 100644 index 41417ff..0000000 --- a/plugins/emacs/emacs.load +++ /dev/null @@ -1,39 +0,0 @@ -function __major_version - if test -n "$argv" - set -l full_metadata (eval $argv --version) - set -l full_version (echo $full_metadata | grep -o "[0-9]\+.[0-9]\+.[0-9]\+.[0-9]\+") - set -l major_version (echo $full_version | sed "s/\..*//") - end - - echo $major_version -end - -function __set_editor - if not set -q EDITOR - set -gx EDITOR emacs - end -end - -function __add_functions_to_path - set emacs_functions $fish_path/plugins/emacs/functions - set fish_function_path $emacs_functions $fish_function_path -end - -if not set -q __emacs - set __emacs (which emacs) -end -if not set -q __emacs_version - set __emacs_version (__major_version $__emacs) -end - -if test "$__emacs_version" -gt 23 - __set_editor - __add_functions_to_path -end - -set -e emacs -set -e emacs_version -functions -e __major_version -functions -e __plugins_path -functions -e __set_editor -functions -e __add_functions_to_path diff --git a/plugins/emacs/functions/__kill_emacs.fish b/plugins/emacs/functions/__kill_emacs.fish deleted file mode 100644 index 4ee0364..0000000 --- a/plugins/emacs/functions/__kill_emacs.fish +++ /dev/null @@ -1,3 +0,0 @@ -function __kill_emacs - emacsclient --alternate-editor '' --eval '(kill-emacs)' 2>/dev/null -end diff --git a/plugins/emacs/functions/__launch_emacs.fish b/plugins/emacs/functions/__launch_emacs.fish deleted file mode 100644 index 1f23753..0000000 --- a/plugins/emacs/functions/__launch_emacs.fish +++ /dev/null @@ -1,9 +0,0 @@ -function __launch_emacs - set -l x (emacsclient --alternate-editor '' --eval '(x-display-list)' 2>/dev/null) - - if test -z "$x" -o "$x" = nil - emacsclient $argv --alternate-editor '' --create-frame - else - emacsclient $argv --alternate-editor '' - end -end diff --git a/plugins/emacs/functions/e.fish b/plugins/emacs/functions/e.fish deleted file mode 100644 index dacba24..0000000 --- a/plugins/emacs/functions/e.fish +++ /dev/null @@ -1,3 +0,0 @@ -function e - __launch_emacs $argv --no-wait -end diff --git a/plugins/emacs/functions/ec.fish b/plugins/emacs/functions/ec.fish deleted file mode 100644 index 1914e1b..0000000 --- a/plugins/emacs/functions/ec.fish +++ /dev/null @@ -1,3 +0,0 @@ -function ec - __launch_emacs $argv --create-frame --no-wait -end diff --git a/plugins/emacs/functions/ecd.fish b/plugins/emacs/functions/ecd.fish deleted file mode 100644 index b0b8978..0000000 --- a/plugins/emacs/functions/ecd.fish +++ /dev/null @@ -1,11 +0,0 @@ -function ecd - set -l cmd '(let ((buf-name (buffer-file-name (window-buffer)))) - (if buf-name (file-name-directory buf-name)))' - set -l dir (__launch_emacs --eval $cmd | tr -d '\"') - - if test -n "$dir" - echo $dir - else - echo 'cannot deduce current buffer filename.' >/dev/stderr - end -end diff --git a/plugins/emacs/functions/eeval.fish b/plugins/emacs/functions/eeval.fish deleted file mode 100644 index 1fd80b7..0000000 --- a/plugins/emacs/functions/eeval.fish +++ /dev/null @@ -1,3 +0,0 @@ -function eeval - __launch_emacs --eval $argv -end diff --git a/plugins/emacs/functions/efile.fish b/plugins/emacs/functions/efile.fish deleted file mode 100644 index 78ce2d0..0000000 --- a/plugins/emacs/functions/efile.fish +++ /dev/null @@ -1,5 +0,0 @@ -function efile - set -l cmd '(buffer-file-name (window-buffer))' - - __launch_emacs --eval $cmd | tr -d '\"' -end diff --git a/plugins/emacs/functions/eframe.fish b/plugins/emacs/functions/eframe.fish deleted file mode 100644 index d3ea82c..0000000 --- a/plugins/emacs/functions/eframe.fish +++ /dev/null @@ -1,3 +0,0 @@ -function eframe - __launch_emacs $argv --create-frame --no-wait -end diff --git a/plugins/emacs/functions/ek.fish b/plugins/emacs/functions/ek.fish deleted file mode 100644 index 03c9512..0000000 --- a/plugins/emacs/functions/ek.fish +++ /dev/null @@ -1,3 +0,0 @@ -function ek - __kill_emacs -end diff --git a/plugins/emacs/functions/emacs.fish b/plugins/emacs/functions/emacs.fish deleted file mode 100644 index 9419fe7..0000000 --- a/plugins/emacs/functions/emacs.fish +++ /dev/null @@ -1,3 +0,0 @@ -function emacs - __launch_emacs $argv --no-wait -end diff --git a/plugins/emacs/functions/emasc.fish b/plugins/emacs/functions/emasc.fish deleted file mode 100644 index c70d000..0000000 --- a/plugins/emacs/functions/emasc.fish +++ /dev/null @@ -1,3 +0,0 @@ -function emasc - __launch_emacs $argv --no-wait -end diff --git a/plugins/emacs/functions/emcas.fish b/plugins/emacs/functions/emcas.fish deleted file mode 100644 index 02b38bc..0000000 --- a/plugins/emacs/functions/emcas.fish +++ /dev/null @@ -1,3 +0,0 @@ -function emcas - __launch_emacs $argv --no-wait -end diff --git a/plugins/emacs/functions/et.fish b/plugins/emacs/functions/et.fish deleted file mode 100644 index 450a4f9..0000000 --- a/plugins/emacs/functions/et.fish +++ /dev/null @@ -1,3 +0,0 @@ -function et - __launch_emacs $argv --tty -end diff --git a/plugins/emacs/spec/emacs.spec.fish b/plugins/emacs/spec/emacs.spec.fish deleted file mode 100644 index dcea58b..0000000 --- a/plugins/emacs/spec/emacs.spec.fish +++ /dev/null @@ -1,118 +0,0 @@ -import plugins/fish-spec - - -function describe_emacs - - function before_all - set -g __emacs_current_editor $EDITOR - set -g __emacs_load_file $fish_path/plugins/emacs/emacs.load - set -g __emacs_functions e ec ek et ecd eeval efile eframe emacs emasc emcas - end - - function before_each - set -e EDITOR - set -g __emacs '/bin/emacs' - set -g __emacs_version 25 - end - - function it_sets_editor_on_load - load_emacs_plugin - - expect $EDITOR --to-equal "emacs" - end - - function it_does_not_set_editor_when_it_is_already_set - set EDITOR 'vim' - - load_emacs_plugin - - expect $EDITOR --to-equal "vim" - end - - function it_does_not_set_editor_when_emacs_is_not_found - emacs_is_not_found - - load_emacs_plugin - - expect "$EDITOR" --to-equal "" - end - - function it_does_not_set_editor_when_emacs_version_is_lower_than_23 - set __emacs_version 22 - - load_emacs_plugin - - expect "$EDITOR" --to-equal "" - end - - function it_adds_functions_to_fish_function_path - load_emacs_plugin - - expect (functions) --to-contain-all $__emacs_functions - end - - function it_has_a_test_helper_that_removes_emacs_functions - load_emacs_plugin - - expect (functions) --to-contain-all $__emacs_functions - - remove_emacs_functions - - expect (functions) --to-not-contain-all $__emacs_functions - end - - - function it_does_not_add_functions_when_emacs_is_not_found - remove_emacs_functions - emacs_is_not_found - - load_emacs_plugin - - expect (functions) --to-not-contain-all $__emacs_functions - end - - function it_does_not_add_functions_when_emacs_version_is_lower_than_23 - set __emacs_version 22 - - expect (functions) --to-not-contain-all $__emacs_functions - - load_emacs_plugin - - expect (functions) --to-not-contain-all $__emacs_functions - end - - - function emacs_is_not_found - set __emacs "" - set __emacs_version "" - end - - function load_emacs_plugin - source $__emacs_load_file - end - - function remove_emacs_functions - for path in $fish_function_path - set match (echo $path | grep emacs) - if test -z "$match" - set -g __new_fish_function_path $__new_fish_function_path $path - end - end - - set fish_function_path $__new_fish_function_path - set -e __new_fish_function_path - end - - function after_all - set EDITOR $__emacs_current_editor - - set -e __emacs - set -e __emacs_version - set -e __emacs_load_file - set -e __emacs_functions - set -e __emacs_current_editor - end -end - - -spec.run $argv From 5b701e494ca8f1eaa547d68af44a789a19a53cba Mon Sep 17 00:00:00 2001 From: Justin Hileman Date: Sun, 31 May 2015 08:30:48 -0700 Subject: [PATCH 15/97] [split] Move emoji-clock plugin to oh-my-fish/plugin-emoji-clock https://github.com/oh-my-fish/plugin-emoji-clock --- plugins/emoji-clock/emoji-clock.fish | 89 ---------------------------- 1 file changed, 89 deletions(-) delete mode 100644 plugins/emoji-clock/emoji-clock.fish diff --git a/plugins/emoji-clock/emoji-clock.fish b/plugins/emoji-clock/emoji-clock.fish deleted file mode 100644 index 05f7bc3..0000000 --- a/plugins/emoji-clock/emoji-clock.fish +++ /dev/null @@ -1,89 +0,0 @@ -# ------------------------------------------------------------------------------ -# FILE: emoji-clock.plugin.zsh -# DESCRIPTION: The current time with half hour accuracy as an emoji symbol. -# Inspired by Andre Torrez' "Put A Burger In Your Shell" -# http://notes.torrez.org/2013/04/put-a-burger-in-your-shell.html -# AUTHOR: Alexis Hildebrandt (afh[at]surryhill.net) ported to fish by Erik Kallen -# VERSION: 1.0.0 -# ----------------------------------------------------------------------------- - -function emoji-clock - set hour (date '+%I') - set minutes (date '+%M') - switch $hour - case 01 - if test $minutes -ge 30 - set clock "🕜" - else - set clock "🕐" - end - case 02 - if test $minutes -ge 30 - set clock "🕝" - else - set clock "🕑" - end - case 03 - if test $minutes -ge 30 - set clock "🕞" - else - set clock "🕒" - end - case 04 - if test $minutes -ge 30 - set clock "🕟" - else - set clock "🕓" - end - case 05 - if test $minutes -ge 30 - set clock "🕠" - else - set clock "🕔" - end - case 06 - if test $minutes -ge 30 - set clock "🕡" - else - set clock "🕕" - end - case 07 - if test $minutes -ge 30 - set clock "🕢" - else - set clock "🕖" - end - case 08 - if test $minutes -ge 30 - set clock "🕣" - else - set clock "🕗" - end - case 09 - if test $minutes -ge 30 - set clock "🕤" - else - set clock "🕘" - end - case 10 - if test $minutes -ge 30 - set clock "🕥" - else - set clock "🕙" - end - case 11 - if test $minutes -ge 30 - set clock "🕦" - else - set clock "🕚" - end - case 12 - if test $minutes -ge 30 - set clock "🕧" - else - set clock "🕛" - end - case '*' set clock "⌛" - end - echo $clock -end From 7b6ecab51b2afd7baf46b87ec2cafba3aa92e64b Mon Sep 17 00:00:00 2001 From: Justin Hileman Date: Sun, 31 May 2015 08:30:48 -0700 Subject: [PATCH 16/97] [split] Move export plugin to oh-my-fish/plugin-export https://github.com/oh-my-fish/plugin-export --- plugins/export/export.load | 5 ----- 1 file changed, 5 deletions(-) delete mode 100644 plugins/export/export.load diff --git a/plugins/export/export.load b/plugins/export/export.load deleted file mode 100644 index f8d110b..0000000 --- a/plugins/export/export.load +++ /dev/null @@ -1,5 +0,0 @@ -function export - set var1 (echo $argv | cut -f1 -d=) - set var2 (echo $argv | cut -f2 -d=) - set -x -g $var1 $var2 -end From b2643850691f9914a24e040384f678dc14ec2108 Mon Sep 17 00:00:00 2001 From: Justin Hileman Date: Sun, 31 May 2015 08:30:48 -0700 Subject: [PATCH 17/97] [split] Move extract plugin to oh-my-fish/plugin-extract https://github.com/oh-my-fish/plugin-extract --- plugins/extract/extract.fish | 25 ------------------------- 1 file changed, 25 deletions(-) delete mode 100644 plugins/extract/extract.fish diff --git a/plugins/extract/extract.fish b/plugins/extract/extract.fish deleted file mode 100644 index a775ab8..0000000 --- a/plugins/extract/extract.fish +++ /dev/null @@ -1,25 +0,0 @@ -# Taken from: https://github.com/dideler/dotfiles/blob/master/functions/extract.fish - -function extract --description "Expand or extract bundled & compressed files" - set --local ext (echo $argv[1] | awk -F. '{print $NF}') - switch $ext - case tar # non-compressed, just bundled - tar -xvf $argv[1] - case gz - if test (echo $argv[1] | awk -F. '{print $(NF-1)}') = tar # tar bundle compressed with gzip - tar -zxvf $argv[1] - else # single gzip - gunzip $argv[1] - end - case tgz # same as tar.gz - tar -zxvf $argv[1] - case bz2 # tar compressed with bzip2 - tar -jxvf $argv[1] - case rar - unrar x $argv[1] - case zip - unzip $argv[1] - case '*' - echo "unknown extension" - end -end From 96f0994900592af0352ef8db21ef81ba33d1ed6c Mon Sep 17 00:00:00 2001 From: Justin Hileman Date: Sun, 31 May 2015 08:30:48 -0700 Subject: [PATCH 18/97] [split] Move fry plugin to oh-my-fish/plugin-fry https://github.com/oh-my-fish/plugin-fry --- plugins/fry/fry.load | 4 ---- 1 file changed, 4 deletions(-) delete mode 100644 plugins/fry/fry.load diff --git a/plugins/fry/fry.load b/plugins/fry/fry.load deleted file mode 100644 index c1a6e00..0000000 --- a/plugins/fry/fry.load +++ /dev/null @@ -1,4 +0,0 @@ -### Main program -if test -d /usr/local/share/fry/fry.fish - . /usr/local/share/fry/fry.fish -end From 978d946c228b5a09757f1299866cf8dccc10c877 Mon Sep 17 00:00:00 2001 From: Justin Hileman Date: Sun, 31 May 2015 08:30:48 -0700 Subject: [PATCH 19/97] [split] Move gem plugin to oh-my-fish/plugin-gem https://github.com/oh-my-fish/plugin-gem --- plugins/gem/README.md | 16 ---------------- plugins/gem/gem.load | 4 ---- 2 files changed, 20 deletions(-) delete mode 100644 plugins/gem/README.md delete mode 100644 plugins/gem/gem.load diff --git a/plugins/gem/README.md b/plugins/gem/README.md deleted file mode 100644 index 4810e3d..0000000 --- a/plugins/gem/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# gem -Ruby gem support for fish. - -## Install -Add `gem` to your list of fish plugins in your `config.fish`. - -Example: - - set fish_plugins gem bundler - -## Configuration -Set `GEM_ROOT` in your `config.fish`. - -Example: - - set GEM_ROOT ~/.gem/ruby/2.1.0 diff --git a/plugins/gem/gem.load b/plugins/gem/gem.load deleted file mode 100644 index 9664478..0000000 --- a/plugins/gem/gem.load +++ /dev/null @@ -1,4 +0,0 @@ -if test -n "$GEM_ROOT" - set -gx GEM_HOME $GEM_ROOT - _prepend_path $GEM_ROOT/bin -end From 00323c3948ad8f65d126ff225a2a87f84747603d Mon Sep 17 00:00:00 2001 From: Justin Hileman Date: Sun, 31 May 2015 08:30:48 -0700 Subject: [PATCH 20/97] [split] Move getopts plugin to oh-my-fish/plugin-getopts https://github.com/oh-my-fish/plugin-getopts --- plugins/getopts/README.md | 110 -------- plugins/getopts/getopts.fish | 409 ------------------------------ plugins/getopts/getopts.spec.fish | 150 ----------- 3 files changed, 669 deletions(-) delete mode 100644 plugins/getopts/README.md delete mode 100644 plugins/getopts/getopts.fish delete mode 100644 plugins/getopts/getopts.spec.fish diff --git a/plugins/getopts/README.md b/plugins/getopts/README.md deleted file mode 100644 index 74c130e..0000000 --- a/plugins/getopts/README.md +++ /dev/null @@ -1,110 +0,0 @@ -# getopts -> friendly [`getopts`](http://en.wikipedia.org/wiki/Getopts) for [fish](https://fishshell.com) :fish: - -## Usage - -```fish -Add `getopts` to your `$fish_plugins` or import directly into your library via `import plugins/getopts`. -``` - -## Premise -Every utility / function needs to handle arguments. What usually happens is that every function does all the grunt work to parse `$argv` itself, and while some patterns do tend to recur, it's different almost every time. Enter fish `getopts`. - -## Synopsis - `getopts