mirror of
https://github.com/mitchell/dotfiles.git
synced 2026-08-10 08:09:35 +00:00
refactor: rename period-prefixed files to dot-<filename>
This commit is contained in:
parent
341cdd5b9e
commit
16201f13c2
49 changed files with 0 additions and 0 deletions
24
fish/dot-config/fish/functions/editcb.fish
Normal file
24
fish/dot-config/fish/functions/editcb.fish
Normal 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue