just playing with tangled
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

configs: use Notepad as default editor on Windows

authored by

Martin von Zweigbergk and committed by
Martin von Zweigbergk
a367f13c 32b07d6b

+22 -11
+2
CHANGELOG.md
··· 27 27 28 28 * The `push.branch-prefix` option was renamed to `git.push-branch-prefix`. 29 29 30 + * The default editor on Windows is now `Notepad` instead of `pico`. 31 + 30 32 ### New features 31 33 32 34 * `jj init --git-repo` now works with bare repositories.
+1 -1
cli/src/commands/mod.rs
··· 433 433 /// Update the change description or other metadata 434 434 /// 435 435 /// Starts an editor to let you edit the description of a change. The editor 436 - /// will be $EDITOR, or `pico` if that's not defined. 436 + /// will be $EDITOR, or `pico` if that's not defined (`Notepad` on Windows). 437 437 #[derive(clap::Args, Clone, Debug)] 438 438 struct DescribeArgs { 439 439 /// The revision whose description to edit
+9 -4
cli/src/config.rs
··· 343 343 config::File::from_str(include_str!($file), config::FileFormat::Toml) 344 344 }; 345 345 } 346 - config::Config::builder() 346 + let mut builder = config::Config::builder() 347 347 .add_source(from_toml!("config/colors.toml")) 348 348 .add_source(from_toml!("config/merge_tools.toml")) 349 349 .add_source(from_toml!("config/misc.toml")) 350 - .add_source(from_toml!("config/templates.toml")) 351 - .build() 352 - .unwrap() 350 + .add_source(from_toml!("config/templates.toml")); 351 + if cfg!(unix) { 352 + builder = builder.add_source(from_toml!("config/unix.toml")) 353 + } 354 + if cfg!(windows) { 355 + builder = builder.add_source(from_toml!("config/windows.toml")) 356 + } 357 + builder.build().unwrap() 353 358 } 354 359 355 360 /// Environment variables that override config values
-1
cli/src/config/misc.toml
··· 5 5 # Placeholder: added by user 6 6 7 7 [ui] 8 - editor = "pico" 9 8 pager = { command = ["less", "-FRX"], env = { LESSCHARSET = "utf-8" } } 10 9 log-word-wrap = false
+2
cli/src/config/unix.toml
··· 1 + [ui] 2 + editor = "pico"
+2
cli/src/config/windows.toml
··· 1 + [ui] 2 + editor = "Notepad"
+2 -2
docs/config.md
··· 294 294 295 295 `$JJ_EDITOR` > `ui.editor` > `$VISUAL` > `$EDITOR` 296 296 297 - Pico is the default editor in the absence of any other setting, but you could 298 - set it explicitly too. 297 + Pico is the default editor (Notepad on Windows) in the absence of any other 298 + setting, but you could set it explicitly too. 299 299 300 300 ```toml 301 301 ui.editor = "pico"
+1 -1
docs/config.toml
··· 7 7 ui.color = "auto" # the default 8 8 # ui.color = never # no color 9 9 10 - ui.editor = "pico" # the default 10 + ui.editor = "pico" # the default on Unix 11 11 # ui.editor = "vim" 12 12 13 13 ui.diff-editor = "meld" # default, requires meld to be installed
+3 -2
docs/tutorial.md
··· 39 39 instead of "Hello". Let's start by describing the change (adding a 40 40 commit message) so we don't forget what we're working on: 41 41 ```shell script 42 - # This will bring up $EDITOR (or `pico` by default). Enter something like 43 - # "Say goodbye" in the editor and then save the file and close the editor. 42 + # This will bring up $EDITOR (or `pico` or `Notepad` by default). Enter 43 + # something like "Say goodbye" in the editor and then save the file and close 44 + # the editor. 44 45 $ jj describe 45 46 Working copy now at: e427edcfd0ba Say goodbye 46 47 ```