#!/bin/bash -l

export PS1='[\u@\h \W]\$ '

function cmd() {
  local command="$1"
  echo -n "${PS1@P}"
  read -s
  for (( i=0 ; i<${#command} ; i++)); do
    echo -n "${command:i:1}"
    sleep .1
  done
  read
  $command
}

clear

cmd ls
cmd 'ls -la'
cmd 'ls --help'
cmd 'ls --help | less'
cmd "mkdir alma"
cmd ls
cmd "cd alma"
cmd "echo asd"

bash

