ucomesdag

WSL .bash_aliases

Feb 26th, 2019 (edited)
273
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.69 KB | None | 0 0
  1. alias h="cd /mnt/c/Users/$(cmd.exe /c "echo %USERNAME%" | sed -e 's/\r//g')"
  2. alias p="cd /mnt/c/Users/$(cmd.exe /c "echo %USERNAME%" | sed -e 's/\r//g')/Projects"
  3. alias r="cd /mnt/c"
  4. alias open='explorer.exe $(wslpath -w "$1")'
  5. alias n="explorer.exe 'shell:appsFolder\CanonicalGroupLimited.Ubuntu18.04onWindows_79rhkp1fndgsc!ubuntu1804'"
  6.  
  7. function subl {
  8.   SUBL="/mnt/c/Program Files/Sublime Text 3/sublime_text.exe"
  9.   if [[ $# -eq 0 ]] ; then
  10.     "$SUBL" -s
  11.   else
  12.     "$SUBL" -s "$(wslpath -w "$1")"
  13.   fi
  14. }
  15.  
  16. function smerge {
  17.   SMERGE="/mnt/c/Program Files/Sublime Merge/sublime_merge.exe"
  18.   if [[ $# -eq 0 ]] ; then
  19.     "$SMERGE" -s
  20.   else
  21.     "$SMERGE" -s "$(wslpath -w "$1")"
  22.   fi
  23. }
Add Comment
Please, Sign In to add comment