fish: split config into several files
parent
59035f5d7f
commit
745b716b41
|
@ -5,58 +5,12 @@ if status is-interactive
|
||||||
exec tmux new-session
|
exec tmux new-session
|
||||||
end
|
end
|
||||||
|
|
||||||
function fish_prompt
|
|
||||||
echo (set_color purple)"$hostname% "
|
|
||||||
end
|
|
||||||
|
|
||||||
function fish_right_prompt
|
|
||||||
echo (set_color green)(pwd)
|
|
||||||
end
|
|
||||||
|
|
||||||
function fish_greeting
|
|
||||||
echo "Word of the moment: "(shuf -n1 /usr/share/dict/words) |
|
|
||||||
awk -f ~/src/scripts/mid.awk col=$COLUMNS
|
|
||||||
end
|
|
||||||
|
|
||||||
function rebuild
|
function rebuild
|
||||||
$HOME/src/scripts/rebuild.rkt $argv
|
$HOME/src/scripts/rebuild.rkt $argv
|
||||||
end
|
end
|
||||||
|
|
||||||
function cheat.sh -d 'Grabs a sheet from cheat.sh' -a arg
|
source ~/src/scripts/prompt.fish
|
||||||
curl cheat.sh/$arg
|
source ~/src/scripts/cheat.fish
|
||||||
end
|
source ~/src/scripts/ql.fish
|
||||||
|
|
||||||
complete -c cheat.sh -xa '(curl -s cheat.sh/:list)'
|
|
||||||
|
|
||||||
function ql -d 'Changes directory to a quicklink' -a name
|
|
||||||
if not set -q quicklink_$name name
|
|
||||||
echo (set_color red)"error: no quicklink named $name"(set_color normal)
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
set name quicklink_$name
|
|
||||||
|
|
||||||
cd $$name
|
|
||||||
end
|
|
||||||
|
|
||||||
function ql-r -w ql -d 'Removes a quicklink' -a name
|
|
||||||
if not set -q name
|
|
||||||
echo (set_color red)"error: not enough arguments"(set_color normal)
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
set -Ue quicklink_$name
|
|
||||||
end
|
|
||||||
|
|
||||||
function ql-s -d 'Saves the working directory as a quicklink' -a name
|
|
||||||
if not set -q name
|
|
||||||
echo (set_color red)"error: not enough arguments"(set_color normal)
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
set -U quicklink_$name $PWD
|
|
||||||
end
|
|
||||||
|
|
||||||
complete -c ql -xa '(set -U | rg -or \'$1\' \'^quicklink_(.+) \')'
|
|
||||||
|
|
||||||
## EOF
|
## EOF
|
||||||
|
|
|
@ -13,7 +13,7 @@ tree -dL 3 ~/.vim/pack > vim/packages
|
||||||
|
|
||||||
while read f t
|
while read f t
|
||||||
eval set t $t
|
eval set t $t
|
||||||
cp (find $t) $f
|
cp -r $t $f
|
||||||
end < files
|
end < files
|
||||||
|
|
||||||
sed -i 's/password>.*<\//password>password removed<\//g' network/icecast.xml
|
sed -i 's/password>.*<\//password>password removed<\//g' network/icecast.xml
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
function cheat.sh -d 'Grabs a sheet from cheat.sh' -a arg
|
||||||
|
curl cheat.sh/$arg
|
||||||
|
end
|
||||||
|
|
||||||
|
complete -c cheat.sh -xa '(curl -s cheat.sh/:list)'
|
||||||
|
|
||||||
|
## EOF
|
|
@ -0,0 +1,14 @@
|
||||||
|
function fish_prompt
|
||||||
|
echo (set_color purple)"$hostname% "
|
||||||
|
end
|
||||||
|
|
||||||
|
function fish_right_prompt
|
||||||
|
echo (set_color green)(pwd)
|
||||||
|
end
|
||||||
|
|
||||||
|
function fish_greeting
|
||||||
|
echo "Word of the moment: "(shuf -n1 /usr/share/dict/words) |
|
||||||
|
awk -f ~/src/scripts/mid.awk col=$COLUMNS
|
||||||
|
end
|
||||||
|
|
||||||
|
## EOF
|
|
@ -0,0 +1,32 @@
|
||||||
|
function ql -d 'Changes directory to a quicklink' -a name
|
||||||
|
if not set -q quicklink_$name name
|
||||||
|
echo (set_color red)"error: no quicklink named $name"(set_color normal)
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
set name quicklink_$name
|
||||||
|
|
||||||
|
cd $$name
|
||||||
|
end
|
||||||
|
|
||||||
|
function ql-r -w ql -d 'Removes a quicklink' -a name
|
||||||
|
if not set -q name
|
||||||
|
echo (set_color red)"error: not enough arguments"(set_color normal)
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
set -Ue quicklink_$name
|
||||||
|
end
|
||||||
|
|
||||||
|
function ql-s -d 'Saves the working directory as a quicklink' -a name
|
||||||
|
if not set -q name
|
||||||
|
echo (set_color red)"error: not enough arguments"(set_color normal)
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
set -U quicklink_$name $PWD
|
||||||
|
end
|
||||||
|
|
||||||
|
complete -c ql -xa '(set -U | rg -or \'$1\' \'^quicklink_(.+) \')'
|
||||||
|
|
||||||
|
## EOF
|
Loading…
Reference in New Issue