aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authora-kenji <aks.kenji@protonmail.com>2021-03-16 21:22:59 +0100
committera-kenji <aks.kenji@protonmail.com>2021-03-16 21:22:59 +0100
commit564ded0bb3a47ab0918e20d5505385f35d31906b (patch)
treef3f42c87805a077ea5745567a6effbdf5b478398
parentAdd key events documentation (diff)
downloadsl0ppij-564ded0bb3a47ab0918e20d5505385f35d31906b.tar.gz
sl0ppij-564ded0bb3a47ab0918e20d5505385f35d31906b.tar.xz
sl0ppij-564ded0bb3a47ab0918e20d5505385f35d31906b.zip
Add short --config -c option
-rw-r--r--assets/completions/_zellij1
-rw-r--r--assets/completions/zellij.bash6
-rw-r--r--assets/completions/zellij.fish2
-rw-r--r--src/cli.rs2
4 files changed, 8 insertions, 3 deletions
diff --git a/assets/completions/_zellij b/assets/completions/_zellij
index f292d560..cd8dce56 100644
--- a/assets/completions/_zellij
+++ b/assets/completions/_zellij
@@ -22,6 +22,7 @@ _zellij() {
'--max-panes=[Maximum panes on screen, caution: opening more panes will close old ones]' \
'-l+[Path to a layout yaml file]' \
'--layout=[Path to a layout yaml file]' \
+'-c+[Path to the configuration yaml file]' \
'--config=[Path to the configuration yaml file]' \
'-m[Send "move focused pane" to active zellij session]' \
'--move-focus[Send "move focused pane" to active zellij session]' \
diff --git a/assets/completions/zellij.bash b/assets/completions/zellij.bash
index 17afd610..0ede5cce 100644
--- a/assets/completions/zellij.bash
+++ b/assets/completions/zellij.bash
@@ -20,7 +20,7 @@ _zellij() {
case "${cmd}" in
zellij)
- opts=" -m -d -h -V -s -o -l --move-focus --debug --help --version --split --open-file --max-panes --layout --config "
+ opts=" -m -d -h -V -s -o -l -c --move-focus --debug --help --version --split --open-file --max-panes --layout --config "
if [[ ${cur} == -* || ${COMP_CWORD} -eq 1 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
@@ -59,6 +59,10 @@ _zellij() {
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
+ -c)
+ COMPREPLY=($(compgen -f "${cur}"))
+ return 0
+ ;;
*)
COMPREPLY=()
;;
diff --git a/assets/completions/zellij.fish b/assets/completions/zellij.fish
index 36425a25..eaba9fa4 100644
--- a/assets/completions/zellij.fish
+++ b/assets/completions/zellij.fish
@@ -2,7 +2,7 @@ complete -c zellij -n "__fish_use_subcommand" -s s -l split -d 'Send "split (dir
complete -c zellij -n "__fish_use_subcommand" -s o -l open-file -d 'Send "open file in new pane" to active zellij session'
complete -c zellij -n "__fish_use_subcommand" -l max-panes -d 'Maximum panes on screen, caution: opening more panes will close old ones'
complete -c zellij -n "__fish_use_subcommand" -s l -l layout -d 'Path to a layout yaml file'
-complete -c zellij -n "__fish_use_subcommand" -l config -d 'Path to the configuration yaml file'
+complete -c zellij -n "__fish_use_subcommand" -s c -l config -d 'Path to the configuration yaml file'
complete -c zellij -n "__fish_use_subcommand" -s m -l move-focus -d 'Send "move focused pane" to active zellij session'
complete -c zellij -n "__fish_use_subcommand" -s d -l debug
complete -c zellij -n "__fish_use_subcommand" -s h -l help -d 'Prints help information'
diff --git a/src/cli.rs b/src/cli.rs
index d6d3057e..67a92196 100644
--- a/src/cli.rs
+++ b/src/cli.rs
@@ -25,7 +25,7 @@ pub struct CliArgs {
pub layout: Option<PathBuf>,
/// Path to the configuration yaml file
- #[structopt(long)]
+ #[structopt(short, long)]
pub config: Option<PathBuf>,
#[structopt(short, long)]