Skip to content
Permalink
Browse files

Fixed some issues working with paths with spaces

  • Loading branch information...
daotoad committed Oct 18, 2018
1 parent 4d3ad53 commit 82d693a0f098caabb5130edd402fda8a165337cd
Showing with 4 additions and 4 deletions.
  1. +1 −1 lib/core/smartcd
  2. +2 −2 lib/core/smartcd_edit
  3. +1 −1 lib/core/smartcd_template
@@ -339,7 +339,7 @@ function _smartcd_check_inode() {
local base=$(_smartcd_base)
local inode=$(command ls -di "$dir" | command awk '{print $1}')
if [[ -f "$base/inodes$dir.inode" ]]; then
prev="$(<$base/inodes$dir.inode)"
prev="$(<"$base/inodes$dir.inode")"
if [[ $prev != "*" && $inode != $prev ]]; then
echo "WARNING! Possibly outdated scripts detected, not running them. These"
echo "scripts were created for a directory which has been deleted or replaced,"
@@ -161,9 +161,9 @@ function _smartcd_file_check() {
local action="$4"
local dir="$5"

if [[ -n $dir ]]; then
if [[ -n "$dir" ]]; then
# canonicalize
dir=$(builtin cd $dir 2>/dev/null && command pwd)
dir=$(builtin cd "$dir" 2>/dev/null && command pwd)
if [[ -z $dir ]]; then
echo "$3 is not a valid directory"
return
@@ -137,7 +137,7 @@ EOF
local name="$1"
if [[ -n $name ]]; then
if [[ -f "$base/templates/$name" ]]; then
local current_dir=$PWD
local current_dir="$PWD"

local mode= line=
while builtin read -r line; do

0 comments on commit 82d693a

Please sign in to comment.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.