diff options
-rw-r--r-- | README.markdown | 2 | ||||
-rw-r--r-- | sh/shrc.d/lhn.sh | 12 |
2 files changed, 0 insertions, 14 deletions
diff --git a/README.markdown b/README.markdown index fb517bad..b1eeec10 100644 --- a/README.markdown +++ b/README.markdown @@ -183,8 +183,6 @@ in `sh/shrc.d` to be loaded by any POSIX interactive shell. Those include: depending on the capabilities of the system `grep(1)`. * `hgrep()` allows searching `$HISTFILE`. * `keychain()` keeps `$GPG_TTY` up to date if a GnuPG agent is available. -* `lhn()` gets the history number of the last command, if the POSIX `fc` - builtin is available. * `ls()` tries to apply color to `ls(1)` for interactive use if available. * `la()` runs `ls -A` if it can, or `ls -a` otherwise. * `ll()` runs `ls -Al` if it can, or `ls -al` otherwise. diff --git a/sh/shrc.d/lhn.sh b/sh/shrc.d/lhn.sh deleted file mode 100644 index 15fced6e..00000000 --- a/sh/shrc.d/lhn.sh +++ /dev/null @@ -1,12 +0,0 @@ -# Print the history number of the last command -# "fc" is specified by POSIX, but does not seem to be in dash, so its being -# included here rather than in e.g. ~/.bashrc.d is a bit tenuous. -lhn () { - if ! command -v fc >/dev/null 2>&1 ; then - printf 'lhn(): fc: command not found\n' - return 1 - fi - set -- "$(fc -l -1)" - [ -n "$1" ] || return - printf '%u\n' "$1" -} |