dotfiles

Cross platform dotfiles for linux, mac and windows
git clone git@getsh.org:dotfiles.git
Log | Files | Refs

commit f9ee59beb6639cad94f1104696e5e30fa3d2eb02
parent 603463fc53a4a6fe719e8a13eb6b2e676294aad0
Author: Bharatvaj <bharatvaj@yahoo.com>
Date:   Wed,  1 Jun 2022 11:10:20 +0530

Use .bat ext for aliases script profile

Add eol = crlf for bat files in .gitattributes, check previous commit
for more info on this

Disable logo on clink

Separate environment variables from profile.cmd into environment.bat

Diffstat:
M.config/clink/clink_settings | 1+
A.config/cmd/aliases.bat | 8++++++++
D.config/cmd/aliases.cmd | 6------
A.config/cmd/environment.bat | 9+++++++++
M.config/cmd/profile.cmd | 12++----------
M.config/cmd/setup.cmd | 15+++++++++++----
M.gitattributes | 1+
7 files changed, 32 insertions(+), 20 deletions(-)

diff --git a/.config/clink/clink_settings b/.config/clink/clink_settings @@ -1 +1,2 @@ clink.autostart=%XDG_CONFIG_HOME%\cmd\profile.cmd +clink.logo=none diff --git a/.config/cmd/aliases.bat b/.config/cmd/aliases.bat @@ -0,0 +1,8 @@ +doskey v=vim $* +doskey vi=vim $* +doskey n=nvim $* +doskey g=git $* +doskey e=%EDITOR% $* +doskey l=%USERPROFILE%\.config\cmd\lfcd.cmd + +set SOURCE_DEV_TOOLS="C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\Build\vcvarsall.bat" diff --git a/.config/cmd/aliases.cmd b/.config/cmd/aliases.cmd @@ -1,6 +0,0 @@ -doskey v=vim $* -doskey vi=vim $* -doskey n=nvim $* -doskey g=git $* -doskey e=%EDITOR% $* -doskey l=%USERPROFILE%\.config\cmd\lfcd.cmd diff --git a/.config/cmd/environment.bat b/.config/cmd/environment.bat @@ -0,0 +1,9 @@ +set VISUAL=vim +set EDITOR=%VISUAL% +set XDG_CONFIG_HOME=%USERPROFILE%\.config +set XDG_DATA_HOME=%USERPROFILE%\.local\share +set XDG_CACHE_HOME=%USERPROFILE%\.cache + +set MYVIMRC=%XDG_CONFIG_HOME%\vim\vimrc +set VIMINIT=source $MYVIMRC + diff --git a/.config/cmd/profile.cmd b/.config/cmd/profile.cmd @@ -3,13 +3,5 @@ cd %USERPROFILE% prompt $P ∆ -set VISUAL=vim -set EDITOR=%VISUAL% -set XDG_CONFIG_HOME=%USERPROFILE%\.config -set XDG_DATA_HOME=%USERPROFILE%\.local\share -set XDG_CACHE_HOME=%USERPROFILE%\.cache - -set MYVIMRC=%XDG_CONFIG_HOME%\vim\vimrc -set VIMINIT=source $MYVIMRC - -%XDG_CONFIG_HOME%\cmd\aliases.cmd +@call %XDG_CONFIG_HOME%\cmd\environment.bat +@call %XDG_CONFIG_HOME%\cmd\aliases.bat diff --git a/.config/cmd/setup.cmd b/.config/cmd/setup.cmd @@ -1,6 +1,13 @@ -powershell setup.ps1 +@echo off +powershell %XDG_CONFIG_HOME%\cmd\setup.ps1 +@call %XDG_CONFIG_HOME%\cmd\environment.bat -# Apply config patches -xcopy %USERPROFILE%\.config\cmd\patch %USERPROFILE%\ /S /E +:: Apply config patches +:: TODO Use mklink instead of xcopy, it will prevent overriding changed files in the destination dir. +xcopy /Y %USERPROFILE%\.config\cmd\patch %USERPROFILE%\ /S /E -mklink %USERPROFILE%\_vimrc %USERPROFILE%\.config\vim\vimrc +IF NOT EXIST %USERPROFILE%\.config\vim\vimrc mklink %USERPROFILE%\_vimrc %USERPROFILE%\.config\vim\vimrc + +mkdir %SYSTEMDRIVE%\bin +cp %SCOOP%\apps\busybox\current\busybox.exe %SYSTEMDRIVE%\bin +cp %SCOOP%\shims\sh.* %SYSTEMDRIVE%\bin diff --git a/.gitattributes b/.gitattributes @@ -1,2 +1,3 @@ * text eol=lf *.cmd text eol=crlf +*.bat text eol=crlf