mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-02 22:21:15 -03:00
Make fish_indent available as a builtin
This commit is contained in:
@@ -27,6 +27,7 @@
|
||||
use fish::future::IsSomeAnd;
|
||||
use fish::{
|
||||
ast::Ast,
|
||||
builtins::fish_indent,
|
||||
builtins::fish_key_reader,
|
||||
builtins::shared::{
|
||||
BUILTIN_ERR_MISSING, BUILTIN_ERR_UNKNOWN, STATUS_CMD_OK, STATUS_CMD_UNKNOWN,
|
||||
@@ -715,6 +716,8 @@ fn main() {
|
||||
let p = Path::new(&name).file_name().and_then(|x| x.to_str());
|
||||
if p == Some("fish_key_reader") {
|
||||
return fish_key_reader::main();
|
||||
} else if p == Some("fish_indent") {
|
||||
return fish_indent::main();
|
||||
}
|
||||
}
|
||||
PROGRAM_NAME.set(L!("fish")).unwrap();
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
1149
src/builtins/fish_indent.rs
Normal file
1149
src/builtins/fish_indent.rs
Normal file
File diff suppressed because it is too large
Load Diff
@@ -18,6 +18,7 @@
|
||||
pub mod eval;
|
||||
pub mod exit;
|
||||
pub mod fg;
|
||||
pub mod fish_indent;
|
||||
pub mod fish_key_reader;
|
||||
pub mod function;
|
||||
pub mod functions;
|
||||
|
||||
@@ -241,6 +241,10 @@ struct BuiltinData {
|
||||
name: L!("fg"),
|
||||
func: fg::fg,
|
||||
},
|
||||
BuiltinData {
|
||||
name: L!("fish_indent"),
|
||||
func: fish_indent::fish_indent,
|
||||
},
|
||||
BuiltinData {
|
||||
name: L!("fish_key_reader"),
|
||||
func: fish_key_reader::fish_key_reader,
|
||||
|
||||
Reference in New Issue
Block a user