Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Oh My Zsh
Commits
44b23ae1
Commit
44b23ae1
authored
Dec 09, 2013
by
Eduardo San Martin Morote
Browse files
catimg: fix exit without using source
supresses errors from convert whilen converting, as they are usually just warnings
parent
349fa15b
Changes
2
Hide whitespace changes
Inline
Side-by-side
plugins/catimg/catimg.plugin.zsh
View file @
44b23ae1
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
if
[[
-x
`
which convert
`
]]
;
then
if
[[
-x
`
which convert
`
]]
;
then
function
catimg
()
{
function
catimg
()
{
source
$ZSH
/plugins/catimg/catimg.sh
$@
zsh
$ZSH
/plugins/catimg/catimg.sh
$@
}
}
else
else
echo
"catimg need convert (ImageMagick) to work)"
echo
"catimg need convert (ImageMagick) to work)"
...
...
plugins/catimg/catimg.sh
View file @
44b23ae1
...
@@ -59,7 +59,7 @@ fi
...
@@ -59,7 +59,7 @@ fi
# Display the image
# Display the image
I
=
0
I
=
0
convert
"
$IMG
"
-resize
$COLS
\>
+dither
`
echo
$REMAP
`
txt:- |
convert
"
$IMG
"
-resize
$COLS
\>
+dither
`
echo
$REMAP
`
txt:-
2>/dev/null
|
sed
-e
's/.*none.*/NO NO NO/g'
-e
'1d;s/^.*(\(.*\)[,)].*$/\1/g;y/,/ /'
|
sed
-e
's/.*none.*/NO NO NO/g'
-e
'1d;s/^.*(\(.*\)[,)].*$/\1/g;y/,/ /'
|
while
read
R G B f
;
do
while
read
R G B f
;
do
if
[
!
"
$R
"
=
"NO"
]
;
then
if
[
!
"
$R
"
=
"NO"
]
;
then
...
...
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