feat(u/riking/dotfiles): convert bashrc functions to fish
Change-Id: I8a7d1806a8920d31c0b572a4259eef908339e449 Reviewed-on: https://cl.tvl.fyi/c/depot/+/1927 Tested-by: BuildkiteCI Reviewed-by: kanepyork <rikingcoding@gmail.com>
This commit is contained in:
parent
2f7b688389
commit
dd94d3036a
5 changed files with 63 additions and 0 deletions
18
users/riking/dotfiles/fish/functions/gh-clone.fish
Normal file
18
users/riking/dotfiles/fish/functions/gh-clone.fish
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
function gh-clone --description 'Clone and CD to a github repository'
|
||||
if test (count $argv) -eq 1
|
||||
set user (string split "/" -- $argv[1])[1]
|
||||
set repo (string split "/" -- $argv[1])[2]
|
||||
else
|
||||
set user $argv[1]
|
||||
set repo $argv[2]
|
||||
end
|
||||
|
||||
if test -d "$HOME/go/src/github.com/$user/$repo"
|
||||
cd "$HOME/go/src/github.com/$user/$repo"
|
||||
return 0
|
||||
end
|
||||
mkdir -p "$HOME/go/src/github.com/$user"
|
||||
cd "$HOME/go/src/github.com/$user"
|
||||
git clone "git@github.com:$user/$repo.git"
|
||||
cd "$HOME/go/src/github.com/$user/$repo"
|
||||
end
|
||||
6
users/riking/dotfiles/fish/functions/prodaccess.fish
Normal file
6
users/riking/dotfiles/fish/functions/prodaccess.fish
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
function prodaccess
|
||||
ssh-add "$HOME/.ssh/id_ecdsa_sk"
|
||||
begin; ssh-add -L | grep -q 'ZgEu6S3SLatYN'; end || ssh-add "$HOME"/.ssh/id_ed25519
|
||||
begin; ssh-add -L | grep -q 'Gfh2S3kUwZ8A6'; end || ssh-add "$HOME"/.ssh/id_rsa.discourse
|
||||
echo "signing test" | gpg --clearsign > /dev/null
|
||||
end
|
||||
4
users/riking/dotfiles/fish/functions/reset-audio.fish
Normal file
4
users/riking/dotfiles/fish/functions/reset-audio.fish
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
function reset-audio --description "Resets pulse and alsa"
|
||||
pulseaudio -k
|
||||
sudo alsa force-reload
|
||||
end
|
||||
3
users/riking/dotfiles/fish/functions/tvl-push.fish
Normal file
3
users/riking/dotfiles/fish/functions/tvl-push.fish
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
function tvl-push
|
||||
git push origin HEAD:refs/for/canon
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue