Reorganized fish shell configuration

This commit is contained in:
Marcel Kapfer 2019-03-09 17:52:33 +01:00
parent e9b168e5b6
commit eb27c29784
Signed by: mmk2410
GPG key ID: CADE6F0C09F21B09
20 changed files with 390 additions and 193 deletions

View file

@ -22,3 +22,13 @@ set_color_custom.fish
vcs.name.fish
vcs.present.fish
fisher.fish
fin.fish
fish_greeting.fish
fish_mode_prompt.fish
host_info.fish
last_job_id.fish
pwd_info.fish
pwd_is_home.fish
_*
fish_prompt.fish
fish_title.fish

View file

@ -1,4 +1,24 @@
function cdl
# Copyright © 2019 Marcel Kapfer <opensource@mmk2410.org>
# MIT License
# 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.
function cdl --wraps cd --description "Switch directory and show content"
cd $argv
l
end

View file

@ -0,0 +1,27 @@
# Copyright © 2019 Marcel Kapfer <opensource@mmk2410.org>
# MIT License
# 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.
function diff --wraps diff --description "Use colordiff instead of diff, if available"
if type -q colordiff
colordiff $argv
else
diff $argv
end
end

View file

@ -1 +0,0 @@
/home/marcel/.config/fisherman/eco/functions/fish_prompt.fish

View file

@ -1,12 +0,0 @@
# Defined in /tmp/fish.au862c/fish_title.fish @ line 2
function fish_title
if test -z $EMACS
if test $_ = 'fish'
echo (prompt_pwd)
else
echo $_
end
else
true
end
end

View file

@ -1,27 +0,0 @@
function g
git $argv
end
function gst
git status $argv
end
function gcom
git commit $argv
end
function gad
git add $argv
end
function gup
git push $argv
end
function gdo
git pull $argv
end
function gdif
git diff $argv
end

View file

@ -1,5 +0,0 @@
function haha
for x in (seq 10)
echo hahahahahahahahahahahahahahahahahaha
end
end

View file

@ -0,0 +1,27 @@
# Copyright © 2019 Marcel Kapfer <opensource@mmk2410.org>
# MIT License
# 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.
function sbcl --wraps sbcl --description "Wrap SBCL with rlwrap (readline support)"
if type -q rlwrap
rlwrap sbcl $argv
else
sbcl $argv
end
end

View file

@ -1,8 +0,0 @@
function upgrade --description "Upgrade the system"
sudo apt update
and sudo apt upgrade
and sudo apt full-upgrade
and sudo apt autoremove
sudo tlmgr update --self --all
sudo npm update -g
end

View file

@ -1,3 +0,0 @@
function vim
nvim $argv
end