mirror of
https://github.com/artizirk/dotfiles.git
synced 2024-11-22 16:30:59 +02:00
Create pretty serial names under wsl
This commit is contained in:
parent
86b8196f54
commit
79ed3c7f93
6
.zshrc
6
.zshrc
@ -241,3 +241,9 @@ function vless {
|
|||||||
if [[ -e /mnt/c/wsl-ssh-pageant/ssh-agent.sock ]]; then
|
if [[ -e /mnt/c/wsl-ssh-pageant/ssh-agent.sock ]]; then
|
||||||
export SSH_AUTH_SOCK=/mnt/c/wsl-ssh-pageant/ssh-agent.sock
|
export SSH_AUTH_SOCK=/mnt/c/wsl-ssh-pageant/ssh-agent.sock
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# We are running under WSL
|
||||||
|
if [[ -e /dev/lxss ]]; then
|
||||||
|
# Create pretty serial device names
|
||||||
|
reg.exe query HKLM\\HARDWARE\\DEVICEMAP\\SERIALCOMM | awk '/Device/ {gsub("\r","",$3); print "/dev/ttyS" substr($3,4), "/dev/tty" substr($1,9)}' | sudo xargs -n2 ln -sf
|
||||||
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user