Disable git for vscode to move to jujutsu
This commit is contained in:
parent
c790b42e93
commit
268b1ecc65
5 changed files with 77 additions and 28 deletions
48
.vscode/settings.json
vendored
48
.vscode/settings.json
vendored
|
@ -1,4 +1,50 @@
|
|||
{
|
||||
"rust-analyzer.check.command": "clippy",
|
||||
"git.enabled": false
|
||||
"git.enabled": false,
|
||||
"gitlens.showWhatsNewAfterUpgrades": false,
|
||||
"gitlens.plusFeatures.enabled": false,
|
||||
"gitlens.virtualRepositories.enabled": false,
|
||||
"gitlens.currentLine.enabled": true,
|
||||
"gitlens.currentLine.pullRequests.enabled": false,
|
||||
"gitlens.codeLens.enabled": false,
|
||||
"gitlens.codeLens.authors.enabled": false,
|
||||
"gitlens.codeLens.recentChange.enabled": false,
|
||||
"gitlens.statusBar.enabled": false,
|
||||
"gitlens.statusBar.pullRequests.enabled": false,
|
||||
"gitlens.hovers.enabled": true,
|
||||
"gitlens.hovers.pullRequests.enabled": false,
|
||||
"gitlens.hovers.autolinks.enabled": false,
|
||||
"gitlens.hovers.currentLine.enabled": true,
|
||||
"gitlens.hovers.annotations.enabled": true,
|
||||
"gitlens.blame.heatmap.enabled": false,
|
||||
"gitlens.blame.highlight.enabled": false,
|
||||
"gitlens.graph.minimap.enabled": false,
|
||||
"gitlens.graph.scrollMarkers.enabled": false,
|
||||
"gitlens.graph.sidebar.enabled": false,
|
||||
"gitlens.graph.issues.enabled": false,
|
||||
"gitlens.graph.pullRequests.enabled": false,
|
||||
"gitlens.graph.statusBar.enabled": false,
|
||||
"gitlens.home.preview.enabled": false,
|
||||
"gitlens.launchpad.indicator.enabled": false,
|
||||
"gitlens.launchpad.indicator.polling.enabled": false,
|
||||
"gitlens.cloudPatches.enabled": false,
|
||||
"gitlens.views.commits.pullRequests.enabled": false,
|
||||
"gitlens.views.commitDetails.pullRequests.enabled": false,
|
||||
"gitlens.views.commitDetails.autolinks.enabled": false,
|
||||
"gitlens.views.repositories.pullRequests.enabled": false,
|
||||
"gitlens.views.fileHistory.pullRequests.enabled": false,
|
||||
"gitlens.views.branches.pullRequests.enabled": false,
|
||||
"gitlens.views.remotes.pullRequests.enabled": false,
|
||||
"gitlens.views.worktrees.pullRequests.enabled": false,
|
||||
"gitlens.views.contributors.pullRequests.enabled": false,
|
||||
"gitlens.views.searchAndCompare.pullRequests.enabled": false,
|
||||
"gitlens.views.workspaces.pullRequests.enabled": false,
|
||||
"gitlens.integrations.enabled": false,
|
||||
"gitlens.cloudIntegrations.enabled": false,
|
||||
"gitlens.liveshare.enabled": false,
|
||||
"gitlens.terminalLinks.enabled": false,
|
||||
"gitlens.ai.generateCommitMessage.enabled": false,
|
||||
"gitlens.mode.statusBar.enabled": false,
|
||||
"gitlens.telemetry.enabled": false,
|
||||
"telemetry.feedback.enabled": false
|
||||
}
|
2
build.rs
2
build.rs
|
@ -7,7 +7,7 @@ fn main() {
|
|||
"cargo:rustc-env=TARGET={}",
|
||||
std::env::var("TARGET").unwrap()
|
||||
);
|
||||
|
||||
|
||||
let page = Roff::new()
|
||||
.control("TH", ["SESH", "1"])
|
||||
.control("SH", ["NAME"])
|
||||
|
|
|
@ -263,10 +263,12 @@ pub fn unset(args: Vec<String>, _: String, state: &mut super::State) -> i32 {
|
|||
/// Copy the focus to the clipboard.
|
||||
pub fn copyf(_: Vec<String>, _: String, state: &mut super::State) -> i32 {
|
||||
let mut clipboard = arboard::Clipboard::new().unwrap();
|
||||
clipboard.set_text(match &state.focus {
|
||||
super::Focus::Str(s) => s.clone(),
|
||||
super::Focus::Vec(_) => format!("{}", state.focus)
|
||||
}).unwrap();
|
||||
clipboard
|
||||
.set_text(match &state.focus {
|
||||
super::Focus::Str(s) => s.clone(),
|
||||
super::Focus::Vec(_) => format!("{}", state.focus),
|
||||
})
|
||||
.unwrap();
|
||||
0
|
||||
}
|
||||
|
||||
|
@ -281,7 +283,9 @@ pub fn pastef(args: Vec<String>, _: String, state: &mut super::State) -> i32 {
|
|||
state.focus = super::Focus::Str(text);
|
||||
0
|
||||
} else {
|
||||
unsafe { unreachable_unchecked(); }
|
||||
unsafe {
|
||||
unreachable_unchecked();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -297,7 +301,7 @@ pub fn setf(args: Vec<String>, _: String, state: &mut super::State) -> i32 {
|
|||
name: var.to_string(),
|
||||
value: match &state.focus {
|
||||
super::Focus::Str(s) => s.clone(),
|
||||
super::Focus::Vec(_) => format!("{}", state.focus)
|
||||
super::Focus::Vec(_) => format!("{}", state.focus),
|
||||
},
|
||||
});
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
//! Escape sequences
|
||||
//!
|
||||
//!
|
||||
//! Thanks, stack overflow!
|
||||
//!
|
||||
//!
|
||||
//! (modifications were made)
|
||||
|
||||
use std::fmt::Display;
|
||||
|
@ -14,18 +14,17 @@ pub enum EscapeError {
|
|||
/// unknown unicode character in a \u escape
|
||||
InvalidUnicodeChar(char),
|
||||
/// invalid unicode codepoint
|
||||
InvalidUnicodeCodepoint(u32)
|
||||
InvalidUnicodeCodepoint(u32),
|
||||
}
|
||||
|
||||
impl Display for EscapeError {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
match self {
|
||||
EscapeError::EscapeAtEndOfString => {
|
||||
f.write_str("escape at end of statement")
|
||||
},
|
||||
EscapeError::InvalidUnicodeChar(c) => {
|
||||
f.write_fmt(format_args!("invalid character in a unicode escape: {}", *c))
|
||||
},
|
||||
EscapeError::EscapeAtEndOfString => f.write_str("escape at end of statement"),
|
||||
EscapeError::InvalidUnicodeChar(c) => f.write_fmt(format_args!(
|
||||
"invalid character in a unicode escape: {}",
|
||||
*c
|
||||
)),
|
||||
EscapeError::InvalidUnicodeCodepoint(c) => {
|
||||
f.write_fmt(format_args!("invalid unicode codepoint in escape: {}", *c))
|
||||
}
|
||||
|
@ -56,20 +55,22 @@ impl<'a> Iterator for InterpretEscapedString<'a> {
|
|||
Some('\n') => {
|
||||
ret_next = true;
|
||||
Err(EscapeError::EscapeAtEndOfString)
|
||||
},
|
||||
}
|
||||
Some('u') | Some('U') | Some('x') => {
|
||||
let code = [self.s.next(), self.s.next(), self.s.next(), self.s.next()];
|
||||
if code.iter().any(|val| val.is_none()) {
|
||||
return Err(EscapeError::EscapeAtEndOfString);
|
||||
}
|
||||
let code = TryInto::<[char; 4]>::try_into(
|
||||
code.iter().map(|ch| ch.unwrap().to_ascii_lowercase()).collect::<Vec<char>>(),
|
||||
code.iter()
|
||||
.map(|ch| ch.unwrap().to_ascii_lowercase())
|
||||
.collect::<Vec<char>>(),
|
||||
)
|
||||
.unwrap();
|
||||
|
||||
for c in code {
|
||||
if !(c.is_numeric() || ['a', 'b', 'c', 'd', 'e', 'f'].contains(&c)) {
|
||||
return Err(EscapeError::InvalidUnicodeChar(c))
|
||||
return Err(EscapeError::InvalidUnicodeChar(c));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -79,16 +80,12 @@ impl<'a> Iterator for InterpretEscapedString<'a> {
|
|||
return Err(EscapeError::InvalidUnicodeCodepoint(code));
|
||||
}
|
||||
Ok(out.unwrap())
|
||||
},
|
||||
}
|
||||
Some(c) => Ok(c),
|
||||
},
|
||||
c => Ok(c),
|
||||
});
|
||||
if ret_next {
|
||||
self.next()
|
||||
} else {
|
||||
out
|
||||
}
|
||||
if ret_next { self.next() } else { out }
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -280,7 +280,9 @@ fn eval(statement: &str, state: &mut State) {
|
|||
let _ = writer.suspend_raw_mode();
|
||||
}
|
||||
for env in &state.shell_env {
|
||||
unsafe { std::env::set_var(env.name.clone(), env.value.clone()); }
|
||||
unsafe {
|
||||
std::env::set_var(env.name.clone(), env.value.clone());
|
||||
}
|
||||
}
|
||||
match std::process::Command::new(program_name.clone())
|
||||
.args(&statement_split[1..])
|
||||
|
@ -311,7 +313,7 @@ fn eval(statement: &str, state: &mut State) {
|
|||
state.shell_env.swap_remove(i);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
state.shell_env.push(ShellVar {
|
||||
name: "STATUS".to_string(),
|
||||
value: "127".to_string(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue