Merge branch 'master' of gitee.com:klesh/dotfiles
This commit is contained in:
commit
a173351e71
8
bin/bm
8
bin/bm
|
@ -7,12 +7,6 @@ if set -q BOOKMARK_SEARCHER
|
||||||
else
|
else
|
||||||
set BOOKMARK_SEARCHER fzf --layout reverse
|
set BOOKMARK_SEARCHER fzf --layout reverse
|
||||||
end
|
end
|
||||||
if string match -iq '*microsoft*' (uname -r)
|
|
||||||
function xdg-open
|
|
||||||
powershell.exe -noprofile "start-process '$argv'"
|
|
||||||
end
|
|
||||||
alias disown='echo done' # no need to disown on WSL
|
|
||||||
end
|
|
||||||
|
|
||||||
function _help
|
function _help
|
||||||
echo "Organize your bookmark with markdown"
|
echo "Organize your bookmark with markdown"
|
||||||
|
@ -107,7 +101,7 @@ function _open_urls
|
||||||
set LINK_PATTERN '\[(.*?)\]\((.*?)\)'
|
set LINK_PATTERN '\[(.*?)\]\((.*?)\)'
|
||||||
while read LINE
|
while read LINE
|
||||||
if set link (string match -r $LINK_PATTERN $LINE)
|
if set link (string match -r $LINK_PATTERN $LINE)
|
||||||
echo '' | xdg-open $link[3] &>/dev/null &
|
echo '' | x-open $link[3] &>/dev/null &
|
||||||
disown
|
disown
|
||||||
sleep 0.1
|
sleep 0.1
|
||||||
end
|
end
|
||||||
|
|
6
bin/x-open
Executable file
6
bin/x-open
Executable file
|
@ -0,0 +1,6 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
case $(uname -r) in
|
||||||
|
*microsoft*) powershell.exe -noprofile start-process "$@";;
|
||||||
|
*) xdg-open "$@";;
|
||||||
|
esac
|
|
@ -51,13 +51,9 @@ if status is-interactive
|
||||||
alias issh='ssh -o "StrictHostKeyChecking=no" -o "UserKnownHostsFile=/dev/null"'
|
alias issh='ssh -o "StrictHostKeyChecking=no" -o "UserKnownHostsFile=/dev/null"'
|
||||||
alias iscp='scp -o "StrictHostKeyChecking=no" -o "UserKnownHostsFile=/dev/null"'
|
alias iscp='scp -o "StrictHostKeyChecking=no" -o "UserKnownHostsFile=/dev/null"'
|
||||||
alias dt='date "+%Y%m%d-%H%M%S"'
|
alias dt='date "+%Y%m%d-%H%M%S"'
|
||||||
if string match -iq '*microsoft*' (uname -r)
|
|
||||||
alias open='powershell.exe -noprofile start-process'
|
|
||||||
alias xdg-open='open'
|
|
||||||
end
|
|
||||||
|
|
||||||
# === PATH and file sourcing
|
# === PATH and file sourcing
|
||||||
append_paths ~/go/bin ~/bin ~/.local/bin ~/.yarn/bin ~/dotfiles/bin ~/dotfiles/devops/bin
|
append_paths ~/go/bin ~/bin ~/.local/bin ~/.yarn/bin ~/dotfiles/bin ~/dotfiles/devops/bin ~/Nextcloud/bin
|
||||||
source_files /usr/share/autojump/autojump.fish /usr/local/share/autojump/autojump.fish \
|
source_files /usr/share/autojump/autojump.fish /usr/local/share/autojump/autojump.fish \
|
||||||
~/.jabba/jabba.fish \
|
~/.jabba/jabba.fish \
|
||||||
~/.asdf/asdf.fish \
|
~/.asdf/asdf.fish \
|
||||||
|
@ -65,13 +61,5 @@ if status is-interactive
|
||||||
|
|
||||||
# === auto cd into last activated directory
|
# === auto cd into last activated directory
|
||||||
test "$PWD" = "$HOME" && cd $last_pwd
|
test "$PWD" = "$HOME" && cd $last_pwd
|
||||||
|
|
||||||
#if test -n "$TMUX"
|
|
||||||
#function ssh
|
|
||||||
#tmux rename-window $argv[-1]
|
|
||||||
#command ssh $argv
|
|
||||||
#tmux setw automatic-rename
|
|
||||||
#end
|
|
||||||
#end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user