[feature] functions for wsl

This commit is contained in:
Klesh Wong 2021-06-15 11:58:03 +08:00
parent 07bf27188d
commit 0c58a9eb0c
3 changed files with 11 additions and 0 deletions

View File

@ -61,6 +61,8 @@ lnsf "$DIR/fish/functions/r.fish" "$XDG_CONFIG_HOME/fish/functions/r.fish"
lnsf "$DIR/fish/functions/f.fish" "$XDG_CONFIG_HOME/fish/functions/f.fish" lnsf "$DIR/fish/functions/f.fish" "$XDG_CONFIG_HOME/fish/functions/f.fish"
lnsf "$DIR/fish/functions/append_paths.fish" "$XDG_CONFIG_HOME/fish/functions/append_paths.fish" lnsf "$DIR/fish/functions/append_paths.fish" "$XDG_CONFIG_HOME/fish/functions/append_paths.fish"
lnsf "$DIR/fish/functions/source_files.fish" "$XDG_CONFIG_HOME/fish/functions/source_files.fish" lnsf "$DIR/fish/functions/source_files.fish" "$XDG_CONFIG_HOME/fish/functions/source_files.fish"
lnsf "$DIR/fish/functions/git_clone_all.fish" "$XDG_CONFIG_HOME/fish/functions/git_clone_all.fish"
lnsf "$DIR/fish/functions/winip.fish" "$XDG_CONFIG_HOME/fish/functions/winip.fish"
# install plugins # install plugins
# for better keybinding: C-o open file with $EDITOR / C-r search history / C-g open with xdg-open # for better keybinding: C-o open file with $EDITOR / C-r search history / C-g open with xdg-open

View File

@ -0,0 +1,6 @@
function git_clone_all
for remote_branch in (git branch -r | awk 'NR>1{print $1}')
set local_branch (basename $remote_branch)
git branch --track $local_branch $remote_branch
end
end

View File

@ -0,0 +1,3 @@
function winip
grep nameserver /etc/resolv.conf | awk '{print $2}'
end