-
Notifications
You must be signed in to change notification settings - Fork 34
preexec, right prompt & ps0 functionality #835
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I'll think about it. bash's As for zsh's |
i did hear about the |
oh and also PLEASE add right prompt functionality bc doing it manually makes history scrolling kill itself 🥺 |
What is "right prompt"? I have a complex prompt with no problem. |
right prompt would be a part of the prompt shifted to the right side of the screen, see starship or powerlevel10k |
i'll use this to add enhancements that'd make this generally nicer for interactive use
|
DEBUG trap and PS0/1 functionality is working in these dot files along with window manager escape codes. MacOS Terminal.app working directory dropdown is correctly updated and the current executed command is displayed in the title. I tested with xterm and rxvt as well. There was a bug recently fixed and the script depends on latest ksh build in order to update using DEBUG trap. See .kshrc .sh-cmnprompt. If you're interested the same prompt and title bar works for .bashrc and .zshrc as well. All tested on Darwin. Also, the dot files have conditional code to display color if the terminal supports it using tput and when Emacs M-x shell is invoked ksh appears to work correctly. https://github.com/nickpapadonis/home-dot There were comments on command completion in this. Is case insensitive vs sensitive an option? |
What key bindings are a mess? I noted the biggest problem for me was M-x for Emacs like completion. In Terminal.app it was checking a conditional to allow M-x from Option. For xterm and XQuartz there is an .xmodmap file in the above dot files repo that remaps the command key to Meta, which is also helpful at the prompt. |
i meant to set keybinds in a not-hacky way |
What "hacky" way is there? There's the method from the Bolsky, written by dgk (and shipped with the shell). And there's the RedHat way, with a big |
it just seems awkward to use personally |
Does preexec get invoked for all commands in subshells or just the interactive command in top level shell? That may present some difference in functionality with DEBUG trap. |
You can achieve this by aliasing 'cd' to a command that sets the prompt I think. |
aliasing a command like cd to a prompt-setting command before changing dir is what i intend to avoid. that's the main reason my prompt is so convoluted [also bc i want a full-featured prompt fully in ksh [lack of starship for ksh]]. |
That doesn't need to be convoluted either. You can even support most of I didn't write this, credit is in the file and @McDutchie has made a few updates to it. |
mm, my prompt also does have things like git status and stuff that'd probably be a lil hard to just Turn Into A Bash-Friendly Short Prompt |
i like zsh's preexec feature and was thinking it'd be awesome for a similar feature in ksh
and also the ps0 feature from bash which replaces the prompt before a typed command is executed
The text was updated successfully, but these errors were encountered: