Refactor config.fish to use functions moved to functions folder

This commit is contained in:
mitchell 2020-08-09 18:59:14 -04:00
parent b5e93105d6
commit 47a88f93d1
10 changed files with 125 additions and 121 deletions

View file

@ -0,0 +1,24 @@
function editcb -a ft -d 'Opens your editor to the cliboard\'s current contents.'
set uname (uname)
set file "._temp.$ft"
touch $file
switch "$uname"
case 'Linux'
xclip -out -selection clipboard > $file
case 'Darwin'
pbpaste > $file
end
$EDITOR $file
switch "$uname"
case 'Linux'
xclip -in -selection clipboard < $file
case 'Darwin'
pbcopy < $file
end
rm $file
end