GiselleSerate / myaliases

Useful shell aliases and functions.
6 stars 1 forks source link

remove the desk alias #84

Closed aryarm closed 5 years ago

aryarm commented 5 years ago

The desk alias has been causing the following error message to be displayed in WSL2 each time the alias is declared (on terminal start-up):

'\\wsl$\Ubuntu-18.04\home\amassarat'
CMD.EXE was started with the above path as the current directory.
UNC paths are not supported.  Defaulting to Windows directory.

This PR removes the desk alias because its functionality can be achieved using cds.

Alternatively, if you'd rather keep the alias, the following patch will silence the error:

- alias desk="cd /mnt/c/Users/$(echo $(cmd "echo | set /p=%USERPROFILE%") | sed 's:.*\\::')/Desktop"
+ alias desk="cd /mnt/c/Users/$(echo $(2>/dev/null cmd "echo | set /p=%USERPROFILE%") | sed 's:.*\\::')/Desktop"