Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
oh-my-zsh
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
github
oh-my-zsh
Commits
b0a14907
Unverified
Commit
b0a14907
authored
Jun 17, 2018
by
Ben Klein
Committed by
GitHub
Jun 17, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow arguments to `d` to be passed to dirs
Replace the alias with a function. Call `dirs` if arguments are given to `d`.
parent
c99844d8
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletion
+8
-1
directories.zsh
lib/directories.zsh
+8
-1
No files found.
lib/directories.zsh
View file @
b0a14907
...
@@ -21,7 +21,14 @@ alias 9='cd -9'
...
@@ -21,7 +21,14 @@ alias 9='cd -9'
alias
md
=
'mkdir -p'
alias
md
=
'mkdir -p'
alias
rd
=
rmdir
alias
rd
=
rmdir
alias
d
=
'dirs -v | head -10'
function
d
()
{
if
[[
-n
$1
]]
;
then
dirs
"
$@
"
else
dirs
-v
|
head
-10
fi
}
compdef _dirs d
# List directory contents
# List directory contents
alias
lsa
=
'ls -lah'
alias
lsa
=
'ls -lah'
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment