mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-02-12 05:49:47 +08:00
Compare commits
No commits in common. "605d76616aa47b2e5abe25eb26c4c9c1554f93d5" and "3e2a5742cdb4deae4d7f10351d59c7f2933e3555" have entirely different histories.
605d76616a
...
3e2a5742cd
@ -366,7 +366,7 @@ zstyle ':omz:lib:directories' aliases no
|
|||||||
|
|
||||||
Async prompt functions are an experimental feature (included on April 3, 2024) that allows Oh My Zsh to render prompt information
|
Async prompt functions are an experimental feature (included on April 3, 2024) that allows Oh My Zsh to render prompt information
|
||||||
asyncronously. This can improve prompt rendering performance, but it might not work well with some setups. We hope that's not an
|
asyncronously. This can improve prompt rendering performance, but it might not work well with some setups. We hope that's not an
|
||||||
issue, but if you're seeing problems with this new feature, you can turn it off by setting the following in your .zshrc file,
|
issue, but if you're seeing problems with this new feature, you can turn it of by setting the following in your .zshrc file,
|
||||||
before Oh My Zsh is sourced:
|
before Oh My Zsh is sourced:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
|
|||||||
@ -3,10 +3,7 @@ function omz_history {
|
|||||||
local clear list
|
local clear list
|
||||||
zparseopts -E c=clear l=list
|
zparseopts -E c=clear l=list
|
||||||
|
|
||||||
if [[ $# -eq 0 ]]; then
|
if [[ -n "$clear" ]]; then
|
||||||
# if no arguments provided, show full history starting from 1
|
|
||||||
builtin fc -l 1
|
|
||||||
elif [[ -n "$clear" ]]; then
|
|
||||||
# if -c provided, clobber the history file
|
# if -c provided, clobber the history file
|
||||||
echo -n >| "$HISTFILE"
|
echo -n >| "$HISTFILE"
|
||||||
fc -p "$HISTFILE"
|
fc -p "$HISTFILE"
|
||||||
@ -15,8 +12,8 @@ function omz_history {
|
|||||||
# if -l provided, run as if calling `fc' directly
|
# if -l provided, run as if calling `fc' directly
|
||||||
builtin fc "$@"
|
builtin fc "$@"
|
||||||
else
|
else
|
||||||
# otherwise, run `fc -l` with a custom format
|
# unless a number is provided, show all history events (starting from 1)
|
||||||
builtin fc -l "$@"
|
[[ ${@[-1]-} = *[0-9]* ]] && builtin fc -l "$@" || builtin fc -l "$@" 1
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -17,7 +17,7 @@ Original author: [Sorin Ionescu](https://github.com/sorin-ionescu)
|
|||||||
| `tab` | Open the current directory in a new tab |
|
| `tab` | Open the current directory in a new tab |
|
||||||
| `split_tab` | Split the current terminal tab horizontally |
|
| `split_tab` | Split the current terminal tab horizontally |
|
||||||
| `vsplit_tab` | Split the current terminal tab vertically |
|
| `vsplit_tab` | Split the current terminal tab vertically |
|
||||||
| `ofd` | Open passed directories (or $PWD by default) in Finder |
|
| `ofd` | Open the current directory in a Finder window |
|
||||||
| `pfd` | Return the path of the frontmost Finder window |
|
| `pfd` | Return the path of the frontmost Finder window |
|
||||||
| `pfs` | Return the current Finder selection |
|
| `pfs` | Return the current Finder selection |
|
||||||
| `cdf` | `cd` to the current Finder directory |
|
| `cdf` | `cd` to the current Finder directory |
|
||||||
|
|||||||
@ -3,15 +3,8 @@
|
|||||||
0="${${ZERO:-${0:#$ZSH_ARGZERO}}:-${(%):-%N}}"
|
0="${${ZERO:-${0:#$ZSH_ARGZERO}}:-${(%):-%N}}"
|
||||||
0="${${(M)0:#/*}:-$PWD/$0}"
|
0="${${(M)0:#/*}:-$PWD/$0}"
|
||||||
|
|
||||||
# Open in Finder the directories passed as arguments, or the current directory if
|
# Open the current directory in a Finder window
|
||||||
# no directories are passed
|
alias ofd='open_command $PWD'
|
||||||
function ofd {
|
|
||||||
if (( ! $# )); then
|
|
||||||
open_command $PWD
|
|
||||||
else
|
|
||||||
open_command $@
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
# Show/hide hidden files in the Finder
|
# Show/hide hidden files in the Finder
|
||||||
alias showfiles="defaults write com.apple.finder AppleShowAllFiles -bool true && killall Finder"
|
alias showfiles="defaults write com.apple.finder AppleShowAllFiles -bool true && killall Finder"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user