Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
oh-my-zsh
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
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
349fa15b
Commit
349fa15b
authored
Dec 09, 2013
by
Eduardo San Martin Morote
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed a dirs bug for catimg
parent
0185d992
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
+3
-2
catimg.plugin.zsh
plugins/catimg/catimg.plugin.zsh
+1
-1
catimg.sh
plugins/catimg/catimg.sh
+2
-1
No files found.
plugins/catimg/catimg.plugin.zsh
View file @
349fa15b
...
...
@@ -9,7 +9,7 @@
if
[[
-x
`
which convert
`
]]
;
then
function
catimg
()
{
source
$
(
dirname
$0
)
/catimg.sh
$@
source
$
ZSH
/plugins/catimg
/catimg.sh
$@
}
else
echo
"catimg need convert (ImageMagick) to work)"
...
...
plugins/catimg/catimg.sh
View file @
349fa15b
...
...
@@ -43,7 +43,7 @@ if [ ! "$WIDTH" ]; then
else
COLS
=
$(
expr
$WIDTH
"/"
$(
echo
-n
"
$CHAR
"
|
wc
-c
))
fi
WIDTH
=
$(
convert
${
IMG
}
-print
"%w
\n
"
/dev/null
)
WIDTH
=
$(
convert
"
$IMG
"
-print
"%w
\n
"
/dev/null
)
if
[
"
$WIDTH
"
-gt
"
$COLS
"
]
;
then
WIDTH
=
$COLS
fi
...
...
@@ -58,6 +58,7 @@ else
fi
# Display the image
I
=
0
convert
"
$IMG
"
-resize
$COLS
\>
+dither
`
echo
$REMAP
`
txt:- |
sed
-e
's/.*none.*/NO NO NO/g'
-e
'1d;s/^.*(\(.*\)[,)].*$/\1/g;y/,/ /'
|
while
read
R G B f
;
do
...
...
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