Swap out cloc for tokei
This commit is contained in:
parent
c3f8a6f101
commit
a2704475b0
2 changed files with 6 additions and 1 deletions
|
@ -24,6 +24,9 @@ elif [ "$ID" -eq "arch" ] || [ "$ID" -eq "manjaro" ]; then
|
|||
pacman -Sy tmux python python-pip
|
||||
fi
|
||||
|
||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
|
||||
cargo install tokei --features all
|
||||
|
||||
if [ ! -d "/home/jarvis" ]; then
|
||||
echo Creating user jarvis...
|
||||
useradd -m jarvis
|
||||
|
|
|
@ -280,7 +280,9 @@ class DevCog(commands.Cog):
|
|||
await self._decode(ctx, method, data)
|
||||
|
||||
async def _cloc(self, ctx):
|
||||
output = subprocess.check_output(["cloc", "."]).decode("UTF-8")
|
||||
output = subprocess.check_output(
|
||||
["tokei", "-C", "--sort", "code"]
|
||||
).decode("UTF-8")
|
||||
await ctx.send(f"```\n{output}\n```")
|
||||
|
||||
@commands.command(name="cloc", help="Get J.A.R.V.I.S. lines of code")
|
||||
|
|
Loading…
Add table
Reference in a new issue