feat: add shell profiles for zsh, sh, csh/tcsh
- profile.bash: simplified preexec_init (early return), extracted ___keep_complete helper for @/@@ completion wrappers - profile.zsh: add-zsh-hook preexec, wrapper function, @/@@ aliases, completions via compdef - profile.sh: POSIX-compatible for sh/dash/ksh. Wrapper function, @/@@ aliases. No preexec or completions. - profile.csh: alias-based keep wrapper, @/@@ aliases. No preexec or completions. - modulefile: adds KEEP_SH_PROFILE, KEEP_ZSH_PROFILE, KEEP_CSH_PROFILE - README: updated Shell Integration table and Shell Completion section
This commit is contained in:
13
profile.sh
Normal file
13
profile.sh
Normal file
@@ -0,0 +1,13 @@
|
||||
#!/bin/sh
|
||||
# POSIX-compatible profile for sh, dash, ksh93, pdksh, mksh, and other POSIX shells.
|
||||
# Preexec hooks are not available in these shells; KEEP_META_command is not set.
|
||||
|
||||
KEEP_META_tty=${KEEP_META_tty:-$(tty)}
|
||||
|
||||
keep() {
|
||||
export KEEP_META_tty
|
||||
command keep "$@"
|
||||
}
|
||||
|
||||
alias @='keep --save'
|
||||
alias @@='keep --get'
|
||||
Reference in New Issue
Block a user