mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-12-26 14:30:12 +08:00
style: some code style fixes
This commit is contained in:
parent
7ae4f76f6d
commit
67cc59b425
@ -39,7 +39,7 @@ function frontend() {
|
||||
emulate -L zsh
|
||||
|
||||
# define search context URLS
|
||||
typeset -A urls
|
||||
local -A urls
|
||||
urls=(
|
||||
angular 'https://angular.io/?search='
|
||||
angularjs $(_frontend_fallback 'angularjs.org')
|
||||
@ -73,8 +73,7 @@ function frontend() {
|
||||
)
|
||||
|
||||
# show help for command list
|
||||
if [[ $# -lt 2 ]]
|
||||
then
|
||||
if [[ $# -lt 2 ]]; then
|
||||
print -P "Usage: frontend %Ucontext%u %Uterm%u [...%Umore%u] (or just: %Ucontext%u %Uterm%u [...%Umore%u])"
|
||||
print -P ""
|
||||
print -P "%Uterm%u and what follows is what will be searched for in the %Ucontext%u website,"
|
||||
@ -90,8 +89,7 @@ function frontend() {
|
||||
fi
|
||||
|
||||
# check whether the search context is supported
|
||||
if [[ -z "$urls[$1]" ]]
|
||||
then
|
||||
if [[ -z "$urls[$1]" ]]; then
|
||||
echo "Search context \"$1\" currently not supported."
|
||||
echo ""
|
||||
echo "Valid contexts are:"
|
||||
|
@ -1,10 +1,8 @@
|
||||
alias pjo="pj open"
|
||||
|
||||
pj () {
|
||||
emulate -L zsh
|
||||
|
||||
cmd="cd"
|
||||
project=$1
|
||||
function pj() {
|
||||
local cmd="cd"
|
||||
local project="$1"
|
||||
|
||||
if [[ "open" == "$project" ]]; then
|
||||
shift
|
||||
@ -25,13 +23,12 @@ pj () {
|
||||
}
|
||||
|
||||
_pj () {
|
||||
emulate -L zsh
|
||||
|
||||
typeset -a projects
|
||||
local -a projects
|
||||
for basedir ($PROJECT_PATHS); do
|
||||
projects+=(${basedir}/*(/N))
|
||||
done
|
||||
|
||||
compadd ${projects:t}
|
||||
}
|
||||
|
||||
compdef _pj pj
|
||||
|
Loading…
Reference in New Issue
Block a user