mirror of https://github.com/helix-editor/helix
feat: rename `-x` short flag to `-e`
parent
84494f1035
commit
eb486a915f
|
@ -21,7 +21,7 @@ _hx() {
|
|||
|
||||
case "$2" in
|
||||
-*)
|
||||
mapfile -t COMPREPLY < <(compgen -W "-h --help --tutor -V --version -v -vv -vvv --health -g --grammar --vsplit --hsplit -x --execute -c --config --log" -- """$2""")
|
||||
mapfile -t COMPREPLY < <(compgen -W "-h --help --tutor -V --version -v -vv -vvv --health -g --grammar --vsplit --hsplit -e --execute -c --config --log" -- """$2""")
|
||||
return 0
|
||||
;;
|
||||
*)
|
||||
|
|
|
@ -50,7 +50,7 @@ set edit:completion:arg-completer[hx] = {|@args|
|
|||
$candidate "--grammar" "(Fetch or build the tree-sitter grammars)"
|
||||
$candidate "--vsplit" "(Splits all given files vertically)"
|
||||
$candidate "--hsplit" "(Splits all given files horizontally)"
|
||||
$candidate "-x" "(Executes the given command on startup)"
|
||||
$candidate "-e" "(Executes the given command on startup)"
|
||||
$candidate "--execute" "(Executes the given command on startup)"
|
||||
$candidate "--config" "(Specifies a file to use for configuration)"
|
||||
$candidate "--log" "(Specifies a file to write log data into)"
|
||||
|
|
|
@ -12,6 +12,7 @@ complete -c hx -l hsplit -d "Splits all given files horizontally"
|
|||
complete -c hx -s c -l config -r -d "Specifies a file to use for config"
|
||||
complete -c hx -l log -r -d "Specifies a file to use for logging"
|
||||
complete -c hx -s w -l working-dir -d "Specify initial working directory" -xa "(__fish_complete_directories)"
|
||||
complete -c hx -s e -l execute -d "Executes the given command on startup"
|
||||
|
||||
function __hx_langs_ops
|
||||
hx --health languages | tail -n '+2' | string replace -fr '^(\S+) .*' '$1'
|
||||
|
|
|
@ -24,7 +24,7 @@ export extern hx [
|
|||
--version(-V), # Prints version information
|
||||
--vsplit, # Splits all given files vertically into different windows
|
||||
--hsplit, # Splits all given files horizontally into different windows
|
||||
--execute(-x), # Executes the given command on startup
|
||||
--execute(-e), # Executes the given command on startup
|
||||
--working-dir(-w): glob, # Specify an initial working directory
|
||||
...files: glob, # Sets the input file to use, position can also be specified via file[:row[:col]]
|
||||
]
|
||||
|
|
|
@ -18,7 +18,7 @@ _hx() {
|
|||
"--hsplit[Splits all given files horizontally]" \
|
||||
"-c[Specifies a file to use for configuration]" \
|
||||
"--config[Specifies a file to use for configuration]" \
|
||||
"-x[Executes the given command on startup]" \
|
||||
"-e[Executes the given command on startup]" \
|
||||
"--execute[Executes the given command on startup]" \
|
||||
"-w[Specify initial working directory]" \
|
||||
"--working-dir[Specify initial working directory]" \
|
||||
|
|
|
@ -76,7 +76,7 @@ impl Args {
|
|||
Some(path) => args.log_file = Some(path.into()),
|
||||
None => anyhow::bail!("--log must specify a path to write"),
|
||||
},
|
||||
"-x" | "--execute" => {
|
||||
"-e" | "--execute" => {
|
||||
if let Some(command) = argv.next().as_deref() {
|
||||
args.execute = helix_view::input::parse_macro(command)?;
|
||||
} else {
|
||||
|
|
|
@ -76,7 +76,7 @@ FLAGS:
|
|||
--hsplit Splits all given files horizontally into different windows
|
||||
-w, --working-dir <path> Specify an initial working directory
|
||||
+N Open the first given file at line number N
|
||||
-x, --execute <command> Executes the given command on startup
|
||||
-e, --execute <command> Executes the given command on startup
|
||||
",
|
||||
env!("CARGO_PKG_NAME"),
|
||||
VERSION_AND_GIT_HASH,
|
||||
|
|
Loading…
Reference in New Issue