問題が起きる場合は、ほぼ文字コード (スクリプトの UTF-8 が認識されない)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @echo off | |
| @call :"%~1" %2 %3 %4 %5 %6 %7 %8 %9 | |
| @exit /b | |
| :"" | |
| echo chinook.cmd {sqlite^|sqlserver^|mysql^|oracle^|psql} | |
| exit /b | |
| :"sqlite" | |
| :"sqlite3" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| " scriptencoding utf-8 | |
| set smartindent | |
| set sw=4 ts=8 ai nobk et | |
| set textwidth=0 | |
| set noswapfile | |
| set nobackup | |
| set noundofile | |
| set directory=$TEMP | |
| "set colorcolumn=80 | |
| set nrformats=hex |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //go:build run | |
| package main | |
| import ( | |
| "fmt" | |
| "os" | |
| "time" | |
| "github.com/hymkor/jegan/internal/ttychan" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @echo off | |
| setlocal | |
| set "PROMPT=$G " | |
| for /F %%I in ('jj log -r "latest(::@ & bookmarks())" --no-graph --template "self.bookmarks()"') do set "BOOKMARK=%%I" | |
| if "%~1" == "" ( | |
| set "REV=@-" | |
| ) else ( | |
| set "REV=%~1" | |
| ) |
-
Windows のカレントディレクトリは全ドライブ中でひとつしかないが、DOS では各ドライブごとにひとつカレントディレクトリがあった。 CMD.EXE では、DOS の挙動をエミュレートするために、A: ドライブのカレントディレクトリを
C:という環境変数にC:のドライブ固有のカレントディレクトリを記憶させている。 -
Windows での標準ディレクトリ区切り文字は
\(backslash)だが、/(forwardslash)も使えることが多い。 実行ファイル名指定には/が一応使えないが、二重引用符で囲むと/も使えるようになる。 おそらく/は(UNIXでの-のような)オプションのプリフィックス文字という役割があり、 二重引用符で囲むとそのチェックが外れるのではないかと思われる。 -
SET "NAME=VALUE"と記すと環境変数NAMEの中に VALUE前後に余計な空白が含まれなくなる。
- shiftbk.ps1
jj bookmark move ブックマーク名 -t リビジョンでブックマーク名の転記が面倒くさいので書いた、自動で直近のものを探して移動させてくれる PowerShell スクリプト(実行前の目視確認あり)。結構、使う(→ shiftjj.cmd の方を使うようになった) - shiftjj.cmd
jj-vcs/jj で更新日時が最も新しい bookmark を、@-もしくは引数で与えられたチェンジまで移動させた後、GitHub へ push するバッチファイル - new-jj.ps1
jj git init* -textという1行だけの.gitattributesを作成する
*~,*.o,*.exe,__*,*.zip,distなどを .git/info/exclude に追加
NewerOlder